-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOverSimplifiedDriver.java
More file actions
46 lines (34 loc) · 1.53 KB
/
OverSimplifiedDriver.java
File metadata and controls
46 lines (34 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import java.util.Scanner;
public class OverSimplifiedDriver {
public static void main(String[] args) {
try (Scanner userInput = new Scanner(System.in)) {
System.out.println("Enter 1 for Laptop 2 for Desktop");
int userchoice = userInput.nextInt();
switch(userchoice){
case 1:
Laptop userLaptop = new Laptop();
//userLaptop.userName = userLaptop.setUserName(); i hate java
userLaptop.setUserName();
//System.out.println(userLaptop.userName); holy shit i'm smart, it works!
userLaptop.setComputerBrand();
userLaptop.setCpuBrand();
userLaptop.setCPUSpeed();
userLaptop.setHardDriveCapacity();
userLaptop.setMonitorSize();
userLaptop.printRecipt();
break;
case 2:
Desktop userDesktop = new Desktop();
userDesktop.setUserName();
userDesktop.setComputerBrand();
userDesktop.setCpuBrand();
userDesktop.setCPUSpeed();
userDesktop.setHardDriveCapacity();
userDesktop.setMonitorSize();
userDesktop.setCaseSize();
userDesktop.printRecipt();
break;
}
}
}
}