Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Program flow for Computers.java that allows the user to select what they want to buy
- //Also offers the user some upgrade options for their computer/tablet of their choosing.
- //
- //
- //Author:Dexter Rogers
- //Date Created:10/24/16
- import java.util.ArrayList;
- import java.util.Scanner;
- public class MCC_Rogers
- {
- private final double fTaxRate = .07; //tax rate that will be used in the main method
- public static void main(String [ ] args)
- {
- Computers tempComputer = new Computer("Laptop","Dell","Inspiron:Signature Edition","500gb","4gb");
- Computer(listOfComputers.add(tempComputer);
- Computers tempComputer = new Computer("Laptop","Dell","Inspiron:2 in 1","500gb","4gb");
- Computer(listOfComputers.add(tempComputer);
- Computers tempComputer = new Computer("Laptop","Acer","Model:70VM","1tb","16gb");
- Computer(listOfComputers.add(tempComputer);
- Computers tempComputer = new Computer("Laptop","Acer","Model:70XR","1tb","16gb");
- Computer(listOfComputers.add(tempComputer);
- Tablets tempTablet = new Tablet("Tablet","Microsoft","Surface Pro 3","64gb","2gb");
- Tablet(listOfTablets.add(tempTablet);
- Tablets tempTablet = new Tablet("Tablet","Microsoft","Surface Pro 4","128gb","4gb");
- Tablet(listOfTablets.add(tempTablet);
- ArrayList<String> listOfComputers = new ArrayList<String>();
- listOfComputers.add("15in Dell Inspirion:Signature Edition");
- listOfComputers.add("15in Dell Inspirion:2 in 1");
- listOfComputers.add("15in Acer:70VM");
- listOfComputers.add("15in Acer:70XR");
- ArrayList<String> listOfTablets = new ArrayList<String>();
- listOfTablets.add("Surface Pro 3");
- listOfTablets.add("Surface Pro 4");
- ArrayList<Computers> listOfComputers = new ArrayList<Computers>();
- listOfComputers.add("Laptop","Dell","Inspiron:Signature Edition","500gb","4gb");
- listOfComputers.add("Laptop","Dell","Inspiron:2 in 1","500gb","4gb");
- listOfComputers.add("Laptop","Acer","Model:70VM","1tb","16gb");
- listOfComputers.add("Laptop","Acer","Model:70XR","1tb","16gb");
- ArrayList<Tablets> listOfTablets = new ArrayList<Tablets>();
- listOfTablets.add("Tablet","Microsoft","Surface Pro 3","64gb","2gb");
- listOfTablets.add("Tablet","Microsoft","Surface Pro 4","128gb","4gb");
- //The program starts here. Let's greet the user.
- Scanner scan = new Scanner(System.in);
- System.out.println("Hello, fair electronic buyer."); // Our app has a gretter, just like WalMart
- //Task 1: Ask the user if they want a laptop or tablet.
- System.out.println("Would you like to buy a laptop or a computer?");
- String customer_want = scan.next();
- // If they want a tablet, show them the tablet options, otherwise show them a list of laptop options so they can choose 1 (or none)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement