1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lena [83]
3 years ago
15

Given main(), define the Team class (in file Team.java). For class method getWinPercentage(), the formula is:teamWins / (teamWin

s + 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.");}}}
Computers and Technology
1 answer:
lukranit [14]3 years ago
7 0

Answer:

Explanation:

public class Team {

   private String teamName;

   private int teamWins;

   private int teamLosses;

   public String getTeamName() {

       return teamName;

   }

   public void setTeamName(String teamName) {

       this.teamName = teamName;

   }

   public int getTeamWins() {

       return teamWins;

   }

   public void setTeamWins(int teamWins) {

       this.teamWins = teamWins;

   }

   public int getTeamLosses() {

       return teamLosses;

   }

   public void setTeamLosses(int teamLosses) {

       this.teamLosses = teamLosses;

   }

   public double getWinPercentage() {

       return teamWins / (double) (teamWins + teamLosses);

   }

}

You might be interested in
Which devices typically generate computer output ?
Andrews [41]
Monitor , printer , speaker , projector , keyboard etc
6 0
3 years ago
Read 2 more answers
Free coins who is octane and dont say u dont know because i will do the same to u
mart [117]

Answer:

Thank you for the free points.

8 0
3 years ago
Read 2 more answers
Which of the following best describes the difference between the domain and path of a URL?
Lana71 [14]

Answer:

the first choice

Explanation:

8 0
3 years ago
Please I need this answer now.<br>this is the fill in the blanks​
Nastasia [14]
Mother board

Because that’s where all the processing takes place
8 0
3 years ago
. In Laissez-faire Styleof Group Leadership, Members of the group are not given help inactivity plans by the leader only when it
Trava [24]

Answer:

The statement is false.

Explanation:

In Laissez-faire Style of group leadership, the members of the group are given all the responsibilities by the leader or the manager. The members of the group take all the decisions and control the working of the group. The manager provides with some guidance or support only when it is asked by the group members.

4 0
3 years ago
Other questions:
  • With network management software, a network manager can ____.
    6·1 answer
  • How do you add text to a blank slide layout?
    5·2 answers
  • Which method of the form passes data without appending the parameters to the url?
    5·1 answer
  • Web pages often have built-in connections, or links, to other documents, graphics, other web pages, or web sites. true or false?
    9·1 answer
  • What is NOT an issue associated with tag management systems? There is no automation available for tag management systems. Managi
    5·1 answer
  • How can a search be narrowed to only search a particular website????
    15·1 answer
  • Do you remember your first 3D movie experience? What was the movie, what was the experience like, and why was it memorable? (If
    7·1 answer
  • g How safe is to have a LinkedIn account where you have published all the important information about yourself
    13·2 answers
  • Define the term algorithm and describe how programmers use algorithms when designing a program.
    13·1 answer
  • What are the steps in preparing a bootable USB installer?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!