⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainclass.java

📁 A system to manage the competitions of the XXth Olympic Games.
💻 JAVA
字号:
import games.*;

public class MainClass {

	public static void main(String args[]) {

		OlympicGames games = new OlympicGames();

		games.addCompetition("Bobsleigh Four-Man",       "Cesana");
		games.addCompetition("Ladies' Downhill",         "San Sicario");
		games.addCompetition("Ladies's 15 km Classical", "Pragelato");

		// print out: 
		// San Sicario
		try {
			System.out.println(games.getVenue("Ladies' Downhill"));
		} catch (NoSuchCompetition e) {
			System.out.println(e.getMessage());
		}

		games.addAthlete("Ladies' Downhill", "Mary Jones",   34, "England");
		games.addAthlete("Ladies' Downhill", "Carla Moro",   12, "Italy");
		games.addAthlete("Ladies' Downhill", "Claire Benot", 75, "France");
		
		games.addAthlete("Ladies's 15 km Classical", "Claire Benot", 67, "France");
		
		// print out: 
		// Claire Benot (France)
		System.out.println(games.getName("Ladies' Downhill", 75));

		games.setTime("Ladies' Downhill", 12, 106);
		games.setTime("Ladies' Downhill", 34, 145);
		games.setTime("Ladies' Downhill", 75, 103);
		
		// print out:
		// Claire Benot (France), Carla Moro (Italy), Mary Jones (England)
		System.out.println(games.getOrder("Ladies' Downhill"));
		
		// print out:
		// 2		
		System.out.println(games.count("Claire Benot"));		
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -