More business logic

Implementation Details

If the current company capitalization exceeds the original capitalization, the app will update and save the new value. If not, an error will be thrown, as the capitalization should not decrease within the application’s context.

  1. Company Share Initialization

    • When initializing, the company can release its first set of shares to the market only once.
    • Example: The owner starts with 9,000 shares, and the shareholder has 1,000 shares.
  2. Creating Share Split Events

    • Share Split Mechanics:

      • A share split occurs based on a set valuation. For instance:

        • Initial valuation = 100,000
        • Initial shares = 10,000
      • If the split factor is 2, the number of shares doubles from 10,000 to 20,000. Consequently, the stock price adjusts according to the split factor.

Key Concepts

  • Capitalization Check: Ensuring that the company's capitalization doesn't fall below its current value.
  • Error Handling: Throwing errors to maintain app integrity when incorrect operations are attempted.
  • Single Event Release: Limiting the initial shares release to a one-time event to establish initial equity.
  • Share Splits: Adjusting the number of shares while maintaining the overall valuation, thus modifying the stock price.