Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I already have the pseudo code that is needed I need to know is to use it for mu

ID: 3660408 • Letter: I

Question

I already have the pseudo code that is needed I need to know is to use it for multiple stocks. I need it in java format. Here is the program: import java.util.Scanner; public class stockprofit { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.println("How many shares do you have?"); int numShares = keyboard.nextInt(); System.out.println("How much are the shares each?"); int priceShares = keyboard.nextInt(); System.out.println("How much is the commission paid?"); int commissionPaid = keyboard.nextInt(); System.out.println("How much is the sale price?"); int salePrice = keyboard.nextInt(); System.out.println("How much is the sale commission?"); int saleCommission = keyboard.nextInt(); int profit = calStock(numShares, priceShares, commissionPaid, salePrice, saleCommission); if(profit < 0) { System.out.println("You loss: " + profit); } else { System.out.println("You have a profit of: " + profit); } } public static int calStock(int num_Shares, int price_Shares, int commission_Paid, int sale_Price, int sale_Commission) { int result; result = ((num_Shares * sale_Price) - sale_Commission) - ((num_Shares * price_Shares) + commission_Paid); return result; } }

Explanation / Answer

the qstn is not clear... please repost the qstn to get the best answer.......