Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sample of Lego Files main.cpp #include #include using namespace std; int main() { cout > option; /*======= Load data from file(s) =======*/ cout > choice;

Sample of Lego Filesimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

main.cpp

#include #include using namespace std;

int main() { cout > option;

/*======= Load data from file(s) =======*/

cout > choice; cin.get(); // Clear newline character for any later input /*======= Print out how many sets were loaded =======*/ /*======= Based on the choice, execute the appropriate task and show the results =======*/ return 0; }

o su lego1 [Read-Only] - Excel (Unlicensed Product) File Home Insert Page Layout Formulas Data Review View Help Tell me what you want to do 11 - ab Wrap Text General Calibri BIU Paste 4.0 .00 A Merge & Center $ - % Conditional For Formatting Ta Style 1 Clipboard Font Alignment Number A1 for Number H J L N 2 B D E F 1 Number Theme Name Minifigs Pieces US Price 4653 4 Juniors Dump Tru 1 27 10 3 4858 4 Juniors Doc Ock's 3 55 15 4 4860 4 Juniors Doc Ock's 3 130 30 5 7070 4 Juniors Catapult R 1 22 5 7072 4 Juniors Captain Ki 1 36 13 7 7075 4 Juniors Captain Re 4 131 40 2913 Action WF Constructi 2 29 30 10182 Advanced Cafe Corn 3 2056 139.99 10194 Advanced Emerald N 3 1085 99.99 1 10197 Advanced Fire Brigad 4 2231 149.99 2 10244 Advanced Fairgroun 12 1746 149.99 3 10246 Advanced Detective 6 2262 159.99 4 10247 Advanced Ferris Wh 10 2464 199.99 5 10257 Advanced Carousel 7 2670 199.99 6 10260 Advanced Downtow 6 2480 169.99 7 2879 Adventure Desert Ex 5 196 20 8 5913 Adventure Dr. Kilroy' 1 21 3 9 5934 Adventure Dino Expl 2 90 15 20 5948 Adventure Desert Ex 5 196 20 11 5956 Adventure Expedition 175 20 -2 5987 Adventure Dino Rese 6 617 80 -3 7414 Adventure Elephant 3 86 lego1 2 4 20 AS lego2 [Read-Only] - Help Tell me what File Home Insert Page Layout Formulas Data Review View 11 General Calibri A ab Wrap Text Paste Merge & Center $ - % Clipboard Font Alignment Number O SIGN IN TO OFFICE It looks like your stored credentials are out of date. Please sign in as yingenchew@ufl.edu so we ca A1 fax Number G H J 2 8 4 B D E F 1 Number Theme Name Minifigs Pieces USPrice 2 30311 City Swamp PC 1 51 3.49 3 6012 Castle Siege Cart 2 54 3.5 4 30105 Friends Mailbox 1 41 3.99 5 30204 Friends Wish Four 1 44 3.99 6 30302 Marvel Su Spider-Ma 1 45 3.99 7 30349 City Sports Car 1 47 3.99 30303 DC Comic: The Joker 1 47 3.99 9 7473 Dino Atta Steel Sprit 1 42 4 10 7409 Adventure Secret oft 2 42 4 11 4172 Creator Tina's Hou 1 43 4 12 6526 Town Red Line F 1 47 4 13 6835 Space Saucer Sco 1 47 4 14 6431 Town Road Resc 1 48 4 15 6550 Town Outback R 1 49 4 16 7030 World City Squad Car 1 52 4 17 6861 Space X1 Patrol 1 55 4 18 6846 Space Tri-Star V 1 69 4.45 19 6020 Castle Magic Sho 1 47 4.5 20 6538 Town Rebel Roa 1 57 4.5 21 6491 Time Crui: Rocket Ra 1 58 4.5 lego2 Ready lego3 [R File Home Insert Page Layout Formulas Data Review View Help Calibri 11 A GE ab Wrap Text Merge & Center Paste Clipboard Font Alignment A1 fax Number G H 5 2 8 B D E F 1 Number Theme Name Minifigs Pieces USPrice 2 1349 Studios Steven Sp 7 442 180 3 1351 Studios Movie Bac 3 211 60 4 1376 Studios Spider-Ma 5 248 30 5 1382 Studios Scary Labc 6 493 50 6 1737 Space Scorpion 2 196 20 7 1789 Space Star Hawk 2 292 27 1821 Town Rally Race 3 196 11 9 1822 Aquazone Sea Claw 2 192 20 10 1896 Town Trauma TE 5 291 27.5 11 1906 Castle Majisto's 3 195 20 12 2126 Trains Train Cars 5 378 69.5 13 2150 Trains Train Stati 8 599 14 2152 Space Robo Rapt 1 221 20 15 2153 Space Robo Stall 2 280 30 16 2154 Space Robo Mas 2 366 36 17 2263 Ninjago Turbo Shr 3 298 29.99 18 2504 Ninjago Spinjitzul 3 373 49.99 19 2506 Ninjago Skull Trucl 4 515 59.99 20 2519 Ninjago Skeleton ! 7 371 29.99 21 2520 Ninjago Ninjago B 2 463 49.99 22 2521 Ninjago Lightning 4 645 79.99 23 3038 Technic Super Cha 2 366 70 lego3 5 73 2 2 3 Overview For this assignment, you are going to load a series of files containing data and search the loaded data for specific criteria. That might sound a bit dry, but the files contain information about LEGO sets, and everyone loves LEGO! The structure of this assignment is a bit open-ended; you can solve this problem in any way that you see fit. Description First things first, the files: There are 3 main data files that you will be loading in this assignment: lego1.csv lego2.csv lego3.csv The data that you will be loading is information about a LEGO set: 1. Its set number (really a string, something like: 10195-1) 2. The theme it comes from (City, Technic, Star Wars, etc.) 3. The name of the set 4. How many parts and minifigures it contains (if any) 5. Its price in US dollars for this variable, use a double instead of a float Your goal is to read this from 1 of or more of these files, store the data, and then search it based on a few different criteria. Main.cpp is the only file required for this assignment, but you are free to write any class/functions that you see fit to assist you solve this problem. Main.cpp has some structure to it already to help you get started. Take some time to think about the problem, and how you might go about this before diving in. Searches The different searches you will perform will be based on a menu that might look like this: 1. Most expensive 2. Largest piece count 3. Search for set name containing... 4. Search themes... 5. Part count information 6. Price information 7. Minifigure information 8. If you bought one of everything... Sample Outputs Which file(s) to open? 1. legol.csv 2. lego2.csv 3. lego3.csv 4. All 3 files Total number of sets: 767 The most expensive set is: Name: Death Star Number: 75159 Theme: Star Wars Price: $499.99 Minifigures: 27 Piece count: 4016 Which file(s) to open? 1. legol.csv 2. lego2.csv 3. lego3.csv 4. 811 3 files Total number of sets: 710 The set with the highest parts count: Name: Surf N' Sail Camper Number: 6351 Theme: Town Price: $19.00 Minifigures: 2 Piece count: 1BB Sets matching "Police": 71021 Classic Police Officer $3.99 75046 Coruscant Police Gunship $49.99 2811 Fire and Police Station $50.00 30311 Swamp Police Helicopter $3.49 6533 Police 4 X 4 $4.75 30282 Super Secret Police Enforcer $4.99 7236 Police Car $5.99 6684 Police Patrol Squad $6.50 60006 Police ATV $6.99 7279 Police Minifigure Collection $9.99 10720 Police Helicopter Chase $9.99 Average part count for 971 sets: 550 o su lego1 [Read-Only] - Excel (Unlicensed Product) File Home Insert Page Layout Formulas Data Review View Help Tell me what you want to do 11 - ab Wrap Text General Calibri BIU Paste 4.0 .00 A Merge & Center $ - % Conditional For Formatting Ta Style 1 Clipboard Font Alignment Number A1 for Number H J L N 2 B D E F 1 Number Theme Name Minifigs Pieces US Price 4653 4 Juniors Dump Tru 1 27 10 3 4858 4 Juniors Doc Ock's 3 55 15 4 4860 4 Juniors Doc Ock's 3 130 30 5 7070 4 Juniors Catapult R 1 22 5 7072 4 Juniors Captain Ki 1 36 13 7 7075 4 Juniors Captain Re 4 131 40 2913 Action WF Constructi 2 29 30 10182 Advanced Cafe Corn 3 2056 139.99 10194 Advanced Emerald N 3 1085 99.99 1 10197 Advanced Fire Brigad 4 2231 149.99 2 10244 Advanced Fairgroun 12 1746 149.99 3 10246 Advanced Detective 6 2262 159.99 4 10247 Advanced Ferris Wh 10 2464 199.99 5 10257 Advanced Carousel 7 2670 199.99 6 10260 Advanced Downtow 6 2480 169.99 7 2879 Adventure Desert Ex 5 196 20 8 5913 Adventure Dr. Kilroy' 1 21 3 9 5934 Adventure Dino Expl 2 90 15 20 5948 Adventure Desert Ex 5 196 20 11 5956 Adventure Expedition 175 20 -2 5987 Adventure Dino Rese 6 617 80 -3 7414 Adventure Elephant 3 86 lego1 2 4 20 AS lego2 [Read-Only] - Help Tell me what File Home Insert Page Layout Formulas Data Review View 11 General Calibri A ab Wrap Text Paste Merge & Center $ - % Clipboard Font Alignment Number O SIGN IN TO OFFICE It looks like your stored credentials are out of date. Please sign in as yingenchew@ufl.edu so we ca A1 fax Number G H J 2 8 4 B D E F 1 Number Theme Name Minifigs Pieces USPrice 2 30311 City Swamp PC 1 51 3.49 3 6012 Castle Siege Cart 2 54 3.5 4 30105 Friends Mailbox 1 41 3.99 5 30204 Friends Wish Four 1 44 3.99 6 30302 Marvel Su Spider-Ma 1 45 3.99 7 30349 City Sports Car 1 47 3.99 30303 DC Comic: The Joker 1 47 3.99 9 7473 Dino Atta Steel Sprit 1 42 4 10 7409 Adventure Secret oft 2 42 4 11 4172 Creator Tina's Hou 1 43 4 12 6526 Town Red Line F 1 47 4 13 6835 Space Saucer Sco 1 47 4 14 6431 Town Road Resc 1 48 4 15 6550 Town Outback R 1 49 4 16 7030 World City Squad Car 1 52 4 17 6861 Space X1 Patrol 1 55 4 18 6846 Space Tri-Star V 1 69 4.45 19 6020 Castle Magic Sho 1 47 4.5 20 6538 Town Rebel Roa 1 57 4.5 21 6491 Time Crui: Rocket Ra 1 58 4.5 lego2 Ready lego3 [R File Home Insert Page Layout Formulas Data Review View Help Calibri 11 A GE ab Wrap Text Merge & Center Paste Clipboard Font Alignment A1 fax Number G H 5 2 8 B D E F 1 Number Theme Name Minifigs Pieces USPrice 2 1349 Studios Steven Sp 7 442 180 3 1351 Studios Movie Bac 3 211 60 4 1376 Studios Spider-Ma 5 248 30 5 1382 Studios Scary Labc 6 493 50 6 1737 Space Scorpion 2 196 20 7 1789 Space Star Hawk 2 292 27 1821 Town Rally Race 3 196 11 9 1822 Aquazone Sea Claw 2 192 20 10 1896 Town Trauma TE 5 291 27.5 11 1906 Castle Majisto's 3 195 20 12 2126 Trains Train Cars 5 378 69.5 13 2150 Trains Train Stati 8 599 14 2152 Space Robo Rapt 1 221 20 15 2153 Space Robo Stall 2 280 30 16 2154 Space Robo Mas 2 366 36 17 2263 Ninjago Turbo Shr 3 298 29.99 18 2504 Ninjago Spinjitzul 3 373 49.99 19 2506 Ninjago Skull Trucl 4 515 59.99 20 2519 Ninjago Skeleton ! 7 371 29.99 21 2520 Ninjago Ninjago B 2 463 49.99 22 2521 Ninjago Lightning 4 645 79.99 23 3038 Technic Super Cha 2 366 70 lego3 5 73 2 2 3 Overview For this assignment, you are going to load a series of files containing data and search the loaded data for specific criteria. That might sound a bit dry, but the files contain information about LEGO sets, and everyone loves LEGO! The structure of this assignment is a bit open-ended; you can solve this problem in any way that you see fit. Description First things first, the files: There are 3 main data files that you will be loading in this assignment: lego1.csv lego2.csv lego3.csv The data that you will be loading is information about a LEGO set: 1. Its set number (really a string, something like: 10195-1) 2. The theme it comes from (City, Technic, Star Wars, etc.) 3. The name of the set 4. How many parts and minifigures it contains (if any) 5. Its price in US dollars for this variable, use a double instead of a float Your goal is to read this from 1 of or more of these files, store the data, and then search it based on a few different criteria. Main.cpp is the only file required for this assignment, but you are free to write any class/functions that you see fit to assist you solve this problem. Main.cpp has some structure to it already to help you get started. Take some time to think about the problem, and how you might go about this before diving in. Searches The different searches you will perform will be based on a menu that might look like this: 1. Most expensive 2. Largest piece count 3. Search for set name containing... 4. Search themes... 5. Part count information 6. Price information 7. Minifigure information 8. If you bought one of everything... Sample Outputs Which file(s) to open? 1. legol.csv 2. lego2.csv 3. lego3.csv 4. All 3 files Total number of sets: 767 The most expensive set is: Name: Death Star Number: 75159 Theme: Star Wars Price: $499.99 Minifigures: 27 Piece count: 4016 Which file(s) to open? 1. legol.csv 2. lego2.csv 3. lego3.csv 4. 811 3 files Total number of sets: 710 The set with the highest parts count: Name: Surf N' Sail Camper Number: 6351 Theme: Town Price: $19.00 Minifigures: 2 Piece count: 1BB Sets matching "Police": 71021 Classic Police Officer $3.99 75046 Coruscant Police Gunship $49.99 2811 Fire and Police Station $50.00 30311 Swamp Police Helicopter $3.49 6533 Police 4 X 4 $4.75 30282 Super Secret Police Enforcer $4.99 7236 Police Car $5.99 6684 Police Patrol Squad $6.50 60006 Police ATV $6.99 7279 Police Minifigure Collection $9.99 10720 Police Helicopter Chase $9.99 Average part count for 971 sets: 550

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions