Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started