Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code can be written in the language c # Objectives Exploring Inheritance and Overriding Methods Be able to design inheritance class relationships Be able to

Code can be written in the language c #

Objectives

  • Exploring Inheritance and Overriding Methods
  • Be able to design inheritance class relationships
  • Be able to use an abstract class
  • Be able to override a virtual methods and implement an abstract method

Pre-Lab Questions

  1. Give an example of a good use of an abstract class not mentioned in the class.
  2. How many children can any parent class have? How many parents can a child class have?
  3. How can you make sure a method is not overridden in a child class?

Activities:

In this lab activity, we design an inheritance hierarchy containing types of employees in a companys payroll application. In this company, commission employees (who will be represented as objects of a superclass) are paid a percentage of their sales, while base-salaried commission employees (who will be represented as objects of a subclass) receive a base salary plus a percentage of their sales.

You need to implement the following design.

In the Testapplication you need to create a commissionEmployee object and a BasePlusCommissionEployee object using a data of your choice. Then call the toString method and print the earning on each object.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

ISBN: 0764532545, 978-0764532542

Students also viewed these Databases questions

Question

What are the objectives of job evaluation ?

Answered: 1 week ago

Question

Write a note on job design.

Answered: 1 week ago

Question

Compute the derivative of f(x)cos(-4/5x)

Answered: 1 week ago

Question

Discuss the process involved in selection.

Answered: 1 week ago

Question

b. Explain how you initially felt about the communication.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago