Create a program that maintains a list of employees

Assignment Help Computer Engineering
Reference no: EM132154707

Update the employee class that we created in class on March 10, 2017. Update the class to do the followings:

o Include one additional data member (empID - a private data member) which will contain a class-assigned employee ID. This new data member will contain a numeric value assigned by the class and is unique to each employee. The user should not be able to alter the value of empID but should be able to retrieve it.

o To create an object that represents a valid employee, the user must provide an employee name and a hire date. The user should have the option to provide a value for "hours" when an object is created. If a value for "hours" is not provided, "hours" should default to zero.

An employee ID can be assigned to an object by the class only when a name and a hire date are provided. Create a constructor to enforce this rule.

o The data member hireDate must be constant. The user should not have the option to change the hireDate but should be able to retrieve its value.

o Make sure that all functions in the employee class that do not alter the data are constant functions.

o Add a new member function to the class employee that displays all the information pertaining to the employee. This function will make it easier for the user to display the contents of an employee object by simply using this member function instead of calling 6 different member functions (getName(), getHours(), getEmpID(), getMonth(), getYear(),getDay()).

Create a program that maintains a list (an array) of employees. The user should be able to add employees to the list. When adding an employee to the list, make sure that the program searches the list by employee name to make sure that the employee does not already exist. If the employee already exists, let the user know that the employee is already on the list and display the employee's information.

Note: you will need to create an array of pointers to objects of the employee class because you do not have a default constructor. The declaration will be as follows:

Employee * empList[maxSize];
Where maxSize is a constant integer that contains the size of the array.

ps: create a new class instead of using the existing class mentioned.

Reference no: EM132154707

Questions Cloud

Write the constructor method : Write the constructor method, init (self, acctNum acctName, acctBal) which creates an account with the given values for the instance variables.
Give an algorithm to update the mst when the weight : Let G be an edge-weighted, undirected, and connected graph. You are already given the MST, T, of G.
What was the surrender charge sophia had to pay : Assume that the contract value had not increased or decreased because of investment performance. What was the surrender charge Sophia had to pay?
What is the project irr : The cost of capital is 13%. What is the project's IRR?
Create a program that maintains a list of employees : Create a program that maintains a list (an array) of employees. The user should be able to add employees to the list.
What is the future value at the end of year : What is the future value at the end of year 15 of $10,000 deposited today into an account that pays interest of 4.5% p.a., but with monthly compounding?
Undertake investment opportunity : However, a bank offers to lend you up to $100,000 at 8% with no conditions. Should you undertake this investment opportuni
Did the command you entered immediately before echo : You type in echo $ into the terminal and it prints out 127. Did the command you entered immediately before echo $? execute successfully?
What is the cash flow to shareholders : Peggy Grey's Cookies had net income of $272,800. The firm paid out 28 percent of net income to its shareholders as dividends.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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