Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Obiective of the assienment The objective of the assignment is to develop your understanding of inheritance in Java. Topic of assignment: Design a class named

image text in transcribed
Obiective of the assienment The objective of the assignment is to develop your understanding of inheritance in Java. Topic of assignment: Design a class named Rerson and its two subclasses named Studont and Employee. A person has a name, phone number, and email address. A student additionally has a student ID and classification (freshman, sophomore, junior, or senior). An employee additionally has an office, and employee ID. tostring method in the Person class returns the person's name. toString method in the student class returns the student's name and classification. tostring method in the Employee class returns the employee's name and office. 1. Draw the UML diagram for the classes. 2. Implement the classes. 3. Write a test program that creates a instance for each class (Person, Student, and Employee), and invoke their toString(0 methods. Programs You will have the public classes: 1. Testprogram: main method creates instances of Person, Student, Employee, and invokes their toString methods 2. Parson: one constructor (name, phoneNumber, email), and tostring method 3. Employee: one constructor (name, phoneNumber, email, office, employeeID), and tostring method 4. Student: one constructor(name, phoneNumber, email, studentID, classification), and tostring method

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

More Books

Students also viewed these Databases questions

Question

What is computer neworking ?

Answered: 1 week ago