Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This needs to be in C++ You will vrite a prograrn tu rrake a ferecast of the user's future job irncluding where they will work,
This needs to be in C++
You will vrite a prograrn tu rrake a ferecast of the user's future job irncluding where they will work, hown mrarny years they 'vill work there, their yearly salary, and the company car theyy will drive. You must follow the specific. dirertions on how to write the program. Looking at just the sarmple output without reading the specific instructions will likely result in a low grade because pou will not be writing the program as spetifiot. You must lock ot hoth. INSTRUCTIONS 1. In your CSC1300LAB folder, create a LabBPurple_yourTTUusername folder. 2. Open Visual Studio Code (Vs Code). 3. Cick on File and then select Open Folder. Select the folder that vou just created. 4. In VS Code, tlick cr the New File icces to create a new file in the folder. 5. Type lab3.epp to create a new file with that name. b. Include the following C++ libraries in your source file: a. lostrcam for input and output b. Iomanip - to use stream manipulators to print two numbers after the decimal in floating-point numbers c. cstalib - to sced \& generate random numbers d. ctime - to seed random number penerator 7. Create all your wariables at the top of your main function (hust INSinf of your main functian). If you view the sample output first, pou can see there are several lines with stars. 8. Create a string variable and initialize it with 79 ' 'characters. Then, every time you want a line of stars printed, just print this string varlable to the seroen, Look at the example code below, string 11 neorstars (79,1+); cout (10,000.00) (random number between 1 and 10 14. Determine the user's future between 3 possible options. To do this, you will create a branch where pour code will cheedr the fallawing: 3. If the uscr's integer is greater than or cqual to 20 , then the user's option number is 1 . b. Othervise, if tha user's integer is greater than 7 , but less than 20 , then the user's aption nuarnher is 2 . c. Othendse, If the user's integer is 7 or less, than the user's option number is 3 . 15. Create a switch statement to print the results where the cases are based off of the user's optlon number. Refer to the sample output for the format of how the results should be printed. Note that you can print the line of stars hefore the switch statement and the ending line of stars after the switch ends. a. Case 1 print the user's 13 company, number of years (step t13 above), salary (step t13 above), the color red, and the user's 2nd vehicle thev entered. b. Case 2 print the user's 2nd comparry, nurnber of years (step 113 above), salary (step N13 abone), the color royal blue, and the user's 2ne wehide they entererd. c. Case 3 print the user's 3ni company, number of years (step \#13 abowe), salary (step \#13 abowo), the color neon crange, and the urer's 3d vehirle they entered. 16. Malke sure to put a comment block at the top of your codle with the filename, author (you], date, and purpose of the program. Also make sure to put in comments to identify major sections of pour code. Sample autput to shrwe validating user inpust. Lser inpust is highlighted in yollow. TOI EORZCS.T Enter in the internation requeated below and I Will determine the job ro' will get, haw aany years you will wark there, your aalary, and the coupany car you. wil1 A1?e. Anothur ceazeray you 1ike=coug1a Mempany you batu: Maped Vmhi=1m ymu likm: 1975 Cadilime gidsradn Mnnt.har rahicl your 1ika20k Twtinman nipha.. Vehicle you hate: 1999 Cowbin Sgstron Fiok an integer botween 1 to 25 \{inclusively\}; 15 You will wark at doogle for 19 yeara naking $900000.20 per pear and dxiving a reyal klue 2023 DeLorean klpha 5 an bulasa tripo. SAMPLE OUTPUT 2 Fnter in thm infermatian =mqumnted bmlan and I will datmeninm thm jak yeu will get, hev many gesre yau will work thmrn, yaur malmyy, wnd thm enmpiy rar yau wil1 drism. Sompeny you like: snother coogsag you suse Company you hatei 7acssa Vehiole you likel 2022 Porache 718 CayanStep 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