Question

Java Programming Kathryn bought 10,000 shares of apple stock at a price of $83.80 per share....

Java Programming

Kathryn bought 10,000 shares of apple stock at a price of $83.80 per share. She must pay her stock broker a 2 percent commission for the transaction. Write a program that calculates and displays the following:

The amount paid for the stock alone ( without the commission)

The amount paid to her broker for commission.

The total amount the stock cost ( value of the stock plus the commission paid)

Homework Answers

Answer #1
public class AppleStockShares {
    public static void main(String[] args) {
        int numShares = 10000;
        double price = 83.80;

        double totalPrice = numShares*price;
        double commision = totalPrice*0.02;

        System.out.println("The amount paid for the stock alone: "+totalPrice);
        System.out.println("The amount paid to her broker for commission: "+commision);
        System.out.println("The total amount the stock cost: "+(totalPrice+commision));
    }
}

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
John bought 1000 shares of Intel stock on October 18, 2014, for $30 per share plus...
John bought 1000 shares of Intel stock on October 18, 2014, for $30 per share plus a $750 commission he paid his broker. On December 12, 2018, he sells the shares for $42.50 per share. He also incurs a $1000 fee for this transaction. a.) What is John's adjusted basis in the 1000 shares of Intel stock? b.) What amount does John realize when he sells the 1000 shares? c.) What is the gain/loss for John on the sale of...
A. STOCK COMMISSION Suppose the customer first name is Mary and last name is Jones. :...
A. STOCK COMMISSION Suppose the customer first name is Mary and last name is Jones. : i. Declare firstName and lastname string variables that hold a first and last name. ii. Declare a sharesOfStock int variable that holds a value of 750 iii. Declare a pricePerShare double variable that holds a value of 35.00 iv. Declare a commissionRate double variable that holds .02 (which is 2%) v. Description: Assume that the person listed in the fName and lName variables purchased...
Megan bought 200 shares of stock at a price of $10 a share. She used her...
Megan bought 200 shares of stock at a price of $10 a share. She used her 70% margin account to make the purchase. She sold her shares after a year for $12 a share. Ignoring margin interest and trading costs, answer all of the questions: How much money did Megan need to put into the account before she can borrow from the broker to make the purchase? How much can she borrow from the broker? After the purchase, the stock’s...
WRITE A JAVA PROGRAM 1. Assignment Description Write a stock transaction program that calculates a customer's...
WRITE A JAVA PROGRAM 1. Assignment Description Write a stock transaction program that calculates a customer's profit (or loss) within a certain period of time. 1) First, the program need to get user's name, the stock's code, number of shares and the price he/she purchased the stock, it also asks the user for the price he/she sold the stock later on. The program then compute the following: The amount of money the customer paid for the stock. The amount of...
5000 shares of stock were purchased at $25 per share with a 5% broker commission. The...
5000 shares of stock were purchased at $25 per share with a 5% broker commission. The following year they were sold for $28 per share with a 3% broker commission. What was the profit on this investment? You pay the commission both when buying and selling.  Commission is added to the buying cost and subtracted from the selling amount. Total Cost of Investment? Total Amount Received upon Sale? Actual Profit on the Investment?
An investor purchased 400 shares of a company at $30 per share. The stock was bought...
An investor purchased 400 shares of a company at $30 per share. The stock was bought on 65 percent margin (35 percent of the purchase amount was borrowed). One month later, the investor had to pay interest on the amount borrowed at a rate of 3 percent per month. At that time, the investor received a dividend of $0.50 per share. Immediately after receiving the dividend, he sold the shares at $35 per share. The investor paid total commissions of...
An investor purchased 400 shares of a company at $30 per share. The stock was bought...
An investor purchased 400 shares of a company at $30 per share. The stock was bought on 65 percent margin (35 percent of the purchase amount was borrowed). One month later, the investor had to pay interest on the amount borrowed at a rate of 3 percent per month. At that time, the investor received a dividend of $0.50 per share. Immediately after receiving the dividend, he sold the shares at $35 per share. The investor paid total commissions of...
An investor purchased 300 shares of a company at $25 per share. The stock was bought...
An investor purchased 300 shares of a company at $25 per share. The stock was bought on 70 percent margin (30 percent of the purchase amount was borrowed). One month later, the investor had to pay interest on the amount borrowed at a rate of 3 percent per month. At that time, the investor received a dividend of $0.6 per share. Immediately after receiving the dividend, he sold the shares at $38 per share. The investor paid total commissions of...
Tony bought 200 shares of Big Petroleum Company for $95 per share and paid a commission...
Tony bought 200 shares of Big Petroleum Company for $95 per share and paid a commission of $60. He sold the stock five years later for $120 per share and paid $75 commission. While he held the stock, it paid (in total) dividends of $5.50 per share. What was Tony s annual holding period yield?
Hiral bought 10,000 shares of LuLu at $40 per share, with an initial margin of 60%....
Hiral bought 10,000 shares of LuLu at $40 per share, with an initial margin of 60%. He was charged 12% margin interest annually. Two years later he sold the stock for $80 per share. LuLu declared and paid a special dividend of $4 per share during the period Hiral held the stock. What was Hiral's holding period return? 100% 150% 167% 183%
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT