Question: oks My library > CSC 2 4 9 : Data Structure and Algorithms home > 2 . 2 5 : LAB: Winning team ( classes

oks My library > CSC 249: Data Structure and Algorithms home >2.25: LAB: Winning team (classes)
zyBooks catalog
Help/FAQ
Komla Mer
2.25 LAB: Winning team (classes)
Given main(), define the Team class (in file Team.java). For class method getWinPercentage(), the formula is:
wins /(wins + losses). Note: Use casting to prevent integer division.
For class method printStanding 0, output the win percentage of the team with two digits after the decimal point and whether the team has a winning or losing average. A team has a winning average if the win percentage is 0.5 or greater.
Ex: If the input is:
Ravens
13
3
Where Ravens is the team's name, 13 is the number of team wins, and 3 is the number of team losses, the output is:
Win percentage: 0.81
Congratulations, Team Ravens has a winning average!
Ex: If the input is:
the output is:
Win percentage: 0.49
Team Angels has a losing average.
522026.3926526 q x3zqy7
LAB
2.25.1: LAB: Winning team (classes)
010
ACTIVITY
 oks My library > CSC 249: Data Structure and Algorithms home

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!