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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? section.cs

?? 集學生管理系統(tǒng)、學生選課系統(tǒng)、老師管理系統(tǒng)與一身 不錯的
?? CS
字號:
// Section.cs - Chapter 14 version.

// Copyright 2004 by Jacquie Barker and Grant Palmer - all rights reserved.

// A MODEL class.

using System;
using System.Collections;

public class Section {
  //------------
  // Fields.
  //------------

  private int sectionNo;
  private char dayOfWeek;
  private string timeOfDay;
  private string room;
  private int seatingCapacity;
  private Course representedCourse;
  private ScheduleOfClasses offeredIn;
  private Professor instructor;

  // The enrolledStudents Hashtable stores Student object references,
  // using each Student's ssn as a String key.

  private Hashtable enrolledStudents; 

  // The assignedGrades Hashtable stores TranscriptEntry object
  // references, using a reference to the Student to whom it belongs 
  // as the key.

  private Hashtable assignedGrades; 
	
  // We use const int attributes to declare status codes 
  // that other classes can then inspect/interpret (see method
  // ReportStatus() in class SRS.java for an example of how these
  // are used).

  public const int SUCCESSFULLY_ENROLLED = 0;
  public const int SECTION_FULL = 1;
  public const int PREREQ_NOT_SATISFIED = 2;
  public const int PREVIOUSLY_ENROLLED = 3;

  //----------------
  // Constructor(s).
  //----------------

  // Initialize the field values using the set 
  // accessor of the associated property.

  public Section(int sNo, char day, string time, Course course,
		 string room, int capacity) {
    this.SectionNo = sNo;
    this.DayOfWeek = day;
    this.TimeOfDay = time;
    this.RepresentedCourse = course;
    this.Room = room;
    this.SeatingCapacity = capacity;

    // A Professor has not yet been identified.

    this.Instructor = null;

    // Note that we must instantiate empty hash tables.

    enrolledStudents = new Hashtable();
    assignedGrades = new Hashtable();
  }
									
  //-----------------
  // properties.
  //-----------------

  public int SectionNo {
    get {
      return sectionNo;
    }
    set {
      sectionNo = value;
    }
  }

  public char DayOfWeek {
    get {
      return dayOfWeek;
    }
    set {
      dayOfWeek = value;
    }
  }

  public string TimeOfDay {
    get {
      return timeOfDay;
    }
    set {
      timeOfDay = value;
    }
  }

  public Professor Instructor {
    get {
      return instructor;
    }
    set {
      instructor = value;
    }
  }

  public Course RepresentedCourse {
    get {
      return representedCourse;
    }
    set {
      representedCourse = value;
    }
  }

  public string Room {
    get {
      return room;
    }
    set {
      room = value;
    }
  }

  public int SeatingCapacity {
    get {
      return seatingCapacity;
    }
    set {
      seatingCapacity = value;
    }
  }

  public ScheduleOfClasses OfferedIn {
    get {
      return offeredIn;
    }
    set {
      offeredIn = value;
    }
  }

  //-----------------------------
  // Miscellaneous other methods.
  //-----------------------------

  // For a Section, we want its String representation to look
  // as follows:
  //
  //	MATH101 - 1 - M - 8:00 AM

  public override string ToString() {
    return this.RepresentedCourse.CourseNo+" - "+
           this.SectionNo+" - "+this.DayOfWeek+" - "+
           this.TimeOfDay;
  }

  // The full section number is a concatenation of the
  // course no. and section no., separated by a hyphen;
  // e.g., "ART101 - 1".

  public string GetFullSectionNo() {
    return this.RepresentedCourse.CourseNo+ 
           " - "+this.SectionNo;
  }

  public int Enroll(Student s) {
    // First, make sure that this Student is not already
    // enrolled for this Section, has not already enrolled
    // in another section of this class and that he/she has
    // NEVER taken and passed the course before.  
		
    Transcript transcript = s.Transcript;

    if (s.IsEnrolledIn(this) || 
        s.IsCurrentlyEnrolledInSimilar(this) ||
        transcript.VerifyCompletion(this.RepresentedCourse)) {
      return PREVIOUSLY_ENROLLED;
    }

    // If there are any prerequisites for this course,
    // check to ensure that the Student has completed them.

    Course c = this.RepresentedCourse;
    if (c.HasPrerequisites()) {
      IEnumerator e = c.GetPrerequisites(); 
      while ( e.MoveNext() ) {
        Course pre = (Course)e.Current;
	
        // See if the Student's Transcript reflects
        // successful completion of the prerequisite.

        if (!transcript.VerifyCompletion(pre)) {
          return PREREQ_NOT_SATISFIED;
        }
      }
    }
		
    // If the total enrollment is already at the
    // the capacity for this Section, we reject this 
    // enrollment request.

    if (!ConfirmSeatAvailability()) {
      return SECTION_FULL;
    }
		
    // If we made it to here in the code, we're ready to
    // officially enroll the Student.

    // Note bidirectionality:  this Section holds
    // onto the Student via the Hashtable, and then
    // the Student is given a handle on this Section.

    enrolledStudents.Add(s.Ssn, s);
    s.AddSection(this);
    return SUCCESSFULLY_ENROLLED;
  }
	
  // A private "housekeeping" method.

  private bool ConfirmSeatAvailability() {
    if ( enrolledStudents.Count < this.SeatingCapacity ) {
      return true;
    }  
    else {
      return false;
    }
  }

  public bool Drop(Student s) {
    // We may only drop a student if he/she is enrolled.

    if (!s.IsEnrolledIn(this)) {
      return false;
    }  
    else {
      // Find the student in our Hashtable, and remove it.

      enrolledStudents.Remove(s.Ssn);

      // Note bidirectionality.

      s.DropSection(this);
      return true;
    }
  }

  public int GetTotalEnrollment() {
    return enrolledStudents.Count;
  }	

  // Used for testing purposes.

  public void Display() {
    Console.WriteLine("Section Information:");
    Console.WriteLine("\tSemester:  "+this.OfferedIn.Semester);
    Console.WriteLine("\tCourse No.:  "+
                       this.RepresentedCourse.CourseNo);
    Console.WriteLine("\tSection No:  "+this.SectionNo);
    Console.WriteLine("\tOffered:  "+this.DayOfWeek + 
				   " at "+this.TimeOfDay);
    Console.WriteLine("\tIn Room:  "+this.Room);
    if ( this.Instructor != null ) {
      Console.WriteLine("\tProfessor:  "+this.Instructor.Name);
    }
    DisplayStudentRoster();
  }
	
  // Used for testing purposes.

  public void DisplayStudentRoster() {
    Console.Write("\tTotal of "+GetTotalEnrollment()+ 
                  " students enrolled");

    // How we punctuate the preceding message depends on 
    // how many students are enrolled (note that we used
    // a Write() vs. WriteLine() call above).

    if ( GetTotalEnrollment() == 0 ) {
      Console.WriteLine(".");
    }  
    else {
      Console.WriteLine(", as follows:");
    }

    // Use an Enumeration object to "walk through" the
    // hash table.

    IDictionaryEnumerator e = enrolledStudents.GetEnumerator();
    while ( e.MoveNext() ) {
      Student s = (Student)e.Value;
      Console.WriteLine("\t\t"+s.Name);
    }
  }

  // This method returns the value null if the Student has not
  // been assigned a grade.

  public string GetGrade(Student s) {
    // Retrieve the Student's transcript entry object, if one
    // exists, and in turn retrieve its assigned grade.
    // If we found no TranscriptEntry for this Student, return
    // a null value to signal this.

    TranscriptEntry te = (TranscriptEntry)assignedGrades[s];
    if (te != null) {
      string grade = te.Grade; 
      return grade;
    }  
    else {
      return null;
    }
  }

  public bool PostGrade(Student s, string grade) {
    // Make sure that we haven't previously assigned a
    // grade to this Student by looking in the Hashtable
    // for an entry using this Student as the key.  If
    // we discover that a grade has already been assigned,
    // we return a value of false to indicate that
    // we are at risk of overwriting an existing grade.  
    // (A different method, EraseGrade(), can then be written
    // to allow a Professor to change his/her mind.)

    if ( assignedGrades[s] != null ) {
      return false;
    }

    // First, we create a new TranscriptEntry object.  Note
    // that we are passing in a reference to THIS Section,
    // because we want the TranscriptEntry object,
    // as an association class ..., to maintain
    // "handles" on the Section as well as on the Student.
    // (We'll let the TranscriptEntry constructor take care of
    // "hooking" this T.E. to the correct Transcript.)

    TranscriptEntry te = new TranscriptEntry(s, grade, this);

    // Then, we "remember" this grade because we wish for
    // the connection between a T.E. and a Section to be
    // bidirectional.

    assignedGrades.Add(s, te);

    return true;
  }
	
  public bool IsSectionOf(Course c) {
    if (c == this.RepresentedCourse) {
      return true;
    } 
    else {
      return false;
    }
  }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费视频免费观看| 午夜天堂影视香蕉久久| 风间由美性色一区二区三区| 久久亚洲精品小早川怜子| 国产精品一区二区久激情瑜伽 | 欧美日韩日日摸| 日产精品久久久久久久性色| 日韩一区二区三区三四区视频在线观看| 免费国产亚洲视频| 久久精品视频免费观看| bt7086福利一区国产| 综合色天天鬼久久鬼色| 色欧美乱欧美15图片| 五月综合激情日本mⅴ| 日韩久久精品一区| 丁香一区二区三区| 亚洲一级电影视频| 日韩精品在线看片z| 成人综合激情网| 一区二区三区不卡在线观看 | 亚洲自拍偷拍欧美| 日韩一区二区三区在线| 国产精品66部| 亚洲一区二区在线免费看| 欧美一级片在线| 波多野结衣中文字幕一区二区三区| 亚洲男同性视频| 欧美成人官网二区| 91久久人澡人人添人人爽欧美| 日精品一区二区| 国产精品视频观看| 这里只有精品电影| youjizz久久| 美腿丝袜亚洲综合| 亚洲精品视频自拍| 久久综合久久综合亚洲| 欧美在线三级电影| 国产a区久久久| 日韩成人免费电影| 亚洲色图丝袜美腿| 久久久美女毛片 | 这里只有精品电影| 91视视频在线观看入口直接观看www | 欧美激情在线观看视频免费| 欧美性大战久久久久久久蜜臀| 国产麻豆成人精品| 亚洲成国产人片在线观看| 欧美经典一区二区| 欧美一卡二卡三卡| 欧美性受xxxx| a在线欧美一区| 国产在线视频精品一区| 午夜伦欧美伦电影理论片| 中文字幕在线观看不卡视频| 日韩精品一区二区三区在线播放| 色综合久久久久| 成人免费黄色在线| 精品亚洲成av人在线观看| 亚洲v日本v欧美v久久精品| 欧美经典一区二区| 欧美xingq一区二区| 欧美日韩大陆在线| 在线国产亚洲欧美| 一本大道久久a久久精二百| 成人国产精品视频| 成人午夜看片网址| 国产成人免费高清| 国产在线精品一区二区不卡了 | 一区二区三区 在线观看视频| 久久精品免视看| 久久久av毛片精品| 欧美r级电影在线观看| 91精品在线观看入口| 欧美日韩国产一级片| 日本韩国一区二区三区| 91一区二区在线| 91视频观看视频| 色婷婷久久久久swag精品| 97精品国产97久久久久久久久久久久| 成人免费看的视频| 91亚洲精品久久久蜜桃网站| av在线播放一区二区三区| 波多野结衣亚洲一区| www.欧美亚洲| 欧美这里有精品| 欧美精选在线播放| 日韩欧美中文字幕一区| 欧美大尺度电影在线| 精品久久久久久无| 国产目拍亚洲精品99久久精品| 中文一区二区完整视频在线观看| 亚洲国产精品av| 亚洲欧美日韩国产综合在线| 亚洲激情在线播放| 亚洲777理论| 捆绑调教一区二区三区| 久草精品在线观看| 丁香婷婷综合色啪| 欧美色图一区二区三区| 欧美一级一级性生活免费录像| 久久午夜电影网| 综合激情网...| 五月综合激情日本mⅴ| 精品一区二区三区在线播放| 韩国欧美国产1区| 北条麻妃一区二区三区| 色婷婷av一区二区| 日韩欧美国产综合在线一区二区三区| 久久伊99综合婷婷久久伊| 中文字幕中文字幕中文字幕亚洲无线| 一区二区三区在线观看国产| 视频一区在线播放| 国产 日韩 欧美大片| 日本韩国精品在线| 精品日韩在线观看| 中文字幕一区在线观看视频| 午夜电影网一区| 国产91精品欧美| 欧美久久久久久久久| 国产欧美日韩精品一区| 亚洲图片欧美色图| 成人午夜看片网址| 日韩欧美一级在线播放| 中文字幕在线不卡一区| 麻豆91在线播放| 色噜噜狠狠色综合欧洲selulu| 日韩欧美电影一二三| 中文字幕一区二区三区在线播放 | 精品久久久久久无| 一区二区三区波多野结衣在线观看| 国模无码大尺度一区二区三区| 色狠狠av一区二区三区| 久久精品在这里| 日韩电影一区二区三区| 色先锋aa成人| 国产清纯白嫩初高生在线观看91 | 色综合久久88色综合天天免费| 精品免费国产一区二区三区四区| 亚洲欧美日韩久久精品| 国产 欧美在线| 精品国产一区二区三区忘忧草| 亚洲一级片在线观看| 99精品黄色片免费大全| 久久人人97超碰com| 日韩和欧美一区二区| 一本大道av伊人久久综合| 国产亲近乱来精品视频 | 国产日产亚洲精品系列| 日本中文一区二区三区| 欧美在线视频全部完| 最新不卡av在线| 高清国产一区二区三区| 精品欧美一区二区久久| 日韩国产欧美在线播放| 欧美亚洲动漫制服丝袜| 夜夜精品浪潮av一区二区三区| 成人网页在线观看| 国产视频一区在线观看 | 国产精品天干天干在线综合| 国产一区二区福利| 精品日韩在线观看| 狠狠色综合播放一区二区| 91精品国产综合久久久蜜臀粉嫩 | 精品影视av免费| 欧美一区二区视频在线观看2022| 亚洲成人先锋电影| 欧美亚洲免费在线一区| 亚洲国产精品一区二区尤物区| 色88888久久久久久影院按摩| 中文字幕一区不卡| 91丝袜高跟美女视频| 亚洲女与黑人做爰| 欧美午夜精品一区| 亚洲国产视频一区| 欧美日韩一区二区三区免费看| 亚洲国产日韩一级| 欧美精品18+| 久久精品国产亚洲aⅴ| 精品久久五月天| 国产黄色精品网站| 国产精品乱人伦| 91老司机福利 在线| 一区二区三区不卡在线观看| 欧美日韩在线播放三区| 日本亚洲最大的色成网站www| 精品美女在线播放| 福利一区在线观看| 亚洲老妇xxxxxx| 欧美日韩在线综合| 免费观看在线色综合| 精品久久久影院| av亚洲产国偷v产偷v自拍| 亚洲人精品一区| 欧美老人xxxx18| 国产一区免费电影| 亚洲人成伊人成综合网小说| 欧美日韩亚洲综合一区| 韩国中文字幕2020精品| 国产精品成人一区二区三区夜夜夜| 色婷婷av一区|