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
The fill command try’s to fill or generate content for cells based on a ________.
natta225 [31]

Answer: Ctrl + R

Explanation:

Ctrl+ R is the shortcut for filling right, you will first highlight cells.

5 0
3 years ago
What happens when a filter is applied to a database?
Genrish500 [490]
Hello there.

<span>What happens when a filter is applied to a database?

</span><span>Some records are permanently removed from the database.
</span>
5 0
3 years ago
Listen Listen with ReadSpeaker Because an IDLE itself runs in a thread, it is not generally a good idea to test a multithreaded
sdas [7]

Because an IDLE itself runs in a thread, it is not generally a good idea to test a multithreaded application in that environment. is a true statement.

<h3>What is a multithreaded application?</h3>

A multi-threaded application is known to be a kind of  application that is made up of structure which make use of the multi-threading that is given by the operating system.

Note that due to the fact that an IDLE itself runs in a thread, it is not is said to be a good idea to test a multithreaded application in that environment as one can be able top get a good result.

Learn more about IDLE from

brainly.com/question/13575836

#SJ1

8 0
2 years ago
What is the difference between Windows 7 and Windows 10?
Tanzania [10]
Windows 10 is new and windows 7 is old
6 0
3 years ago
Port explorers ​are tools used by both attackers and defenders to identify (or fingerprint) the computers that are active on a
Evgesh-ka [11]

Answer:

b) False.

Explanation:

Port explorers ​are tools used by both attackers and defenders to identify (or fingerprint) the computers that are active on a network, as well as the ports and services active on those computers, the functions and roles the machines are fulfilling, anAn IDPS can be configured to dial a phone number and produce an alphanumeric page or other type of signal or message., is a FALSE statement.

5 0
3 years ago
Other questions:
  • A network engineer arrives at work and discovers that many users are having problems when attempting to connect to the company n
    9·2 answers
  • Suppose we are comparing implementations of insertion sort and merge sort on the same machine. for inputs of size n, insertion s
    10·1 answer
  • In python:
    8·1 answer
  • Which of the following payment types require you to pay upfront?
    9·1 answer
  • Differences between the first four generations of computers​
    12·1 answer
  • Which software development team memeber is responsible for the timeline and budget
    9·1 answer
  • Assignment 1 is to write a program that will write the lyrics to "X number of beers on the wall". Use only the main method. Prom
    11·1 answer
  • ¿Cómo afecta negativamente a las relaciones familiares el uso de la tecnología?
    7·1 answer
  • Why do we buy new asset​
    6·1 answer
  • The specialized programs used by the operating systems to help ensure that memory is used properly and there are no memory confl
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!