Question: Create a BasketballScore class ( saved in BasketballScore.java ) with three fields: the location, the home team's score and the visiting team's score. A default
Create a BasketballScore class saved in BasketballScore.java with three fields: the location, the home team's score and the visiting team's score. A default constructor should set both scores to zero and set the location to Avondale. An overload constructor should accept values for all three fields and assign them appropriately. Provide get methods for both score fields. The class should also include addHomeScore and addVisitorScore methods. Each should use a parameter for the amount to add, which is then added to the appropriate field. For example, passing to addVisitorScore should add two points to the visiting team's total.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
