-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInventoryItem.java
More file actions
41 lines (33 loc) · 964 Bytes
/
Copy pathInventoryItem.java
File metadata and controls
41 lines (33 loc) · 964 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
32
33
34
35
36
37
38
39
40
41
abstract class InventoryItem implements MobilePhone {
private String brand;
private String model;
private double price;
private String description;
private int quantity;
public InventoryItem(String brand, String model, double price, String description, int quantity) {
this.brand = brand;
this.model = model;
this.price = price;
this.description = description;
this.quantity = quantity;
}
public String getBrand() {
return brand;
}
public String getModel() {
return model;
}
public double getPrice() {
return price;
}
public String getDescription() {
return description;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public abstract double calculateTotalPrice(int quantity);
}