Question
c++ Write a program that will simulate some of the functionality for an employee database file. Your database will need to execute the following functionality.
c++
Write a program that will simulate some of the functionality for an employee database file. Your database will need to execute the following functionality.
Data:
Each record will consist of six attributes, one if with is the primary key. The primary key will be automatically assigned to a record when the record is created. The fields for the record are as follows:
Field Name: Description
ID: integer (automatically generated by program) Last name: 20 character max
First Name: 20 character max
Social Security Number: 11 character max (include -) Salary: float
Age: integer
The data should be stored in a randomly accessible file (binary file). There should be at least 20 records stored in the file.
Index:
The index function will be able to index the records on any given field in ascending or descending order. The Index function should prompt the user to enter the field to be indexed. In addition, the program should prompt the user as if the indexing will be in ascending or descending order. To complete this task the sorting should be done using merge sort, heap sort or quick sort. Also, when you are indexing, you should not have moved full records within the database file . The whole record should not be read in the program. Only the primary key and the indexed field should be stored in the programs memory.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started