Question: in Java Exercise: - Create a class called BasketballTeam. - Create three private data fields. Teams name winning points losing points - Write a constructor
Exercise:
- Create a class called BasketballTeam.
- Create three private data fields.
Teams name
winning points
losing points
- Write a constructor with three parameters and sets the class properties to those values.
- Write another constructor that takes only the teams name, and set the winning points and losing points to 0. This constructor should call the first constructor.
- Create methods that return the Teams name, winning points, and losing points.
- Create a method to increase winning points by 1 and another method to increase losing points by one.
- Create a method named Record that returns Good Record when a team has more winning points than losing points.
- Write a test class called BasketballTeamScore.
Create a BasketballTeam named "AAU" with 6 wins and 8 losses.
Call the method that returns Good Record and print out the Score.
Now make four calls to the method that increases the winning points by 1, and one call to the method that increases the losing points by 1.
Call the Good Record method again and print out the Score.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
