亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? srs.java

?? 學生注冊系統SRS 允許學生在線注冊每學期的課程并記錄學位完成的進度
?? JAVA
字號:
// SRS.java - Chapter 14, Java 5 version.

// Copyright 2005 by Jacquie Barker - all rights reserved.

// The main driver for the command-line driven version of the SRS.


import java.util.ArrayList;

public class SRS {
	// We can effectively create "global" data by declaring
	// collections of objects as public static attributes in 
	// the main class; these can then be accessed throughout the
	// SRS application as:  SRS.collectionName; e.g., SRS.faculty.  

	public static ArrayList<Professor> faculty; 
	public static ArrayList<Student> studentBody; 
	public static ArrayList<Course> courseCatalog; 

	// The next collection -- of Section object references -- is encapsulated 
	// within a special-purpose class by virtue of how we modeled the SRS in UML; 
	// note that we could have encapsulated the preceding three collections in 
	// similar fashion, and will in fact do so in Chapter 15.

	public static ScheduleOfClasses scheduleOfClasses = 
		      new ScheduleOfClasses("SP2005");
	
	public static void main(String[] args) {
		Professor p1, p2, p3;
		Student s1, s2, s3;
		Course c1, c2, c3, c4, c5;
		Section sec1, sec2, sec3, sec4, sec5, sec6, sec7;

		// Create various objects by calling the appropriate 
		// constructors.  (We'd normally be reading in such data
		// from a database or file ...)

		// -----------
		// Professors.
		// -----------

		p1 = new Professor("Jacquie Barker", "123-45-6789", 
				   "Adjunct Professor", "Information Technology");		

		p2 = new Professor("John Smith", "567-81-2345",
				   "Full Professor", "Chemistry");		

		p3 = new Professor("Snidely Whiplash", "987-65-4321",
				   "Full Professor", "Physical Education");		

		// Add these to the appropriate ArrayList.

		faculty = new ArrayList<Professor>();
		faculty.add(p1);
		faculty.add(p2);
		faculty.add(p3);

		// ---------
		// Students.
		// ---------
		
		s1 = new Student("Joe Blow", "111-11-1111", "Math", "M.S.");

		s2 = new Student("Fred Schnurd", "222-22-2222", 
				 "Information Technology", "Ph. D.");

		s3 = new Student("Mary Smith", "333-33-3333", "Physics", "B.S.");

		// Add these to the appropriate ArrayList.

		studentBody = new ArrayList<Student>();
		studentBody.add(s1);
		studentBody.add(s2);
		studentBody.add(s3);

		// --------
		// Courses.
		// --------
		
		c1 = new Course("CMP101",
				"Beginning Computer Technology", 3.0);

		c2 = new Course("OBJ101", 
				"Object Methods for Software Development", 3.0);

		c3 = new Course("CMP283", 
				"Higher Level Languages (Java)", 3.0);

		c4 = new Course("CMP999",
				"Living Brain Computers", 3.0);

		c5 = new Course("ART101",
				"Beginning Basketweaving", 3.0);

		// Add these to the appropriate ArrayList.

		courseCatalog = new ArrayList<Course>();
		courseCatalog.add(c1);
		courseCatalog.add(c2);
		courseCatalog.add(c3);
		courseCatalog.add(c4);
		courseCatalog.add(c5);

		// Establish some prerequisites (c1 => c2 => c3 => c4).

		c2.addPrerequisite(c1);
		c3.addPrerequisite(c2);
		c4.addPrerequisite(c3); 

		// ---------
		// Sections.
		// ---------

		// Schedule sections of each Course by calling the
		// scheduleSection method of Course (which internally
		// invokes the Section constructor). 

		sec1 = c1.scheduleSection('M', "8:10 - 10:00 PM", "GOVT101", 30);

		sec2 = c1.scheduleSection('W', "6:10 - 8:00 PM", "GOVT202", 30);

		sec3 = c2.scheduleSection('R', "4:10 - 6:00 PM", "GOVT105", 25);

		sec4 = c2.scheduleSection('T', "6:10 - 8:00 PM", "SCI330", 25);

		sec5 = c3.scheduleSection('M', "6:10 - 8:00 PM", "GOVT101", 20);

		sec6 = c4.scheduleSection('R', "4:10 - 6:00 PM", "SCI241", 15);
		
		sec7 = c5.scheduleSection('M', "4:10 - 6:00 PM", "ARTS25", 40);
		
		// Add these to the Schedule of Classes.

		scheduleOfClasses.addSection(sec1);
		scheduleOfClasses.addSection(sec2);
		scheduleOfClasses.addSection(sec3);
		scheduleOfClasses.addSection(sec4);
		scheduleOfClasses.addSection(sec5);
		scheduleOfClasses.addSection(sec6);
		scheduleOfClasses.addSection(sec7);

		// Recruit a professor to teach each of the sections.

		p3.agreeToTeach(sec1);
		p2.agreeToTeach(sec2);
		p1.agreeToTeach(sec3);
		p3.agreeToTeach(sec4);
		p1.agreeToTeach(sec5);
		p2.agreeToTeach(sec6);
		p3.agreeToTeach(sec7);

		System.out.println("===============================");
		System.out.println("Student registration has begun!");
		System.out.println("===============================");
		System.out.println();

		// Simulate students attempting to enroll in sections of
		// various courses.

		System.out.println("Student " + s1.getName() + 
				   " is attempting to enroll in " +
				   sec1.toString());

		EnrollmentStatus status = sec1.enroll(s1);
		reportStatus(status);

		// Note the use of a special "housekeeping" method above, reportStatus(), 
		// to interpret and display the outcome of this enrollment request.
		// We could have combined the preceding two lines with
		// a single line instead, as follows:
		//
		//	reportStatus(sec1.enroll(s1));
		//
		// And, since the println() call just above that is also going to
		// be repeated multiple times, we could have combined ALL THREE 
		// LINES of code into a SINGLE line as follows:
		//
		//      attemptToEnroll(s1, sec1);
		// 
		// by writing a more elaborate "housekeeping" method, attemptToEnroll().
	 	// We will, in fact, do so, and will use the more concise syntax for the 
		// remainder of this program.

		// Try concurrently enrolling the same Student in a different Section
		// of the SAME Course!  This should fail.

		attemptToEnroll(s1, sec2);

		// This enrollment request should be fine ...

		attemptToEnroll(s2, sec2);

		// ... but here, the student in question hasn't satisfied the
		// prerequisities, so the enrollment request should be rejected.

		attemptToEnroll(s2, sec3);

		// These requests should both be fine. 

		attemptToEnroll(s2, sec7);
		attemptToEnroll(s3, sec1);

		// When the dust settles, here's what folks wound up
		// being SUCCESSFULLY registered for:
		//
		// sec1:  s1, s3
		// sec2:  s2
		// sec7:  s2

		// Semester is finished (boy, that was quick!).  
		// Professors assign grades for specific students.

		sec1.postGrade(s1, "C+");
		sec1.postGrade(s3, "A");
		sec2.postGrade(s2, "B+");
		sec7.postGrade(s2, "A-");
	
		// Let's see if everything got set up properly
		// by calling various display() methods.
		
		System.out.println("====================");
		System.out.println("Schedule of Classes:");
		System.out.println("====================");
		System.out.println();
		scheduleOfClasses.display();

		System.out.println("======================");
		System.out.println("Professor Information:");
		System.out.println("======================");
		System.out.println();
		p1.display();
		p2.display();
		p3.display();

		System.out.println("====================");
		System.out.println("Student Information:");
		System.out.println("====================");
		System.out.println();
		s1.display();
		s2.display();
		s3.display();
	}

	// Note that this is a private static housekeeping method ...

	private static void reportStatus(EnrollmentStatus s) {
		System.out.println("Status:  " + s.value());
		System.out.println();
	}

	// ... as is this.

	private static void attemptToEnroll(Student s, Section sec) {
		System.out.println("Student " + s.getName() + 
				   " is attempting to enroll in " +
				   sec.toString());

		// Utilize one housekeeping method from within another!
		reportStatus(sec.enroll(s));
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲人成人精品| 亚洲制服丝袜一区| 亚洲精品伦理在线| 国产高清无密码一区二区三区| 91黄色在线观看| 国产精品免费丝袜| 国产一区视频网站| 91精品国产入口在线| 一区二区在线观看不卡| 国产美女久久久久| 欧美欧美午夜aⅴ在线观看| 亚洲天堂2014| 国产99久久久国产精品免费看 | 爽好久久久欧美精品| 成人污污视频在线观看| 亚洲精品一区在线观看| 日本成人在线电影网| 欧美日韩另类一区| 亚洲一区中文在线| 日本久久电影网| 亚洲色图另类专区| 91在线porny国产在线看| 国产精品网友自拍| 国产成人激情av| 久久精品水蜜桃av综合天堂| 国产伦精品一区二区三区在线观看| 91精品蜜臀在线一区尤物| 亚洲成人av中文| 在线免费观看成人短视频| 亚洲精品欧美在线| 色乱码一区二区三区88| 一区二区三区加勒比av| 色94色欧美sute亚洲线路一久| 国产精品福利在线播放| 99国产精品国产精品毛片| 国产精品无码永久免费888| 国产成a人亚洲精| 国产精品久久久久影院老司 | 日韩高清一级片| 色美美综合视频| 亚洲自拍欧美精品| 欧美人狂配大交3d怪物一区| 免费观看30秒视频久久| 欧美不卡一二三| 成人综合婷婷国产精品久久| 国产精品国产自产拍在线| 91在线无精精品入口| 亚洲综合视频网| 欧美一区二视频| 激情综合网最新| 亚洲欧洲精品一区二区三区 | 国产精品一二三四| 中文字幕在线不卡一区二区三区 | 亚洲欧美日本在线| 欧美天堂一区二区三区| 美女视频黄频大全不卡视频在线播放| 精品粉嫩aⅴ一区二区三区四区| 国产成人免费视频一区| 亚洲黄色av一区| 欧美va在线播放| 91网上在线视频| 美日韩黄色大片| 国产精品久久免费看| 欧美三级视频在线| 国产美女主播视频一区| 一区二区三区成人| 精品国产一二三| 在线亚洲免费视频| 国产乱人伦精品一区二区在线观看 | 国产日韩欧美精品电影三级在线| 99久久精品国产毛片| 免费人成精品欧美精品| 亚洲欧美色图小说| 久久夜色精品一区| 欧美日韩国产综合一区二区三区| 国产精品一区二区久久不卡 | 亚洲国产精品激情在线观看| 色屁屁一区二区| 国产剧情一区在线| 日韩精品国产精品| 一区二区三区四区中文字幕| 精品久久一区二区三区| 欧美日韩国产综合草草| 成人av第一页| 国产精品一区二区久久不卡| 日韩高清不卡在线| 亚洲午夜在线视频| 国产精品久久99| 精品久久久久av影院| 欧美日韩国产片| 一本色道久久综合亚洲91| 国产成人在线网站| 麻豆精品国产传媒mv男同| 亚洲国产综合91精品麻豆| 中文字幕久久午夜不卡| 欧美精品一区二区三区蜜桃| 欧美日韩日日摸| 91在线porny国产在线看| 国产成人丝袜美腿| 国产一区久久久| 久久99国产精品免费网站| 天天亚洲美女在线视频| 亚洲a一区二区| 一区二区三区四区亚洲| 亚洲欧美日韩在线播放| 国产精品国产三级国产aⅴ中文 | 亚洲视频狠狠干| 亚洲国产精品精华液2区45| ww久久中文字幕| 久久久久久夜精品精品免费| 精品国产乱码久久久久久1区2区 | 高清不卡一区二区在线| 久久99精品国产麻豆婷婷洗澡| 日韩电影在线免费观看| 免费视频一区二区| 久久99最新地址| 国产又黄又大久久| 国产激情偷乱视频一区二区三区| 国产一区二区精品久久91| 韩日av一区二区| 国产精品一区二区久激情瑜伽| 国产精品99久久久久久久女警| 国产精品1区2区| www.av亚洲| 欧美性猛交一区二区三区精品| 欧美性受极品xxxx喷水| 欧美一区二区三区人| 久久久久久久综合日本| 国产精品久久国产精麻豆99网站| 亚洲欧美成aⅴ人在线观看| 亚洲电影一区二区三区| 日产国产高清一区二区三区| 捆绑调教美女网站视频一区| 国产激情精品久久久第一区二区| 成人免费视频视频| 欧美三级电影网站| 精品国产一区二区三区忘忧草| 国产欧美日韩视频在线观看| 亚洲激情中文1区| 日本在线观看不卡视频| 国产成人自拍在线| 欧美调教femdomvk| 久久精品这里都是精品| 亚洲同性同志一二三专区| 日韩高清不卡一区二区三区| 国产精品亚洲成人| 在线观看日产精品| 久久久久国产精品厨房| 亚洲精品中文字幕乱码三区| 美腿丝袜一区二区三区| 成a人片亚洲日本久久| 9191久久久久久久久久久| 国产亲近乱来精品视频| 亚洲高清免费观看高清完整版在线观看 | 欧美丝袜丝交足nylons图片| 精品国产欧美一区二区| 一区二区三区资源| 国产盗摄视频一区二区三区| 欧美日韩精品欧美日韩精品一 | 91成人免费在线视频| 精品国产一区二区三区久久影院| 亚洲精品乱码久久久久| 国产精品一区二区视频| 欧美人与z0zoxxxx视频| 1024成人网| 国产一区二区在线观看视频| 欧美日韩一区不卡| 国产精品全国免费观看高清| 麻豆精品一二三| 精品视频一区三区九区| 亚洲婷婷在线视频| 高清av一区二区| 精品成人佐山爱一区二区| 亚洲成人精品影院| 色婷婷狠狠综合| 国产精品国产三级国产aⅴ原创| 精品一区二区三区在线播放| 91麻豆精品国产自产在线| 一区二区免费在线播放| 91丨porny丨最新| 亚洲欧洲精品一区二区三区| 国产成人日日夜夜| 久久久久国产一区二区三区四区 | 久久亚区不卡日本| 美女爽到高潮91| 91精品国产丝袜白色高跟鞋| 亚洲一区二区三区四区的| 91网站黄www| 亚洲乱码国产乱码精品精小说 | 国产一区二区在线影院| 日韩精品专区在线| 免费视频最近日韩| 欧美成人一区二区三区| 久久99久久久久| 精品黑人一区二区三区久久| 久久精品99国产精品| 日韩欧美在线一区二区三区| 日韩电影免费一区| 3atv一区二区三区| 久久成人久久爱|