Question: > Person -Id: la -se: String *ceconstructor>> Person tid:int, name: String) setId(id: Int) : void getId() ist te (namel String): void getName()String *ccabstract>> calculate ():

 > Person -Id: la -se: String *ceconstructor>> Person tid:int, name: String)
setId(id: Int) : void getId() ist te (namel String): void getName()String *ccabstract>>
calculate (): double string(): String Student -marki: int -mark?: int >+Student (id:ins,
> Person -Id: la -se: String *ceconstructor>> Person tid:int, name: String) setId(id: Int) : void getId() ist te (namel String): void getName()String *ccabstract>> calculate (): double string(): String Student -marki: int -mark?: int >+Student (id:ins, name: String, marki: ins, maria: int) -checklatkact: int): int calculate(): double toString(): String Esployee -Salary: double -experience: it constructor Employee (id: it, sate: String, salary: double, experience in - checkelary Salary: deable): double calculate(): double casting: String use the above UML, to write the ci application. Follow the instruction is given for each class. Person class: .ToStringmethod should return td, name. Student class: a. Provide constructor which initializes the instance variables of the student as welt super class instance varLables Person. b. Provide a checkstark Mathod which checks the marks are between 1 and 100. It not at the mark to 0. c. Provide a method calculate which will calculate and return the total of the areas given marki + mark2 d. ToString returns the person details along with marki, mark and total Employee class: a. Pravide a constructor which initializes the instance variables of the Employee claman wall a super class instance variables son. b. provide a checksalary Hathod which checks. If the salary 2 and C= 4 it will return (salary + salary .0.10) and else it will return (salary + salary 0.50). d. Tostring method returns the person details along with salary, experience and netalary. Create a test application named Program which perform the following a. Create an array of object for the abstract clasa person using array of size 10 to store the details of the student and playee uning the menu b. Menu displays 1. Student, 2. Employee 3. and 3. Exit. 6. If he select 1. read the id, name, marki, mark and marks and add the object of the Student using sub els eference to the super class d. I user select 2. read the id, name, watery and experience add the object of the employee uning sub class reference to the super claus .. 1 U selecta 3, it will come out from the loop and displays the information Output show Menu 1. Add Student 2. Add Employee 3. Exit Enter choice of Operation :: 3 Information ID = 10110094 Name = Abdul Majied Marki = 89 Mark2 = 86 Total = 175.00 Menu 1. Add Student 2. Add Employee 3. Exit Enter choice of Operation :: 1 Enter student id :: 10110094 Enter student name :: Abdul Majied Enter Marki :: 89 Enter Mark2 : : 86 Menu 1. Add Student 2. Add Employee 3. Exit Enter choice of Operation :: 2 Enter employee id :: 12217001 Enter employee name :: Abdullah Kahlid Enter salary :: 12785 Enter Experience :: 6 Menu 1. Add Student 2. Add Employee 3. Exit Enter choice of Operation :: 1 Enter student id :: 13218007 Enter student name :: Abdul Rahman Enter Marki :: 89 Enter Mark2 :: 78 ID = 12217001 Name - Abdullah Kahlid Salary = 12785.00 Experience = 6 Net Salary - 19177.50 ID - 13218007 Name - Abdul Rahman Mark1 - 89 Mark2 - 78 Total = 167.00

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 Databases Questions!