-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComputer.java
More file actions
31 lines (26 loc) · 767 Bytes
/
Computer.java
File metadata and controls
31 lines (26 loc) · 767 Bytes
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
//Abstract class capturing shared state between Desktop and Laptop
public abstract class Computer extends Product {
private double cpuSpeed;
private int ram;
private boolean ssd;
private int storage;
public Computer(double initPrice, int initQuantity, double initCPUSpeed, int initRAM, boolean initSSD, int initStorage) {
super(initPrice, initQuantity);
cpuSpeed = initCPUSpeed;
ram = initRAM;
ssd = initSSD;
storage = initStorage;
}
public double getCPUSpeed() {
return cpuSpeed;
}
public int getRAM() {
return ram;
}
public boolean getSSD() {
return ssd;
}
public int getStorage() {
return storage;
}
}