Question: I need help with my practice lab for C++ and I want to make sure I'm doing this right. Any help is appreciated! Unit 2:
I need help with my practice lab for C++ and I want to make sure I'm doing this right. Any help is appreciated!


Unit 2: Programming CSIS 123 Programming Fundamentals: Tha purpose of this lab is to gain practice using variahlas for basic user input, processing, and cutput Your friand has approached yau, asking to write a prngram to hop sort filas on a media server You want to sh your friend a praof of cancept for a prcgram that can take data entry, and can output pocassad data Do not use any concepts beyond the currend chapter, uriless explicity stated in the tasks below Task 1: Setup Variables 1. Declare varisbles to contain 5 ilenames, of type string 2. Declare varisbles to cont 5 fle sizes, of type double 3. Declare a variable to conlain he sum of al fle sizes, of type duuble 4 Declare ? variable to curtain the average ci all file sizes, oi type double 5. Separate Task 1 from Task 2 by pressing ENTER on your keyboard. This proides asingle line of whitespace in your code Task 2: Input Dala 1. Prompt the user to. dEnter file name and file size in MB seperated by a spece. 2. Note lhe character preceding the sling Enter". This pushes the oulput one tab space inward rom the margin 3. use cin to slure Uhe dala into variables frum Tagk 1.1 and Task 1.2 4. Repeat the prompl and input 4 ore imes. Yuu should have a tolal of 5 prompts, and 5 requests for dala 5. Separate Task 2 from Task 3 by pressing ENTER on your keyboard. This provides a single line of whitespuce in your code Task 3: Process Datu 1. Agsign the sum of al variables trom Tesk 1.2 to the verable from Task 1.3 2. Divide the varisble from Task 1.3 by 5, and assign thst value to the variable rom Task 1.4 3. Separate Tak 3 rom Task 4 by pressing ENTER on your keyboard. This proides a single line of whitespace in your code Task 4: Output Dato 1. Outout the variables from Task 1.1 and Task 1 2 in e torm of complete sentences Example is MB in size 2. This should be done a total of 5 times, but the first of thoge 5 should use 'nin to seperate the user input trom the system output 3. Inform the user how much spece the files re taking up using the varieble from Task 1.3. This should be done in the form ot a complete sentence, and should use nin to provide 4. Inform the user of the average gize of each file using the varisble Irom Task 14. This should be done in the form of a complete 9entence. nstural separetion ot output on the screen counin'tYou are using losk 5: Comment Your Program 1. Determine appropriate locacions to comment your code. 2. Is there a confusing section of code? o Consider there is a less confusing way to structure your code o If not, brietly explain the whet the secton ot code would sccomplish o f so, briely explain the purpo ofthe math operstion o There should nol be, Uhal is nol current material a When the me comes, you should explain your contrel staterneril with a commer. o There should not be, that is nat current material o When the time comes,you should explain your defned function with a comment 3. Is there a maths operation? 4. Is there a control statemenl? 5. Is there defined function? . You shauld nct includc teaching comments ta cxplain: Basifunctionality Existing commands Daclaring variahlas Outpuing to tha scrasn Preprocassor diractvas
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
