Question: Task: 1. Write a NBATeam class including the following components: a. private field : i. teamName; ii. NumberofWin; iii. NumberofLoss; b. constructors: i. NBATeam (String


Task: 1. Write a NBATeam class including the following components: a. private field : i. teamName; ii. NumberofWin; iii. NumberofLoss; b. constructors: i. NBATeam (String s, int w, int 1) c. methods: i. winAgame(); ii. lossAgame() 2. Write a NBA class with main method to: a. Create two teams: heat, spurs b. Generate a random number and if the number is bigger than 0.5, then heat wins over spurs; otherwise spurs win c. Do above step 3 times and then print out the win/loss of each team 3. Modify a NBATeam Class to add the following method: a. winAgame(NBATeam teamB) b. lossAgame(NBATeam teamB) 4. Add toString() method to the NBATeam class and modify the main method in NBA class to do the following:4. Add toStringO method to the NBATeam class and modify the main method in NBA class to do the following: a. Create two teams: heat, spurs b. Generate a random number and if the number is bigger than 0.5, then heat wins over spurs; otherwise spurs win c. Do above step 3 times and then print out the win/loss of each team
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
