Question: Write a program to accept inputs from a user including yourName, numbershares shares (only whole shares allowed) purchased of some stock (for example the Microsoft

Write a program to accept inputs from a user including yourName, numbershares shares (only whole shares allowed) purchased of some stock (for example the Microsoft stock symbol is MSFT) at the price of buyPrice per share and paid the stockbroker $15 buyTransactionFee. Two weeks later, the person sold the numberShares shares at sellPrice per share and paid another $10 for the sellTransactionFee. Create the necessary input, process and output variables, choosing appropriate data types, and write a Java program to accept input, calculate and display the following: 1. dollar amount paid for the shares 2. dollar amount of the shares sold 3. total transaction fee paid to the broker (including both buy and sell) - Use constants/final 4. amount of profit (or loss) made after selling the shares
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
