In this exercise, you will write a class that models a band booster and use your class to update sales of band candy.
BandBooster
class assuming a band booster object is
described by two pieces of instance data: name (a String) and boxesSold
(an integer that represents the number of boxes of band candy the booster
has sold in the band fundraiser). Each instance data declaration must be private and have an explanatory in-line comment. If you'd like to know a bit more about private instance variables, see this help page. The class should have the following methods:
Joe: 16 boxesIf the BandBooster has sold only one box, then the output should end in "box", not "boxes":
Matt: 1 boxYou can use an if statement for this.
Enter the number of boxes sold by Joe this week:For each member, after reading in the weekly sales, invoke the updateSales method to update the total sales by that member.
NAME SALES Able: 3 boxes Joe: 24 boxes Matt: 1 box