Question: HERE IS OUR CODE WE JUST NEED TO ADD THE FILES INFILE AND OUTFILE PLEASE DO NOT CHANGE ANYTHING IN THE CODE JUST ADD THE
HERE IS OUR CODE WE JUST NEED TO ADD THE FILES INFILE AND OUTFILE PLEASE DO NOT CHANGE ANYTHING IN THE CODE JUST ADD THE OUTFILE AND INFILE IN A SMILIRAY WAY OF THIS
THIS IS OUR CODE
#include #include #include #include #include #include using namespace std; const int size = 5 ; string services [size]= {"Robbery ", "Violation ", "Medical ","Fire "};//The menu string search; string Thesrevice; struct Info { string name; int age; string location; string AdditionalNote; }; void Ask(string &z){// Function for Searching in array cout> z; for (int i = 0 ; i> array[0].name>>array[1].age>>array[2].location>> array[3].AdditionalNote; } void R(){ srand(time(0)); cout =size) NewIndex=NewIndex % size; temp[NewIndex]= services[i]; ;} coutservices [y]){ tem=services [x]; services [x]=services [y]; services [y]=tem;}}} cout > answer; if (answer == "2"){ string Qrep; string Qrepp; string rep; int repp; int replaa; cout> Qrep; if(Qrep == "Y"){ cout > Qrepp; if (Qrepp == "Y"){ cout> repp; } Array[1].age=repp; }if (Qrepp=="N"){ // Updating values cout > rep; cout > repla; if(Array[0].name== rep) Array[0].name=repla; if(Array[2].location== rep) Array[2].location=repla; if(Array[3].AdditionalNote== rep) Array[3].AdditionalNote= repla; } if (Qrep == "N"){ R(); } } cout return 0; }
CS211 Fundamentals of Programming Course Assignment Assignment Goal: To develop a program that contains the usage of arrays, functions, structs, and files. Submission Deadline: Thursday gth Feb, End of the day for all teams Team Size: Each team or group should consist of 6 students including the team leader. Assignment Specification: your program should include the following: - Functions (should include both: pass by value and pass by reference variables, void function and function returning any value) - Array of structs (at least one single array of struct) - Selection and repetition structures as needed - Add your team members names as a comment in the first line of your program. - You should print a menu to the user and offer him/her different services. - Main Services: adding new item. search for specific item. update existing record. delete. Sort. Display- At the start, your program should populate the array(s) from a file and allow the user to edit it. At the end overwrite the same file with the latest contents of the array(s). - Provide another statistical report as separate text file e.g. the number of records, with date, time of last update. - The program should continue running until the user chooses to exit it. - Ensure to avoid any errors of any type (Run-time error, logical error, and syntax error). - You can add extra functions if wish to. Submission Format: - You should submit both softcopy (PDF format) through Blackboard. Also, you should submit the source file in format of c++ file (.cpp) - Your submission should be delivered in professional appearance. This using the template given, logo, Title, appropriate structure of reports/presentation. - You will be giving a small presentation (10-15 minutes per team) explaining your program structure and how you have implemented it. All team members should participate in it. - The presentation will take place in week\#11. Notes: 1. Groups must be registered online through Blackboard 2. All your submissions must include your academic information (Nome, 1D, Project Group Number \& Name). 3. No submissions will be accepted through emails. 4. Each member of the team must participate equally in the project. Otherwise, if a student didn't participote well in its team's project marks will be deducted according to the inoctive student's porticipation