/* 「授業表」の定義 */

// 入出力関連パッケージの利用を宣言する

public class ClassTable{

	int no;		// 属性１・時限
	String subject; // 属性２・科目名
	String room;	// 属性３・教室名
	
	/* メソッド１・属性の値を表示する */
	public void showData(){
	
		System.out.print("時限：");
		System.out.println(no);		// 「時限」の値を表示して改行		
		System.out.print("科目名：");
		System.out.println(subject);	// 「科目名」の値を表示して改行			
		System.out.print("教室名");
		System.out.println(room);	// 「教室名」の値を表示して改行
		
	}
	 
	/* メソッド２・属性の値を入力する */
	public void inputData( BufferedReader reader )throws Exception{
		try{
			System.out.print("時限；");	// ユーザーに入力の対象を示す
			// 「時限」の値を入力する
			System.out.print("科目名；");
			// 「科目名」の値を入力する
			System.out.print("教室名；");
			// 「教室名」の値を入力する
		}// エラーが発生したらエラーメッセージを示しプログラムを終了する
		catch(Exception e){System.out.println("エラーが発生したのでプログラムを終了します");}
	}
}

// 第４講その２（２）			