Question: 6 (Code only) Write a program in java(eclipse) to help the user determine if it is worth buying a stock. Ask the user for the

6 (Code only) Write a program in java(eclipse) to help the user determine if it is worth buying a stock. Ask the user for the number of shares they will purchase, the price they will purchase them at, the price they plan to sell them at, and the percentage of broker commission for EACH transaction. Then output the amount of money they will gain or lose. To check your results, you can also use an online calculator available here: https://salecalc.com/stock

Example output:

The number of shares to be bought: 30

The purchase price of the stock: 74.53

The sell price of the stock: 80.81

The percentage commission charged by the broker for the purchase: 7

The percentage commission charged by the broker for the sell: 5

You will net a value of: -89.33

You do not need to round the results.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!