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)
IntChains Group Ltd 1 summary
IntChain TICKER: 1111 1111
IntChains Group Ltd Stock Price: 2.98 dollars
IntChains Market Cap: 4567642 dollars
IntChains Revenue: 510001000 dollars
IntChains Earnings: 2.45 per share
IntChains Launch Date:
MGO Global 2 summary
MGO Global TICKER: 2222 2222
MGO Global Stock Price: 13.45 dollars
MGO Global Market Cap: 2345323 dollars
MGO Global Revenue: 65424221 dollars
MGO Global Earnings: 12.21 per share
MGO Global Launch Date:
BullFrog AI 3 summary
BullFrog AI TICKER: 3333 3333
BullFrog AI Stock Price: 45.67 dollars
BullFrog AI Market Cap: 34500342 dollars
BullFrog AI Revenue: 127655900 dollars
BullFrog AI Earnings: 44.21 per share
BullFrog AI Launch Date:
{"Company": 1, "Ticker": 1111, "Price": 2.98, "MarketCap": 4567642, "Revenue": 510001000, "Earnings": 2.45, "LaunchDate": 0.007246376811594202}
{"Company": 2, "Ticker": 2222, "Price": 13.45, "MarketCap": 2345323, "Revenue": 65424221, "Earnings": 12.21, "LaunchDate": 0.006211180124223602}
{"Company": 3, "Ticker": 3333, "Price": 45.67, "MarketCap": 34500342, "Revenue": 127655900, "Earnings": 44.21, "LaunchDate": 0.004347826086956522}