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.**
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
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.**
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images