Write a class named employee with the class declaration

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

Assignment

Write a class named Employee, with the class declaration in a file called Employee.h and the implementation in a file called Employee.cpp. The class should have the following data members:

• name - A string that holds the employee's name
• idNumber - An int variable that holds the employee's ID number
• department - a string that holds the name of the department where the employee works
• position - A string that holds the employee's job status

The class must have the following constructors:

• A constructor that accepts the following values as arguments and assigns them to the appropriate number variables: employee's name, employee's ID number, department and position.

• A constructor that accepts the following values as arguments and assigns them to the appropriate member variable: employee's name, employee's ID number. The department and position fields should be assigned an empty string (" ").

A default constructor that assigns empty string ("") to the name, department and position member variables and 0 to the idNumber member variable.

Write the appropriate mutator functions that store values in these member variables and accessor functions that return the values in these member variables. Once you have written the class, write a separate program that creates 3 instances of the Employee class. Each instance of the class should use a different constructor than the other 2 objects (so all three constructors must be used). Main should use a function called displayEmployee that has one parameter which is a pointer to a constant Employee object.

Main will call the function 3 times to display the information for each of the 3 instances of the Employee class.

void displayEmployee(Employee* const e);

The output of the program must be in the form of a table.

Reference no: EM131674165

Questions Cloud

Describe ethnocentrism : Discuss specifically what you learned about yourself in the process of doing the implicit preference tests. Describe ethnocentrism.
Difference between a one-way design and a two-way design : What is the difference between a one-way design and a two-way design? Suppose you construct a table with cells, rows, and columns to summarize each factor.
How many cells or groups are in the given study : A researcher conducts a 3 x 3 between-subjects ANOVA with 15 participants assigned to each cell or group.
State assumptions for the two-way between-subjects anova : Which source of variation is placed in the denominator of the test statistic for each hypothesis test for the two-way between-subjects ANOVA?
Write a class named employee with the class declaration : Write a class named Employee, with the class declaration in a file called Employee.h and the implementation in a file called Employee.cpp.
What is the biggest upset in the history of woman softball : what is the biggest upset in the history of woman softball?
Which significant effect researcher typically analyze first : A researcher obtains a significant interaction and a significant main effect. Which significant effect should the researcher typically analyze first? Explain.
What would be the 3 rules you would have for your team : if you were a coach, what would be the 3 rules you would have for your team?
Write a program that demonstrates the circle class : Write a program that demonstrates the Circle class by asking the user for the circle's radius and creating a Circle object and then reporting the circle's area.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

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

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

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

  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.

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