4. The Olympics will begin this summer and several countries will clamor to find
ID: 3665654 • Letter: 4
Question
4. The Olympics will begin this summer and several countries will clamor to find out who will win the medal count. However, there are two ways of scoring the games. The first way is called the "American" method. In this method the scoring is based on the number and type of medals a country has won. Gold medals count the most, silver is used to break ties and finally bronze medals are looked at if a country has the same number of gold and silver. Several countries (who usually score fewer gold medals) use the Canadian" method of scoring instead of the "American" method. Using the "Canadian" method the total number of overall medals determines the winner of the Olympics. Write a Java program that a computes the medal winner for the Olympic Games. Do the following: Ask the user what scoring method they would like to use to score the Olympics (a character) Prompt the user for the number of countries competing in the current Olympics. Read in the country names and their medal count. Print out the name of the winning country. In case of a tie, print out the winning countries in input order Error check. Output should look similar to below. Sample Runs: Please enter the scoring method. A)merican or C) anadian a Number of countries competing? 3 Please enter country and medal count Germany 3 2 1 Please enter country and medal count America 2 3 1 Please enter country and medal count Canada 12 4 The winner is: Germany with 3 gold medals. 2 silver medals, 1 bronze medal Please enter the scoring method. A)merican or C)anadian C Number of countries competing? 3 Please enter country and medal count Germany 3 2 1 Please enter country and medal count America 2 3 1 Please enter country and medal count canada 1 2 4 The winner is: Canada with 1 gold medal, 2 silver medals, 4 bronze medals Name the program: Olympic Medals java, where XX are your initialsExplanation / Answer
OlympicMedals.java
AbstractDocument.java
City.java
Continent.java
Country.java
Ocean.java
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.