Home » C++ question to be done in code blocks

C++ question to be done in code blocks

ABC Company deals with import and export textiles. The company has few department and about 50 employees. The company has requested you to write a C++ program for file based database for employee in code blocks.The system must also be able to add employee when new employee joined the company. The system must also be able to edit the record, search for employee record. When Employee leaves the company it must allow them to delete the record.You must use C++ program to create file based system to add, view, search, edit, delete the records and we should be able to exit the programYour program must include necessary validation to accept the correct input for adding and editing record.Sample screen design of each function is shown below:You will need to create functions for each of the 5 menu options. Entering the number will call the correct function.I have done the add, view, delete and exit the program. I just need program for search and edit and validation of the full program.  My program:#include#include#include#include#include#includeusing namespace std;void add_rec();//function declarationvoid view_rec();void edit_rec();void search_rec();void delete_rec();void quit();struct info{    char ID[4];    char name[21];    char address[36];    int age;    double salary;};void add_rec(){ system(“CLS”); cout<<"add function.n"<>emp.age;     cout<<"salary: ";     cin>>emp.salary;     cin.ignore();//skip over the remaining newline.     //write the content of the info structure to the file.     info.write(reinterpret_cast(&emp), sizeof(emp));     //determine whether the user wants to write another record.     cout<<"Do you want to enter another stock record? [Y/N] : ";     cin>>answer;     cin.ignore();//skip over the remaining newline. }while (answer == ‘Y’ || answer == ‘y’);}int main(){    int choice;    cout<<"Welcome to the employee administration"<>choice;    while(choice != 6)    {        switch(choice)        {        case 1:            add_rec();            break;        case 2:            view_rec();            break;        case 3:            search_rec();            break;        case 4:            edit_rec();            break;        case 5:            delete_rec();            break;        default:            cout<<"n Invalid Choice"<>choice;    }    quit();    return 0;}void quit(){    cout<<"--------------------------------------"<(&emp),sizeof(emp));    //while not at the end of the file, display the record.    while(!info.eof())    {        //display        cout<<" ID: ";        cout<(&emp), sizeof(emp));    }}void search_rec(){   cout<<" search function under construction."<(&emp),sizeof(emp)))    {        if(strcmp(emp.ID,ID)!=0)        {            outfile.write(reinterpret_cast(&emp), sizeof(emp));        }    }    outfile.close();    info.close();    remove(“employee.dat”);    rename(“temp.dat”,”employee.dat”);    cout<<"nntrecord Deleted..";    cin.ignore();    cin.get();}

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
Live Chat+1 763 309 4299EmailWhatsApp

We Can Handle your Online Class from as low as$100 per week