Java program that allows the customer to input the number


Assignment: A brokerage firm provides the services to buy and sell stocks for customers. The firm charges $7.99 service fee on each transaction, buy or sell. When a customer sells stocks, he/she would like to know if he/she gained or lost on a particular investment.

Java program that allows the customer to input the number of shares sold, the purchase price of each share, and the selling price of each share. The program calculates and outputs the amount invested, the total service charges, amount gained or lost, and the amount received after selling the stock.

Sample Run:

Enter the buying price of each share: 68.89

Enter the selling price of each share: 79.34

Enter the number of shares: 100

Total amount invested: $ 6896.99

Total amount received: $ 7926.01

Total service charges: $ 15.98

Amount gained or lost: $ 1029.02

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Java program that allows the customer to input the number
Reference No:- TGS02905718

Now Priced at $10 (50% Discount)

Recommended (96%)

Rated (4.8/5)