lab 4
This commit is contained in:
21
labs/lab4/BandBooster.java
Normal file
21
labs/lab4/BandBooster.java
Normal file
@ -0,0 +1,21 @@
|
||||
public class BandBooster {
|
||||
private String name;
|
||||
private int boxesSold;
|
||||
|
||||
public BandBooster (String name) {
|
||||
this.name = name;
|
||||
this.boxesSold = 0;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void updateSales (int addBox) {
|
||||
boxesSold = boxesSold + addBox;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return name + " sold: " + boxesSold + " boxes!";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user