Using C# Language: Programming PLO 3 Measured: Create control structures, methods with the appropriate parameters, and data structures of the appropriate type, and implement algorithms to solve problems.   Design a class named Contractor. The class should keep the following information:   Contractor name Contractor number Contractor start date   Write one or more constructors and the appropriate accessor and mutator functions for the class.   Write another class named Subcontractor that is derived from the Contractor class. The Subcontractor class should have member variables to hold the following information:   Shift (an integer) Hourly pay rate (a double)   The work is divided between two shifts, a day shift, and a night shift. The shift variable will hold an integer value representing the shift that the subcontractor will work. The day shift is 1 and the night shift is 2. Write one or more constructors and the appropriate accessor functions for the class. Demonstrate the classes by writing a program that uses a subcontractor object and allows the user to create as many instances of the subcontractor as needed. Create a method that returns a float and computes pay with a 3% shift differential applied for night shift employees.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 5PE: Using classes, design an online address book to keep track of the names, addresses, phone numbers,...
icon
Related questions
Question

Using C# Language:

Programming PLO 3 Measured: Create control structures, methods with the appropriate parameters, and data structures of the appropriate type, and implement algorithms to solve problems.

 

Design a class named Contractor. The class should keep the following information:

 

  • Contractor name
  • Contractor number
  • Contractor start date

 

Write one or more constructors and the appropriate accessor and mutator functions for the class.

 

Write another class named Subcontractor that is derived from the Contractor class. The Subcontractor class should have member variables to hold the following information:

 

  • Shift (an integer)
  • Hourly pay rate (a double)

 

The work is divided between two shifts, a day shift, and a night shift. The shift variable will hold an integer value representing the shift that the subcontractor will work. The day shift is 1 and the night shift is 2. Write one or more constructors and the appropriate accessor functions for the class. Demonstrate the classes by writing a program that uses a subcontractor object and allows the user to create as many instances of the subcontractor as needed. Create a method that returns a float and computes pay with a 3% shift differential applied for night shift employees.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,