Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the main code for this program and the invok toStrong methods for all three and UML Homework: Homework 1- Implement the previous five

I need the main code for this program and the invok toStrong methods for all three and UML image text in transcribed
image text in transcribed
Homework: Homework 1- Implement the previous five classes: a) Create the previous five classes in Exercise 1 in Java. (Hins: use the UML digram) b) Write a test program to creates objects from the Student, Faculty and Staff classes, and then invokes toString() methods for all three class Person private String name; public String getName() { return name: public void setName (String n) { name = n; ond person class student extends Person private long studentId; Student (long studentId, String name) { this.studentId = studentId; super.setName (name); public String tostring() { return super.getName() + + this.studentId: >> and student class class Employee extends Person private int employeeid; public int get EmployeeId() return employeeid; public void setemployeeId(int Employeoid) this employeeId = employeeId: // end Employee class class Faculty extends Employee private String ranks Faculty (int employeold, string name, string rank) super.setEmployeeid (employeeId); super.setName (name); this.rank - ranki) public String tostring() { return super.getName() "+ super.getEmployeeId() + this.rank; // end Faculty class class staff extends Employee private string title, Staff (int employeeId, String name, String title) { super.setEmployee Id employeeId); super.setName (name); this.title = title;) public String tostring() { return super.getName() super.getEmployeeId() this.title; // end Staff class

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

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions