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
Jane wishes to forward X-Windows traffic to a remote host as well as POP3 traffic. She is worried that adversaries might be moni
chubhunter [2.5K]

Answer:

She can the following tool to protect the link:

Secure Socket Shell

Explanation:

Secure Socket Shell:

It is also known as secure shell and has short form SSH. A method that is used to secure the communication over the unprotected network. This network protocol was introduced in 1995 and its most common use include the managing of different systems as the network administrator can execute different commands remotely.

In our question, Jane can use Secure socket shell in order to communicate the information to the remote end without being monitored by the adversaries.

8 0
4 years ago
Which command is used to encrypt all passwords in a router configuration file?
Veseljchak [2.6K]

Answer:

Service Password encryption

Explanation:

It is noted that the command used on routers, to get the data of all the passwords in a router configuration file encrypted is the service password encryption.

Service password encryption solely affects plain text passwords types that includes that of the line passwords or that of the enable password. The feature uses a simple substitution method to create a "secure" non-text password displayed in the configuration.

8 0
3 years ago
If a star system 30 parsecs distant is found to be broadcasting intelligent radio signals, then their news is already approximat
IrinaK [193]

Answer:

97.85 years, approximately.

Explanation:

Light travels at a <em>constant</em> speed of 186,000 mi/seg or 300,000km/seg accross the Universe (in vacuum conditions). Radio waves are also part of the electromagnetic spectrum, and they also travel at the same speed as Light does.

A light-year is a measure of the distance that Light travels during a year, that is,  5.88 trillion miles. Light travels the same distance per year because its speed is <em>constant</em>, and this is an excellent property that scientists take advantage to measure distances.

A parsec is 3.26 light-years (19 trillion miles), and (a very important datum to solve this question) one light-year is 0.306601 parsec, that is, in a year Light travels 0.306601 parsec at a <em>constant</em> speed. The same would happen with intelligent radio signals broadcasted from a distant star system.

So, considering all these facts, it is a matter of proportions to solve this question (mostly because speed of Light is constant):

\frac{1 year}{0.306601 parsec} = \frac{X years}{30 parsecs}

x =\frac{1 year * 30 parsec}{0.306601 parsec}

x = \frac{30}{0.306601} years

x = 97.84704 years or,

x = 97.85 years, approximately.

In other words, Light spends 97.85 years (terrestials) to travel 30 parsecs.

Likewise, radio waves travel at the same speed, so they spend the same years (97.85 years) travelling across the Universe to be finally detected by a radiotelescope located, for instance, here, in our planet.

Finally,  the star system broadcasted intelligent radio signal with 'news' that are already approximately 97.85 years old'.

6 0
3 years ago
The best way to ensure the accuracy and safety of your accounts is to:
Gekata [30.6K]
Use symbols and a different password for each one

6 0
3 years ago
Write a program that could find whether the number entered through keyboard is odd or even the program should keep on taking the
natulia [17]

Answer:

using namespace std;

int main() {

int number;

while (1) {

 cout << "Enter a number: ";

 cin >> number;

 cout << number << " is " << ((number % 2) ? "odd" : "even") << endl;

};

return 0;

}

Explanation:

This is a c++ version. Let me know if you need other languages.

The (number % 2) is the essence of the program. It returns 0 for even numbers, and 1 for odd numbers (the remainder after division by 2).

7 0
4 years ago
Other questions:
  • I have Mac(the last version installed) and I use Wine (application for using windows files, programmes on mac) but I have some p
    6·1 answer
  • Using a for loop, print the decimal equivalents of ½, 1/3, ¼, … 1/10. Also, using a while loop, print the decimal equivalents of
    6·1 answer
  • You've just purchased 10 new notebook systems for your users. You are concerned that users will leave the systems on for long pe
    10·1 answer
  • Zac works in the robotics industry. He assists in assembling robots. He also carries out regular inspections at industries that
    10·2 answers
  • c++ Project 6: Buoyancy. Buoyancy is the ability of an object to float. Archimedes’ principle states that the buoyant force is e
    13·1 answer
  • John works for Internal Computer Specialists, which focuses on helping small business owners resolve MIS infrastructure issues.
    14·1 answer
  • Small data files that are deposited on a user's hard disk when they visit a website are called _______.
    6·2 answers
  • What is the best way to show a complex data chart in word?
    6·1 answer
  • What type of address uses a number that uniquely identifies each computer?
    6·2 answers
  • Jjgdg gegg tget t446v
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!