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 16:30
Which of the following statements best describes it careers?
Answers: 2
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
question
Computers and Technology, 23.06.2019 21:50
Description: write function lastfirst() that takes one argument—a list of strings of the format "lastname, firstname" —and returns a list consisting of two lists: (a) a list of all the last names (b) a list of all the first names
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
Mathematics, 21.06.2019 12:50
Questions on the website: 13722363