Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

How does HashMap work in Java?

Answered: 1 week ago