Computers and Technology

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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, iamquintix
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
image
Computers and Technology, 22.06.2019 10:30, araminaara691
How can a user open a blank presentation? 1.on the file menu, click new, and then click recent templates 2.on the file menu, click new, and then click blank presentation 3. on the view menu, click templates, and then click recent templates 4. on the view menu, click samples, and then click blank presentation
Answers: 1
image
Computers and Technology, 22.06.2019 15:30, mikey3882
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
image
Computers and Technology, 23.06.2019 01:20, shiann2002
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
Do you know the correct answer?
This assignment involves creating a program to track employee information. Keep the following inform...

Questions in other subjects:

Konu
Mathematics, 23.11.2019 00:31
Konu
Mathematics, 23.11.2019 00:31