1)Write a java program that helps a stock market investor understand how much they've made when selling Acme Software, Inc. stock. 2)Ask your user how many shares of Acme Software, Inc. they purchased. And ask your user how much they paid per share. 3)Then, assume that your user sold the same number of shares they had purchased some time later. Ask your user at what price they sold the shares. **In both instances, the purchase and sale, your user had to pay their stockbroker a commission that amounted to 2% of the amount paid for the stock as well as the amount received for the stock.** 4)Then, display: a) The amount your user paid for the stock. b) The amount of commission your user paid their stockbroker when they bought the stock. c) The amount your user sold the stock for. d) The amount of commission your user paid their stockbroker when they sold the stock. e) The amount of profit that your user made after selling the stock and paying the two commissions to their broker. (If the amount of profit that your program displays is a negative number, then your user lost money on the transaction.) Coding notes: **Make it simple and use variables of type double for the number of shares, the dollar amounts and the commission (0.02 == 2%).** **A very complete program might use an if statement or two.**

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

1)Write a java program that helps a stock market investor understand how much they've made when selling Acme Software, Inc. stock.

2)Ask your user how many shares of Acme Software, Inc. they purchased.
And ask your user how much they paid per share.

3)Then, assume that your user sold the same number of shares they had purchased some time later.
Ask your user at what price they sold the shares.

**In both instances, the purchase and sale, your user had to pay their stockbroker a commission that amounted to 2% of the amount paid for the stock as well as the amount received for the stock.**

4)Then, display:
a) The amount your user paid for the stock.
b) The amount of commission your user paid their stockbroker when they bought the stock.
c) The amount your user sold the stock for.
d) The amount of commission your user paid their stockbroker when they sold the stock.
e) The amount of profit that your user made after selling the stock and paying the two commissions to their broker.

(If the amount of profit that your program displays is a negative number, then your user lost money on the transaction.)

Coding notes:

**Make it simple and use variables of type double for the number of shares, the dollar amounts and the commission (0.02 == 2%).**

**A very complete program might use an if statement or two.**

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY