subject
Computers and Technology, 10.06.2020 21:57 babyj93

Given main(), define the Team class (in file Team. java). For class method getWinPercentage(), the formula is:teamWins / (teamWins + teamLosses)Note: Use casting to prevent integer division. Ex: If the input is:Ravens133 where Ravens is the team's name, 13 is number of team wins, and 3 is the number of team losses, the output is:Congratulations, Team Ravens has a winning average!If the input is Angels 80 82, the output is:Team Angels has a losing average. Here is class WinningTeam:import java. util. Scanner;public class WinningTeam {public static void main(String[] args) {Scanner scnr = new Scanner(System. in);Team team = new Team();String name = scnr. next();int wins = scnr. nextInt();int losses = scnr. nextInt();team. setTeamName(name);team. setTeamWins(wins);team. setTeamLosses(losses);if (team. getWinPercentage() >= 0.5) {System. out. println("Congratulations, Team " + team. getTeamName() +" has a winning average!");}else {System. out. println("Team " + team. getTeamName() +" has a losing average.");}}}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
question
Computers and Technology, 23.06.2019 09:00
Which company provides a crowdsourcing platform for corporate research and development? a: mtruk b: wiki answers c: mediawiki d: innocentive
Answers: 2
You know the right answer?
Given main(), define the Team class (in file Team. java). For class method getWinPercentage(), the f...
Questions
question
Social Studies, 11.02.2021 23:20
question
Arts, 11.02.2021 23:20
question
Mathematics, 11.02.2021 23:20
question
Mathematics, 11.02.2021 23:20
Questions on the website: 13722363