Question: please solve asap(java program) Class Diagrams Person String name: private int age; +Person(String n, int a) Person +Retare +static void sayHit SOP Hi from Person);

Class Diagrams Person String name: private int age; +Person(String n, int a) Person +Retare +static void sayHit SOP "Hi from Person"); 1 Benefit Faculty private double salary; + double getSalary: Student double pa private String id; +Student(String n, int a double s Stringi) Student Students + Student +Betpal + int getBenefits) { return 20;1 Benefit VisitingFaculty Exchange +int getBenefits/{ return 100;} Senior String capstone; RetCapstone) + static void sayi SOP("Hi from Senior": + int getBenefits() {retum super.getBenefits)+30) H) Write a toString method for the Student class=> Name:#**# Age: ID:**** (2 marka) 1) Write a toString method for the Senior class using super > Name: Age:### ID:##### Capstone: (2 marks) (3 marks) J) Make an equals method for the Student class. Equal if gra and age are the same. You must override the Object equals method. Don't use super (no equals in parent class)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
