(Solved) : Write Program Used Sort Search Report Database Personal Contacts Phone Numbers Birth Day A Q42742645 . . .

Write a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, and ad
language c+++
Write a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, and ad

Write a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, and ad2. Functions: Main (You have to change the order to make it to work, here only important steps are provided) Must declare an

HINTS ON PROJECT: What are the functions to be written apart from main: 1. void Sort(Record records( ], int N, int option): 2All of the above part must be replaced for the line if (Al A [min] ) min = j in the Sorting function I gave you above Also whinput.open(filename.txt); //make sure your data is already there Then to get these data loaded into your program (to read tWrite a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, and address. The birth day should be type Date (a struct with month as string, day and year as integers). All the input data are saved in a file. The output file should have the sorted data based on the last names. Also, search with a birthday month, and should report all those persons name and birthdays whose birthday is in that month. Use functional decomposition to solve the problem Generate Data file of at least 20 records to test your code. The program must use functions, structs, and arrays HINTS: First split the program into several parts 1. Define three structs called Address, Date and Record as below struct Address int houseno string streetname; string streetType; string city; string state; int zip struct Date string month; int day int year }: struct Record string last string first; Date bday; Date itself is a struct as defined above; Address address; int phoneNo Write a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, and address. The birth day should be type Date (a struct with month as string, day and year as integers). All the input data are saved in a file. The output file should have the sorted data based on the last names. Also, search with a birthday month, and should report all those persons name and birthdays whose birthday is in that month Use functional decomposition to solve the problem. Generate Data file of at least 20 records to test your code. The program must use functions, structs, and arrays. HINTS: First split the program into several parts: 1. Define three structs called Address, Date and Record as below struct Address int houseno; string streetname; string streetType; string city; string state; int zip; struct Date string month int day int year; struct Record string last string first Date bday; Date itself is a struct as defined above; Address address; int phoneNo; }; Write a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, and address. The birth day should be type Date (a struct with month as string, day and year as integers). All the input data are saved in a file. The output file should have the sorted data based on the last names. Also, search with a birthday month, and should report all those persons name and birthdays whose birthday is in that month. Use functional decomposition to solve the problem Generate Data file of at least 20 records to test your code. The program must use functions, structs, and arrays HINTS: First split the program into several parts 1. Define three structs called Address, Date and Record as below struct Address int houseno string streetname; string streetType; string city; string state; int zip struct Date string month; int day int year }: struct Record string last string first; Date bday; Date itself is a struct as defined above; Address address; int phoneNo We were unable to transcribe this imageHINTS ON PROJECT: What are the functions to be written apart from main: 1. void Sort(Record records( ], int N, int option): 2. void Search(Record records , int N, string bmonth); 3. void Display(Record records ], int N): -display all the data 4. void DisplayRecord(Record reords [, int i); – displays only ith record A sort function is given that you need to modify based on sorting needed for this problem. This function sorts the data for integer data, you need to modify for structured typed data. This program was given in class, most likely one of the lab. void Sort (int A int N int i, j for (i0 i <N-2 i+ +) int min i for (j i+1: <-N- 1: j++) if (A <A [min]) min -j if (min !-i) swap (A [ i ], A[min] ) ; Modify this to be used with struct, by adding the parameter as given To give you more hints: Inside the function, make the only change as below: Inside forj- i1:j<«N; j++) loop The if statement needs to be changed by adding another if as given if(option) ifrecords.first<records(min].first) min = j; else if (option2) Il do same thing with last name else if (option3) l sorting with birthday month ifrecordsi].bday.month < records(min]bday.month) min j; else cout <“invalid sorting option, exit from program” endl; return 0 All of the above part must be replaced for the line if (Al A [min] ) min = j in the Sorting function I gave you above Also where-ever you see A, replace by records For Scarching function, the algorithm is simple: Run a loop inside the function from i=0 to N-1, and inside the loop, check the following if (records[i].bday.monthbmonth) DisplayRecord(records, i); The Display function should display all the records in a certain style as per your wish, may be as first name, last name, bday (all three fields), address and phone number. Make sure this function displays on the screen as well as save the results into an output file. DisplayRecord function displays only i the records firstname, last name, bday and phone no cout << recordsi.first. etc. (No loop inside this function) Main Function must import all the data from an input file. First declare an array of type struct Record records 100) /This is static array declaration To declare dynamically, do the following: Record records; int N; cout <<“Enter N: ” cin >> N records new Record [N]: Do those in the beginning of main. For file input ifstream input; input.open(“filename.txt”); // make sure your data is already there Then to get these data loaded into your program (to read the data into the array) fori 0; i- N-1; i++ cin >> records(].first> recordsi].las . t. Make sure data are read in the same order as given in your input file Get option value If option 1 Get value for sortOption (use cin statement) call Sort function and then call Display function example: input.open(“filename.txt”); //make sure your data is already there Then to get these data loaded into your program (to read the data into the array) for(i= 0; i<- N-I; i++ cin>recordsi.first> recordsfi].last. ete. Make sure data are read in the same order as given in your input file Get option value If option 1 Get value for sortOption (use cin statement) call Sort function and then call Display function example: Sort(records, N, sortOption); Call Display function also else if option 2 declare a variable birthMonth Get input for birthMonth call Search function with records, N and birthMonth as inputs else display invalid option. End of main YOUR OUTPUT FROM THE PROGRAM must be onscreen as well as saved into a file. When you submit the project make sure to submit the following 1. C++source code 2. Input File (Data file which should have at least 20 persons record) 3. Output File which will have sorted results (make sure to sort based on each of three sorting options) 4. A report (word document) explaining your code and the flow chart for the program. This is an independent work, your creativity, making the code user friendly (adding suitable comment statements), presentation, plagiarism issue, everything will be checked and considered for giving the score out of 100. Show transcribed image text Write a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, and address. The birth day should be type Date (a struct with month as string, day and year as integers). All the input data are saved in a file. The output file should have the sorted data based on the last names. Also, search with a birthday month, and should report all those persons name and birthdays whose birthday is in that month. Use functional decomposition to solve the problem Generate Data file of at least 20 records to test your code. The program must use functions, structs, and arrays HINTS: First split the program into several parts 1. Define three structs called Address, Date and Record as below struct Address int houseno string streetname; string streetType; string city; string state; int zip struct Date string month; int day int year }: struct Record string last string first; Date bday; Date itself is a struct as defined above; Address address; int phoneNo
Write a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, and address. The birth day should be type Date (a struct with month as string, day and year as integers). All the input data are saved in a file. The output file should have the sorted data based on the last names. Also, search with a birthday month, and should report all those persons name and birthdays whose birthday is in that month Use functional decomposition to solve the problem. Generate Data file of at least 20 records to test your code. The program must use functions, structs, and arrays. HINTS: First split the program into several parts: 1. Define three structs called Address, Date and Record as below struct Address int houseno; string streetname; string streetType; string city; string state; int zip; struct Date string month int day int year; struct Record string last string first Date bday; Date itself is a struct as defined above; Address address; int phoneNo; };
Write a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, and address. The birth day should be type Date (a struct with month as string, day and year as integers). All the input data are saved in a file. The output file should have the sorted data based on the last names. Also, search with a birthday month, and should report all those persons name and birthdays whose birthday is in that month. Use functional decomposition to solve the problem Generate Data file of at least 20 records to test your code. The program must use functions, structs, and arrays HINTS: First split the program into several parts 1. Define three structs called Address, Date and Record as below struct Address int houseno string streetname; string streetType; string city; string state; int zip struct Date string month; int day int year }: struct Record string last string first; Date bday; Date itself is a struct as defined above; Address address; int phoneNo

HINTS ON PROJECT: What are the functions to be written apart from main: 1. void Sort(Record records( ], int N, int option): 2. void Search(Record records , int N, string bmonth); 3. void Display(Record records ], int N): -display all the data 4. void DisplayRecord(Record reords [, int i); – displays only ith record A sort function is given that you need to modify based on sorting needed for this problem. This function sorts the data for integer data, you need to modify for structured typed data. This program was given in class, most likely one of the lab. void Sort (int A int N int i, j for (i0 i

Expert Answer


Answer to Write a Program that can be used to sort, search and report a database of personal contacts, phone numbers, birth day, a…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?