subject

This assignment involves creating a program to track employee information. Keep the following information on an employee: Employee ID (string)
Last name (string)
First Name (string)
Birth date (string as MM/DD/)
Gender (M or F, single character)
Start date (string as MM/DD/)
Salary per year (double)
Thus you must create a class that has all of this, and get/set methods for each of these fields. Note: The fields that are designated as string should use the string class, not a char array.
Your class must have three constructors:
No arguments. Just construct an object.
Takes only an employee ID
Takes all information
When the program starts it must check to see if a file called Employee. txt exists. If it does, read the information into Employee objects which you dynamically allocate and put them into an array of pointers to objects. Data in the file is stored separated by spaces, one employee per line. Assume the company will have no more than 100 employees, but if it does, show an error. You may not use vectors. If the file does not exist, your program will create it in step 5, below.
The program will have a menu that shows the following options:
Enter new employee information. When the ID is entered, make sure that ID is not in use for another employee. Request the rest of the info and create a new Employee object. While some input validation would be good, the only requirement is that the data not be null and that the salary must be a valid floating-point number greater than zero. (Doing proper input validation is beyond the scope of this exercise and could easily double the size of the program. Dates, in particular, are difficult to validate.)
Display all employee information in alphabetical order by last name. The list may not have been entered in order, but you must sort it to display it. Show the information in fixed-field columns so that it looks neat. (You can use printf for this if you like.) Show the salary to the nearest dollar.
Look up an employee by ID. If the ID exists, show all of the information. If not, display a message.
Remove an employee. Ask for an employee ID, and if the ID exists, delete. If not, display a message that there is no such employee. This should delete the object pointer from your array and remove the Employee object from memory. (How do you handle this in the array?)
Save all data to Employee. txt and exit. If the file exists, overwrite it. If it does not exist, create it.
Invalid menu options will display a message and return to show the menu. After executing options 1 through 4, return to the menu. Option 5 saves and exits.
The Employee class will not have a method to write all of the employees to the file, since it does not know about more than one employee at a time. However, you will have a method somewhere in your program to write them all out, with each piece of data separated by a blank, with one employee per line.
Structure: Three files, called Employee. h, Employee. cpp. and main. cpp.
Do not do the following:
Method in Employee that does I/O including display.
Not using pointers to objects.
Use of Vectors.
Not closing files that have been opened.
Not freeing allocated memory.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:30
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Auser is given read permission to a file stored on an ntfs-formatted volume. the file is then copied to a folder on the same ntfs-formatted volume where the user has been given full control permission for that folder. when the user logs on to the computer holding the file and accesses its new location via a drive letter, what is the user's effective permission to the file? a. read b. full control c. no access d. modify e. none of the above
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
You know the right answer?
This assignment involves creating a program to track employee information. Keep the following inform...
Questions
question
Mathematics, 26.05.2021 19:30
question
Mathematics, 26.05.2021 19:30
question
Mathematics, 26.05.2021 19:30
question
Mathematics, 26.05.2021 19:30
question
Mathematics, 26.05.2021 19:30
question
Mathematics, 26.05.2021 19:30
question
Mathematics, 26.05.2021 19:30
Questions on the website: 13722363