Question: Can someone please help me with this and explain it? Thank you ! Task: 1.Write NBATeam class including the following components: a.private field : i.teamName;
Can someone please help me with this and explain it? Thank you !
Task:
1.Write NBATeam class including the following components:
a.private field :
i.teamName;
ii.NumberofWin;
iii.NumberofLoss;
b.constructors:
i.NBATeam (String s, int w, int l)
c.methods:
i.winAgame();
ii.lossAgame()
2.Write 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.Perform step above 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:
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.Perform step above 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
