-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShirt.java
More file actions
55 lines (40 loc) · 1.66 KB
/
Shirt.java
File metadata and controls
55 lines (40 loc) · 1.66 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
47
48
49
50
51
52
53
54
55
/**
* @author thomaswesley
* date: 3/13/26
* section: 331-002
*/
public class Shirt extends ClothingItem{
private String sleeve_type;
private String material;
/**
* @param itemID
* @param name
* @param price
* @param quantity
* @param brand
* @param size
* @param color
*/
public Shirt(int itemID, String name, double price, int quantity,String brand, double size, String color, String sleeve_type, String material){
super(itemID, name, price, quantity, brand, size, color);
this.sleeve_type = sleeve_type;
this.material = material;
}
public String getMaterial() {return this.material;}
public String getSleeve_type() {return this.sleeve_type;}
public void setMaterial(String material) {this.material = material;}
public void setSleeve_type(String sleeve_type) {this.sleeve_type = sleeve_type;}
@Override
public String toString(){
return String.format("ItemID: %d\t|\tName: %s\t|\tPrice: %.2f\t|\tQuantity: %d\t|\tBrand: %s\t|\tSize: %s\t|\tColor: %s\t|\tSleeve Type: %b\t|\tCategory: %s|",
getItemID(), getName(), getPrice(), getQuantity(), getBrand(), getSize(), getColor(), getSleeve_type(), getMaterial());
// return "ItemId" + this.getItemID() +
// "\nPrice" + this.getPrice() +
// "\nQuantity" + this.getQuantity() +
// "\nBrand" + this.getBrand() +
// "\nColor" + this.getColor() +
// "\nSize" + this.getSize() +
// "\nSleeve Type" + this.getSleeve_type() +
// "\n Material" + this.getMaterial();
}
}