Question: Write a Java program as given in class/ UML diagram. In a Test class inside the main, Create two objects one from teacher and

Write a Java program as given in class/ UML diagram. In a  

Write a Java program as given in class/ UML diagram. In a "Test" class inside the main, Create two objects one from teacher and another from Students with user entered values then call print() for both objects. (12 Marks) Student - id: int + Student(name: String, age: int, id: int) +getld(): int + setid(id: int):void + print(): void Person -name: String -age: int + Person(name: String, age: int) + getName(): String +getAge(): int + setName(name: String): void + setAge(age: int): void + print(): void Teacher - salary: float +Teacher(name: String, age: int, s: int) + getSalary(): float + setSalary(id: int):void + print(); void

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!