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, 21.06.2019 20:20
Wireless communications is likely to be viewed as an essential part of an enterprise network infrastructure when: select one: a. mobile communication is needed b. communication facilities must be installed at low initial cost c. communication must take place in a hostile or difficult terrain that makes wired communication difficult or impossible d. the same information must be broadcast to many locations
Answers: 1
question
Computers and Technology, 22.06.2019 04:00
Chloe is building a kiosk-based excel application. she wants to make some modifications to the screen elements in order to keep users from being distracted by parts of the application that are irrelevant to her application. she turns to henry for guidance as she knows he built a similar solution earlier this year.chloe has decided to hide the worksheet gridlines and the vertical scroll bar. what does henry tell her to use to do this? a) screen elements dialog boxb) display options dialog boxc) customization dialog boxd) excel options dialog box
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
The great length of north america causes the climate to be varied. true false
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
You know the right answer?
Given main(), define the Team class (in file Team. java). For class method getWinPercentage(), the f...
Questions
question
Mathematics, 11.10.2021 14:00
question
Mathematics, 11.10.2021 14:00
question
Mathematics, 11.10.2021 14:00
question
History, 11.10.2021 14:00
question
Mathematics, 11.10.2021 14:00
question
Mathematics, 11.10.2021 14:00