Question: I dont know why i still have same students input to course, it worked well in other case, and i cant get student name which

I dont know why i still have same students input to course, it worked well in other case,

and i cant get student name which also works well input separately.

I dont know why i still have same students input to course,it worked well in other case, and i cant get student name

which also works well input separately. -courseID: int -courseCode: String -courseName: String-courseCapacity: int -numberStudents: int -room: Room -students: Student[] -waitListCount: int +Course (ID:int, code: String, name: String, room: Room) +getBuildingName(): String +getCampus (): String+getCourseID(): int +getCourseCode (): String +getNumber Students(): int +getStudents(): Student[] (Returns arrayof registered students) tisInCourseAlready (student: Student): boolean +isSpaceLeftInCourse (): boolean +registerStudent (student:

-courseID: int -courseCode: String -courseName: String -courseCapacity: int -numberStudents: int -room: Room -students: Student[] -waitListCount: int +Course (ID: int, code: String, name: String, room: Room) +getBuildingName(): String +getCampus (): String +getCourseID(): int +getCourseCode (): String +getNumber Students(): int +getStudents(): Student[] (Returns array of registered students) tisInCourseAlready (student: Student): boolean +isSpaceLeftInCourse (): boolean +registerStudent (student: Student): int +toString(): String FINAL COURSE COUNTS: COURSE 26056: CSCI-1110 - Intro To Computer Science Chemistry building, Room 125 (seats 150) Current: 4 / 150 Wait list count: 0 Students: null null null null COURSE 23455: MATH-6974 - Incredibly Tough Math Goldberg building, Room 445 (seats 4), Current: 0 / 4 Wait list count: 0 COURSE 4328: PSYC-234 - A Look Into Your Mind, Goldberg building, Room 127 (seats 120) Current: 1 / 120 Wait list count: 0 Students: 4 ROOMS : Goldberg building, Room 127 (seats 120) Goldberg building, Room 445 (seats 4), CHEB building, Room 207 (seats 3) Chemistry building, Room 125 (seats 150), 4 COURSES: 26056: CSCI-1110 23455: MATH-6974 4328: PSYC-234 54899: CSCI-003 11 REGISTRATION ATTEMPTS: Student 12 was added to course CSCI-1110 Student 17 was added to course CSCI-1110 Student 17 was added to course CSCI-1110 Student 33 was added to course CSCI-1110 Student 318 was added to course CSCI-003 Student 986 was added to course CSCI-003 Student 318 was added to course CSCI-003 CSCI-003 is FULL (Student 9147 is # 1 on waitlist) CSCI-003 is FULL (Student 314 is # 2 on waitlist), CSCI-003 is FULL (Student 15 is # 3 on waitlist) public class Course{ public static void main(String[] args) { private int courseID; private String courseCode; private String courseName; private int courseCapacity; private int numberStudents; private Room room; private Student[] students; private int waitListCount; public Course(int ID, String code, String name, Room room) {/ this.courseID = ID; this.courseCode = code; this.courseName = name; this.room = room; this.courseCapacity = room.getRoomCapacity(); this.numberstudents = 0; this.waitListCount = 0; students = new Student[this.courseCapacity]; public String getBuildingName() { return room.getBuilding().getBuildingName(); } public String getCampus() { return room.getBuilding().getCampus(); } public int getCourseID() { return courseID; } 1 public String getCourseCode() { return coursecode; } 1 public int getNumberStudents() { return numberStudents; }; I public Student[] getStudents(){ return new Student[getNumberStudents(); J public boolean isInCourseAlready (Student student) { for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!