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, 22.06.2019 18:00
When is it appropriate to use an absolute reference
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
If you combine two cells into one, what action are you performing? a.  adding a new row or column      b.  splitting the cells      c.  removing a new row or column      d.  merging the cells
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
question
Computers and Technology, 25.06.2019 08:20
With technology, information is sent to users based on their previous inquiries, interests, or specifications.
Answers: 2
You know the right answer?
This assignment involves creating a program to track employee information. Keep the following inform...
Questions
question
Mathematics, 31.01.2020 22:48
question
Mathematics, 31.01.2020 22:48
Questions on the website: 13722362