Assignment Task
General Description
An investor often needs to maintain a portfolio of different investments so that the person can
keep track of the actions for buying or selling investments, searching for relevant investments,
updating prices, and calculating the total gain of the portfolio. An investment is better modeled
by an object so that you can distinguish different attributes and apply suitable methods for
accessing and changing these attributes. For this project, we limit ourselves to two kinds of
investments: Stock and MutualFund. Here are two examples illustrating the related attributes for
Stock and MutualFund objects, respectively:
Attributes Stock Example MutualFund Example
symbol AAPL SSETX
name Apple Inc. BNY Mellon Growth Fund Class I
quantity 500 shares 450 units
price $142.23 $42.21
bookValue $55,049.99 $23,967.00
Each investment should have a symbol, a name, a quantity, a price, and a bookValue. For each
stock, we need to pay commissons when buying or selling shares of the stock, which will affect
the values for “quantity” and “bookValue”, and the calculation of the gain for the stock. We can
assume that the commission is $9.99 each time we buy or sell certain shares of a stock. For
example, if we initially buy 500 shares of AAPL stock at the price of $110.08 per share, the
quantity will be 500, and the bookValue will be 500 × 110.08 + 9.99 = $55,049.99. Later on, if
the price is changed to $142.23 per share, the gain will be (500 × 142.23 – 9.99) – 55,049.99 =
71,105.01 – 55,049.99 = $16,055.02. Alternatively, if we sell 200 shares of this stock at
$142.23 per share, the payment received will be 200 × 142.23 – 9.99 = $28,436.01, the quantity
will be reduced to 300, and bookValue will be adjusted to 55,049.99 × 300/500 = $33,029.99.
A-Plus Writing Help For University Students
Get expert assistance in any academic field. All courses and programs covered.
Get Help Now!Welcome to our Online Essay Writing Agency. Securing higher grades costing your pocket? Order your assignment online at the lowest price now! Our online essay writers are able to provide high-quality assignment help within your deadline. With our homework writing company, you can order essays, term papers, research papers, capstone projects, movie review, presentation, annotated bibliography, reaction paper, research proposal, discussion, or another assignment without having to worry about its originality – we offer 100% original content written completely from scratch
We write papers within your selected deadline. Just share the instructions
