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
Example of vector image format​
emmasim [6.3K]

Answer:

JPEGs, GIFs and PNGs are common raster image types. ...

Vector images, alternatively, allow for more flexibility. Constructed using mathematical formulas rather than individual colored blocks, vector file types such as EPS, AI and PDF* are excellent for creating graphics that frequently require resizing.

7 0
3 years ago
A ____________ is a set of commands which can be run by calling it by name. (Phyton)
Lerok [7]

Answer: script

Explanation:

I haven't done much Computer Science in whichever subject this is, but I'm sure a script is a series of commands!

7 0
3 years ago
Read 2 more answers
_ is a model of computing in which computer processing, storage, software, and other services are provided as a shared pool of v
Jet001 [13]

Answer:

Cloud computing is the correct answer of this question.

Explanation:

Cloud computing presents a easy way of consuming databases, servers, repositories and a vast variety of web technology infrastructure.Cloud computing allows that can save considerable construction costs without relying on internal server resources and device requirements.Cloud computing is the provision of various resources over the Web.

8 0
3 years ago
Which are among the ways you can use bitlocker encryption? (choose all that apply?
igor_vitrenko [27]
There is a lot of ways that you can use the bit locker encryption. Some are when you are authenticating your computer using a TPM. Or when you are authenticating your account using a USB Flash drive, and most on the phones authentication through text messages and all.
3 0
4 years ago
What is the difference between being an affiliate and an independent station ?what are the benefits to being an affiliate
katen-ka-za [31]

Answer:

So the difference is one does its own thing the other is someone who is working with another.The benifits are that if it is something good done you both get the reward the bad part is that if its bad then you both get in trouble for it.

Explanation:I hope this helps

6 0
3 years ago
Other questions:
  • 1. Customizable diagrams, including List, Process, and Cycle diagrams, are built into Word and can be found in
    15·2 answers
  • After earning a learners license what test must be successfully passed to earn an operators license in Florida
    14·1 answer
  • Which statement is true
    12·1 answer
  • Pretend that you are Ana’s co-worker, what constructive advice would you give Ana about her on-the-job actions?
    10·2 answers
  • consider a group of 30 people who wish to establish pair-wise secure communications using symmetric-key cryptography. How many K
    15·1 answer
  • To obtain the desired speedup, make sure your new function recursively calls itself no more than once in the body of the method.
    8·1 answer
  • A worksheet can have a maximum of number of rows​
    11·2 answers
  • Lyla is writing a program that uses a recursive method. Why might she want to use a recursive helper method?
    8·1 answer
  • V. ASSESSMENT (Time Frame:
    7·1 answer
  • Write a program to find a perimeter of rectangle using SUB.. ..End SUB​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!