Question: 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

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
Get step-by-step solutions from verified subject matter experts
