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
Write an algorithm that receives a number from the user (you can store the number in a variable called N). Then the algorithm sh
lbvjy [14]

Answer:

Algorithm:

1. Declare an integer variable N.

2. Read the value N from user.

3.While(N):

 3.1 find r=N%10;

 3.2 print r in new line.

 3.3 Update N as N=N/10.

4.end program.

Implementation in C++.

// header

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variable

int N;

cout<<"Enter an Integer:";

   cin>>N;

// find the digits of number

   while(N)

   {

       // last digit

       int r=N%10;

       // print last digit

       cout<<r<<endl;

       // update the number

       N=N/10;

}

return 0;

}

Output:

Enter an Integer:329                                        

9                                                          

2                                                          

3

7 0
3 years ago
Kevin wants an application that will help him create a website as well as publish it. What application can he use?
AURORKA [14]

Answer:

D

Explanation:

Adobe Dreamweaver can hep him make a website and publish it.

3 0
3 years ago
Which phrase is the best definition of social media?
Nataly [62]

A. Media designed for sharing information and promoting social

interactions

8 0
2 years ago
The lcm of two numbers can be equal to the smallest number in the set. true false
jarptica [38.1K]

Answer: False

Explanation:

8 0
3 years ago
Read 2 more answers
Hiding/masking personal identifiers from a data set, so that the data set can never identify an individual, even if it is correl
Anettt [7]

Hiding/masking personal identifiers from a data set, so that the data set can never identify an individual, even if it is correlated with other data sets is known as anonymization.

<h3>What is anonymization?</h3>

The term anonymization is known as data masking and it is the standard solution in the case of data pseudonymisation. It is generally recognised by using masking and data is de- sensitised also that privacy could be maintained and private information remains safe for the support.

Data is generally identified by using masking and data is de- sensitised also that privacy could be maintained and private information remains safe for the support.

Therefore, Hiding/masking personal identifiers from a data set, so that the data set can never identify an individual, even if it is correlated with other data sets is known as anonymization.

Learn more about anonymization here:

brainly.com/question/4268168

#SPJ4

5 0
2 years ago
Other questions:
  • What do you call the number that is used as an index to pinpoint a specific element within an array?
    14·1 answer
  • Write a function that takes an array of integers and its size as parameters and prints the two largest values in the array. In t
    5·1 answer
  • A finally clause will execute:
    8·1 answer
  • Partes de la ventana principal de Microsoft excel 2013 con sus respectivas funciones
    14·1 answer
  • LAB: Plant information (ArrayList) Given a base Plant class and a derived Flower class, complete main() to create an ArrayList c
    6·1 answer
  • Interest on loan paid to sangam stores Rs5000(journal entry)​
    13·1 answer
  • How was data put into the Tabulating Machine?
    7·1 answer
  • 9.
    8·1 answer
  • Effective online learning method for students
    5·1 answer
  • KELLY Connect
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!