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]
4 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]4 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
In the ADT graph, the method addEdge has efficiency
Tanzania [10]

Answer:

B.O(n).

Explanation:

In an ADT graph the method addEdge uses an Array of list.So in the worst case and the worst will be when the list already has n elements in it.

So to add an edge we have to iterate over the list upto nth element and then add the edge after that.So it has to travel over n elements.

So we can say that the answer is O(n).

3 0
3 years ago
Which of the following correctly declares an array:
AleksandrR [38]

Answer:

a.

Explanation:

6 0
3 years ago
If several programs or apps are running simultaneously, your computer or device might use up its
kirill [66]

Answer: I am pretty sure it's RAM

Explanation:

I'm not 100% positive bc I haven't gotten my scores back yet but I think that's it.

7 0
3 years ago
Big Bob's Construction has many construction sites where computers are located. At the remote sites, Internet connectivity can b
Sergio039 [100]

Answer:

WAN or wide area network using satellite

Explanation:

A WAN or wide area network is a network of local area networks that could span beyond a geographical region.

For a network administrator to manage the remote construction site, a stable network connection should be established using a wireless medium like a satellite to connect the site's network to the office network.

8 0
3 years ago
What feature of modern productivity tools makes it possible for files created in one software product to be opened in another so
aksik [14]

Answer:

File-exchange compatibility.

Explanation:

File exchange compatibility is the aspect of modern productivity apps that allows files generated in a software package to also be accessed from another software product.

In other words, it is that type of feature by which the user creates any file in his desktops software then that file is also compatible with another desktop or any other software also.

6 0
3 years ago
Other questions:
  • The strength of the electromagnetic waves being radiated from an antenna is referred to as gain, which involves a measurement of
    9·1 answer
  • "if you add text, delete text, or modify text on a page, word recalculates the location of automatic page breaks and adjusts the
    15·2 answers
  • What is an example of a functional organizational structure?
    10·2 answers
  • To keep you from inadvertently moving controls as you work in the IDE, click the form or control, then click the _________ optio
    13·1 answer
  • You cannot legally install macOS on a PC that originally came with Windows<br> True or false
    13·2 answers
  • A particular problem is currently not able to be practically solved by using an algorithm. Which of the following statements abo
    13·2 answers
  • What is a algorithm
    6·1 answer
  • What is the common term used to describe a single computer document?
    15·2 answers
  • Software that allows users to use and adapt it for any purpose, often allowing the public to participate in further development
    7·2 answers
  • What is contained in the Open Files section of Shared Folders? ​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!