Write a java program corresponding to the following UML diagram. print() method prints everything. Inside the main, Create two objects one from teacher and another from Students with user entered...


Write a java program corresponding to the following UML diagram. print()<br>method prints everything. Inside the main, Create two objects one from<br>teacher and another from Students with user entered values then call print0<br>for both objects.<br>Person<br>- name: String<br>- age: int<br>+ Person(name: String, age: int)<br>+ getName(): String<br>+ getAge(): int<br>+ setName(name: String): void<br>+ setAge(age: int): void<br>+ print(): void<br>Student<br>Teacher<br>- id: int<br>+ Student(name: String, age: int,<br>id: int)<br>+ getld(): int<br>+ setld(id: int):void<br>+ print(): void<br>- salary: float<br>+ Teacher(name: String, age: int,<br>s: int)<br>* getSalary(): float<br>+ setSalary(id: int):void<br>+ print(): void<br>

Extracted text: Write a java program corresponding to the following UML diagram. print() method prints everything. Inside the main, Create two objects one from teacher and another from Students with user entered values then call print0 for both objects. Person - name: String - age: int + Person(name: String, age: int) + getName(): String + getAge(): int + setName(name: String): void + setAge(age: int): void + print(): void Student Teacher - id: int + Student(name: String, age: int, id: int) + getld(): int + setld(id: int):void + print(): void - salary: float + Teacher(name: String, age: int, s: int) * getSalary(): float + setSalary(id: int):void + print(): void

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here