Create a base employee class

Assignment Help C/C++ Programming
Reference no: EM131885

Create a base Employee class and a derived StudentEmployee class. Below is the basic UML structure of both classes.

1258_Create a base Employee class.png

Implementation

This section further explain each class method found within the UML diagram.

Class Employee

- get/setName gets and sets the employee's private name variable. Be sure to filter out bad input, such as empty strings.

- get/setEmployeeId gets and sets the employee's ID number. Be sure to filter out ID numbers that are less than or equal to zero.

- set/isWorking sets and gets whether or not the employee is working. No filtering is required.
- toString returns a tab-delimited string in the following format: "name \t id \t is working"

Class StudentEmployee

- get/setPayRate gets and sets the employee's pay rate. Be sure to filter out negative values.

- get/setHoursWorked gets and sets the hours worked for the current week. Be sure to filter out negative values.

- getWeeklyPay computes the student's weekly pay. To calculate, multiply the number of hours worked times the pay rate.

- set/isWorkStudy sets and gets whether the student is work study.

- toString() returns a tab-delimited string in the following format: "name \t id \t is working \t hours worked \t is work study \t pay rate"

Testing Our Classes

Use your main function to test the StudentEmployee class. In main, prompt the user for a CSV (comma separated value) file to open. Then, using the provided StringSplitter class, split the CSV using the comma as a delimiter and use the data to create a new StudentEmployee.

Reference no: EM131885

Questions Cloud

A tax on cigarettes is a good way of raising tax revenue : Discuss- A tax on cigarettes is a good way of raising tax revenue for the government
Deceptive marketing practices : What deceptive marketing practices have you personally witnessed
Analysis of data sets assignment : Analysis of data sets assignment
Impact of zigbee on telecommunication systems : Report on Impact of zigbee on telecommunication systems
Create a base employee class : Create a base Employee class and a derived StudentEmployee class
Regression model : What is the equation for this regression model?
Cost of capital to assess its restaurant capital investments : Considering investing in Facial Laboratories. Assume that Facial is currently undergoing expansion and is not expected to modify its cash dividend while expanding for the next four years.
Design a simple game of blackjack : Prepare a simple game of blackjack using object oriented programming.
Calculate the weighted average cost of capital : Calculate the Weighted Average Cost of Capital for three years to study and discuss the trend.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Perform operations on arrays

Perform operations on arrays execute tests and repetitions

  Describe the probability of the moves

Write a program in C++ to describe the Probability of the moves

  Write a program to read a data file and extract parameters

Write a C/C++ program to read a data file and extract parameters. The program must obtain the filename via a command-line argument.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Calculate the trajectory of a soccer ball

Write a program to calculate the trajectory (flight path) of a soccer ball

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Write a c program that reads a data file of floating numbers

Write a program that reads a data file of floating numbers into an array and prints the array elements along with the number of items in the array

  A constructor and a destructor

A constructor and a destructor, Insert a new element chosen by the user at the correct place in the list

  Calculation of mortgage interest rates

Instruction of pointers and the calculation of mortgage interest rates.

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Design a nested program

How many levels of nesting are there in this design?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd