Question: Assignment 3 1. Implement Name class, Address class, Student class, Faculty class, and Course class as shown the UMLs bellow. 2. Implement the TestCourse class
Assignment 3
-
1. Implement Name class, Address class, Student class, Faculty class, and Course class as shown the UMLs bellow.
-
2. Implement the TestCourse class as on Page 378 using the classes created on question 1.
-
3. Change the implementation TestCourse class implemented on question 2 to accept the user input to add Students, Faculties, and Courses.
| Name |
| -firstName: String -lastName: String |
| +Name(firstName: String, lastName: String) +getFirstName(): String +getLastName(): String |
| Student |
| -id: int -name: Name -address: Address -courses: Course[] |
| +Student(id: int, name: Name) +getId(): int +getName(): Name +changeName(name: Name): void +setAddress(address: Address): void +getAddress(): Address +addCourse(course: Course): void +getCourses(): Courses[] |
| Course |
| -courseName: String -students: Student[] -numberOfStudents: int |
| +Course(courseName: String) +getCourseName(): String +addStudent(student: Student): void +dropStudent(student: Student): void +getStudents(): Student[] +getNumberOfStudents(): int |
2
1
3
Classes UML
Classes UML
| Address |
| -streetNumber: int -streetName: String -city: String -state: String -zipcode: int |
| +Address() +setAddress(streetNumber: int, streetName: Stirng, city: String, state: String, zipcode: int): void +getStreetName(): int +getStreetName(): String +getCity(): String +getState(): String +getZipCode(): int |
| Faculty |
| -name: Name -address: Address -courses: Course[] |
| +Facult(name: Name) +getName(): Name +changeName(name: Name): void +setAddress(address: Address): void +getAddress(): Address +addCourse(course: Course): void +getCourses(): Courses[] |
4
2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
