Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class StockApp
- {
- public static void main(String[] args)
- {
- String StockName, BrokerName, BuyerName, pDate, sDate;
- int pQuantity, sQuantity;
- double pPrice, sPrice;
- Buyer Bob;
- Scanner keyboard = new Scanner(System.in);
- System.out.println("What is your name?");
- BuyerName = keyboard.nextLine();
- if(BuyerName == String)
- {
- }
- System.out.println("What is your broker's name?");
- BrokerName = keyboard.nextLine();
- System.out.println("What is the name of the stock you purchased.");
- StockName = keyboard.nextLine();
- System.out.println("How many shares did you purchase?");
- pQuantity = keyboard.nextInt();
- System.out.println("How much was each stock worth?");
- pPrice = keyboard.nextDouble();
- keyboard.nextLine();
- System.out.println("When did you buy these shares?");
- pDate = keyboard.nextLine();
- Bob = new Buyer(BuyerName, BrokerName);
- System.out.println("How many shares did you sell?");
- sQuantity = keyboard.nextInt();
- System.out.println("How much was each stock worth?");
- sPrice = keyboard.nextDouble();
- keyboard.nextLine();
- System.out.println("When did you sell the stock?");
- sDate = keyboard.nextLine();
- // Ask for stock purchase/sale information
- Bob.Broke.BuyStock(StockName, pDate, pPrice, pQuantity);
- Bob.Broke.SellStock(sDate, sPrice, sQuantity);
- Bob.Broke.printMonthlyReport(Bob);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement