Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Use Visual Programming) Write the Code the following scenario . An institute has different members for doing work. They want to keep record of employee.

(Use Visual Programming)

Write the Code the following scenario.

An institute has different members for doing work. They want to keep record of employee. For that purpose create a class named Employees that have instances variables SSN number, name, address and designation with required data types. For class Employee build a constructor for instantiation of these variables. Write properties for each of the instance class variable. Include static variable in class with name counter which counts the number of employees. Write function named Return which should return all the getter values of each instance variable.

Again, make RegularEmployee class that inherits employee class having variables salary and bonus with suitable data types. Implement properties for these variables. Initialize all variables that are present in parent and child class in constructor. Write method DisplaySalary which will add the salary and bonus. Bonus and salary must be positive.

Write PartTimeEmployee class that inherits employee class having instance variables d_wages and hrs with suitable data types. Create properties for these variables. Write function getPayment in which, if hrs are less than 40 multiply d_wage and hrs otherwise it returns 2 times d_wage and hrs.

Create a class named Implements having main method and do the following.

  • Create objects of Child and parent classes.
  • Call both Child and Parent functions and show static value.
  • Use parent class reference to call the functions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions