Person - name: String - age: int + Person(name: String, age: int) + getName(): String * getAgel): int + setName(name: String): void + setAge(age: int): void print(): void Teacher - salary: float +...

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 print() for both objects.Person<br>- name: String<br>- age: int<br>+ Person(name: String, age: int)<br>+ getName(): String<br>* getAgel): int<br>+ setName(name: String): void<br>+ setAge(age: int): void<br>print(): void<br>Teacher<br>- salary: float<br>+ Teacher(name: String, age: int,<br>s: int)<br>+ getSalary(): float<br>Student<br>- id: int<br>+ Student(name: String, age: int,<br>id: int)<br>+ getid(): int<br>+ setid(id: int):void<br>+ print(): void<br>+ setSalarylid: int):void<br>print(): void<br>

Extracted text: Person - name: String - age: int + Person(name: String, age: int) + getName(): String * getAgel): int + setName(name: String): void + setAge(age: int): void print(): void Teacher - salary: float + Teacher(name: String, age: int, s: int) + getSalary(): float Student - id: int + Student(name: String, age: int, id: int) + getid(): int + setid(id: int):void + print(): void + setSalarylid: int):void print(): void

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here