need this code to be solved within 20 min please
c) Staff is another subclass of the Employee class and contains
a private data field
salary. A constructor that creates a Staff object with specified
name and salary
amount. Print the assigned name of the Staff object using the
property. Staff class
overrides and defines the body of the Psalary method to return the
salary of the
Staff.
d) A driver class is called as Demo has the Main method and inside
Main it creates
a Faculty object (f) with a name “Mrs. Roma” and a salary amount.
It also creates
a Staff object with a name “Mr. Karim” and a salary amount. Use
appropriate
property variable and Psalary method to print the Faculty and Staff
object’s name
and salary.
need this code to be solved within 20 min please c) Staff is another subclass of the Employee class and contains a priva
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am