Question
IN C++ And without using class defined type or data structures You are to write a program that will be used to look up the
IN C++ And without using class defined type or data structures
You are to write a program that will be used to look up the demographic information of a student.
Their are two files which I provide that contains the following information: city.dat
Numbers 1-4 are as freshman to senior in student.dat file
students.dat file contents should be one row (id name) and another row (classification zip).
Example of how output should be is in picture below for student found and student not found.
Contents of output should be in one row for each (id name classification city zip population) examples in picture below.
Preview the documentView in a new window city.dat which contains the zipcode (int), population (int), and city (string) student.dat which contains student id (int), student name (string), student classification (classification),student zipcode (int) student.datPreview the documentView in a new window ENUMS: - Create an enum named classification which contains the following data: FRESHMAN, SOPHOMORE, JUNIOR, SENIOR NAMESPACE: - Create your own namespace which contains a string array called 'myClass', which contains the following strings: "Freshman", "Sophomore", "Junior", "Senior" INPUT 1. You are to read both files into arrays (2d or 1d) (Hint: use parallel arrays) 2. The user will be prompted to enter the id of the student that they wish to look up. PROCESSING 1. You are to search through the student array(s) looking for the student whose id matches the one entered by the user. If successful, you will then attempt to look up their city demographic and ... OUTPUT 1. ... display the data to the screen. Below are test cases for you to use. Example: 1 SADDLEBACK STUDENT DEMOGRAPHIC LOOK UP ENTER STUDENT ID (-1 to Quit program) : 16 STUDENT FOUND NAME CLASSIFICATION CITY ZIPCODE POPULATION ============== ============== ===================== ======= ========== Yasuhiro Au Sophomore Costa Mesa 92617 92627 61510 The program would then pause, then after the user presses a key, clear the screen and prompt for another student all over again. Example: 2 SADDLEBACK STUDENT DEMOGRAPHIC LOOK UP ENTER STUDENT ID (-1 to Quit program) : 15 STUDENT DOES NOT EXIST IN OUR DATABASE. The program would then pause, then after the user presses a key, clear the screen and prompt for another student all over again.
in city.dat file....
92656 49046 Aliso Viejo
92808 20039 Anaheim
92807 36171 Anaheim
92806 37173 Anaheim
92802 42709 Anaheim
92801 62068 Anaheim
92805 70401 Anaheim
92804 85914 Anaheim
92823 3613 Brea
92821 35533 Brea
90621 35153 Buena Park
90620 45113 Buena Park
92624 7248 Capistrano Beach
92625 12478 Corona Del Mar
92626 49341 Costa Mesa
92627 61510 Costa Mesa
90630 47993 Cypress
92629 25756 Dana Point
92610 11248 Foothill Ranch
92708 56004 Fountain Valley
92835 24010 Fullerton
92832 24752 Fullerton
92831 34204 Fullerton
92833 51767 Fullerton
92845 16333 Garden Grove
92844 24307 Garden Grove
92841 32845 Garden Grove
92843 45214 Garden Grove
92840 54083 Garden Grove
92649 32463 Huntington Beach
92648 45317 Huntington Beach
92646 55224 Huntington Beach
92647 57245 Huntington Beach
92617 14044 Irvine
92618 16366 Irvine
92603 20184 Irvine
92606 21495 Irvine
92602 22871 Irvine
92614 24748 Irvine
92604 26853 Irvine
92612 27522 Irvine
92620 38486 Irvine
90631 67619 La Habra
90623 15554 La Palma
92694 21944 Ladera Ranch
92651 23881 Laguna Beach
92653 29291 Laguna Hills
92677 63297 Laguna Niguel
92637 16012 Laguna Woods
92630 59182 Lake Forest
90720 21751 Los Alamitos
92655 8337 Midway City
92692 47222 Mission Viejo
92691 47582 Mission Viejo
92662 2756 Newport Beach
92661 3744 Newport Beach
92663 21649 Newport Beach
92660 34797 Newport Beach
92657 9741 Newport Coast
92866 14885 Orange
92865 19704 Orange
92868 25404 Orange
92869 37184 Orange
92867 44515 Orange
92870 52033 Placentia
92688 43792 Rancho Santa Margarita
92673 29309 San Clemente
92672 34464 San Clemente
92675 34731 San Juan Capistrano
92706 36457 Santa Ana
92705 44706 Santa Ana
92701 53908 Santa Ana
92707 59492 Santa Ana
92703 65445 Santa Ana
92704 88123 Santa Ana
90740 23729 Seal Beach
92676 1945 Silverado
90680 29945 Stanton
90742 831 Sunset Beach
90743 456 Surfside
92678 494 Trabuco Canyon
92679 32611 Trabuco Canyon
92782 23032 Tustin
92780 57741 Tustin
92861 5781 Villa Park
92683 89747 Westminster
92887 20006 Yorba Linda
92886 46564 Yorba Linda
in student.dat file....
1. Zorina Abreu
1. 92656
2. Zhen Abu-Zahra
0 92808
3. Zhanetta Adeyeye
4. 92807
5. Yunzhe Afonso
0 92806
6. Youngjin Ahn
1. 92802
6 Yu Ahn
2. 92801
7 Yoon Akin-Aderibigbe
3. 92805
8 Yookyung Alexander
4. 92804
9 Yi-Shiuan Alsamdan
0 92823
10 Yingda Alter
0 92821
11 Ying Altmann
1. 90621
12 Yi-Feng Alvarez
3 90620
13 Yi Aramendia
0 92624
14 Yaya Ashkenazi
2. 92625
15 Yat-Lun Atri
3. 92626
16 Yasuhiro Au
4. 92627
17 Yanwen Aurori
5. 90630
18 Yan Austin
6. 92629
19 Ya-Han Bagdat
7. 92610
20 Yael Bala
8. 92708
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