Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a program in java that accepts and stores data from any Winter Olympics.

ID: 656116 • Letter: C

Question

Create a program in java that accepts and stores data from any Winter Olympics. The program should accept and store up to 6 competitor names for each event as well as the name of the eventthey participated in. It should also sort the scores or times of the events showing the medal winners only withthe medal they won. Then create a class that will allow the user to use a GUI to view the data input in the first part of the assignment by clicking on the event in a drop down box that will show the medals award to the top three scores. Be sure to have input for at least 10 events.

Explanation / Answer

public class Country

{

private static String CountryName;

private static String event;

private static String score;

private static String gold;

private static String sliver;

private static String bronze;

private static String total medal;

public Country(String CountryName,String event,String score,String gold,String sliver,String bronze ,String total medal)

{

this.CountryName=CountryName;

this.event;=event;;

this. score= score;

this.gold=gold;

this.sliver=sliver;

this.bronze=bronze;

this.total medal=total medal;

}

public static String get CountryName()

{

return CountryName;

}

public static String get event()

{

return event;

}

public static String get score()

{

return score;

}

public static String get gold()

{

return gold;

}

public static String get sliver()

{

return sliver;

}

public static String get bronze()

{

return bronze

}

public static String get total medal()

{

return Countrytotal medal;

}

}

import java.io.*;

import java.util.*;

import java.io.PrintWriter;

public class Medal

{

ArrayList<country> contry;

public medal()

{

contry = new Arraylist<country>();

}

public void addEntry(country a)

{

contry.add(a);

}

public void write()throws java.io.IOException

{

FileWriter fw=new FileWriter("Winter Olympics",true);

PrintWriter pw=new PrintWriter(fw);

for(int in=0;in<contry.size;in++)

{

contry x=contry.get(in);

pw.println(x.getCountryName()+" "+x.getevent()+" "+x.getscore()+" "+x.getgold()+" "+x.getsliver()+" "+x.getbronze()+" "+x.gettotal medal()+" "+);

pw.close();

}

}

import java .io.IOException;

import java.util.Scanner;

public class Winter Olympics

{

private static String CountryName;

private static String event;

private static String score;

private static String gold;

private static String sliver;

private static String bronze;

private static String total medal;

public static void main(String[] args)

{

Scanner ws=new Scanner(System.in);

WinterOlympics tally=new WinterOlympics();

int;

for(i=1;i<=10;i++)

{

System.out.println("Total Number of Medals+",total medal);

}

}

}

public static void printOptions()

{

System.out.println("CountryName");

System.out.println("medal");

System.out.println("score");

System.out.println("gold");

System.out.println("sliver");

System.out.println("bronze");

System.out.println("save file");

System.out.println("exit");

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote