import json
class IPO:
def __init__(self, Company, Ticker, Price, MarketCap, Revenue, Earnings, LaunchDate):
self._Company = Company
self._Ticker = Ticker
self._Price = Price
self._MarketCap = MarketCap
self._Revenue = Revenue
self._Earnings = Earnings
self._LaunchDate = LaunchDate
# SELF
# Getters:
@property
def Company(self):
return self._Company
@property
def Ticker(self):
return self._Ticker
@property
def Price(self):
return self._Price
@property
def MarketCap(self):
return self._MarketCap
@property
def Revenue(self):
return self._Revenue
@property
def Earnings(self):
return self._Earnings
@property
def LaunchDate(self):
return self._LaunchDate
# Setters
@Company.setter
def Company(self, Company):
self._Company
@Ticker.setter
def Ticker(self, Ticker):
self._Ticker
@Price.setter
def Price(self, Price):
self._Price
@MarketCap.setter
def MarketCap(self, MarketCap):
self._MarketCap
@Revenue.setter
def Revenue(self, Revenue):
self._Revenue
@Earnings.setter
def Earnings(self, Earnings):
self._Earnings
@LaunchDate.setter
def LaunchDate(self, LaunchDate):
self._LaunchDate
# dict
@property
def dictionary(self):
dict = {
"Company" : self.Company,
"Ticker" : self.Ticker,
"Price" : self.Price,
"MarketCap" : self.MarketCap,
"Revenue" : self.Revenue,
"Earnings": self.Earnings,
"LaunchDate": self.LaunchDate,
}
return dict
def __str__(self):
return json.dumps(self.dictionary)
def __repr__(self):
return f'IPO(Company={self._Company}, Ticker={self._Ticker}, Price={self._Price}, MarketCap={self._MarketCap}, Revenue={self._Revenue}, Earnings={self._Earnings}, LaunchDate={self._LaunchDate})'
IPO1 = IPO(1, 1111, 2.98, 4567642, 510001000, 2.45, 1/6/23)
IPO2 = IPO(2, 2222, 13.45, 2345323, 65424221, 12.21, 1/7/23)
IPO3 = IPO(3, 3333, 45.67, 34500342, 127655900, 44.21, 1/10/23)
print("IntChains Group Ltd", IPO1.Company, "summary")
print("IntChain TICKER:", IPO1.Ticker, "1111")
print("IntChains Group Ltd Stock Price:", IPO1.Price, "dollars")
print("IntChains Market Cap:", IPO1.MarketCap, "dollars")
print("IntChains Revenue:", IPO1.Revenue, "dollars")
print("IntChains Earnings:", IPO1.Earnings, "per share")
print("IntChains Launch Date:"), IPO1.LaunchDate, "<--"
print("MGO Global", IPO2.Company, "summary")
print("MGO Global TICKER:", IPO2.Ticker, "2222")
print("MGO Global Stock Price:", IPO2.Price, "dollars")
print("MGO Global Market Cap:", IPO2.MarketCap, "dollars")
print("MGO Global Revenue:", IPO2.Revenue, "dollars")
print("MGO Global Earnings:", IPO2.Earnings, "per share")
print("MGO Global Launch Date:"), IPO2.LaunchDate, "<--"
print("BullFrog AI", IPO3.Company, "summary")
print("BullFrog AI TICKER:", IPO3.Ticker, "3333")
print("BullFrog AI Stock Price:", IPO3.Price, "dollars")
print("BullFrog AI Market Cap:", IPO3.MarketCap, "dollars")
print("BullFrog AI Revenue:", IPO3.Revenue, "dollars")
print("BullFrog AI Earnings:", IPO3.Earnings, "per share")
print("BullFrog AI Launch Date:"), IPO3.LaunchDate, "<--"
print(IPO1)
print(IPO2)
print(IPO3)