Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The following figure shows a UML diagram in which the class Student is inherited from the class Person. Implement the two classes. Write a demo
The following figure shows a UML diagram in which the class Student is inherited from the class Person. Implement the two classes. Write a demo program that tests all the methods in the Student class as well as the inherited methods. Note: In the toString method in the Student class, use the method getName() to get the name.
*I am using JGrasp so please make sure it is compatible
*Please comment throughout code
*FULL QUESTION IN IMAGES BELOW
Exercise 3: The following figure shows a UML diagram in which the class student is inherited from the class Person Person name: String Person setName (String newName) void getName String toString String has SameName (Person another Person) boolean Student student Number: int Student reset (String newName int newNumber) void get StudentNumber int setstudent Number (int n) void tostring String equals (Student another Stuent) booleanStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started