SlideShare a Scribd company logo
DEVRY CIS 170 C iLab 3 of 7 Looping
Check this A+ tutorial guideline at
http://www.cis170entirecourse.com/cis-
170/cis-170-c-ilab-3-of-7-looping
For more classes visit
http://www.cis170entirecourse.com
CIS 170 C iLab 3 of 7 Looping
Lab # CIS CIS170C-A3 Lab 3 of 7: Looping Lab Overview – Scenario/Summary
You will code, build, and execute a program that will use looping to determine the
score for a diver based on individual judge’s scores.
Learning outcomes:
Become familiar with the different types of looping structures. Be able to debug a
program of syntax and logic errors. Be able to use the debug step-into feature to step
through the logic of the program and to see how the variables change
values.Deliverables
Section
Deliverable
Points
Lab 3
Step 6: Program Listing and Output
45
Lab Steps
Preparation:
If you are using the Citrix remote lab, follow the login instructions located on the
iLab tab in Course Home.
Locate the Visual Studio 2010 icon and launch the application.
Lab:
Step 1: Requirements - DIVER Scoring Program
Your State Dive Association presently scores its diving competitions with pencil and
paper. They would like for you to design and develop a Dive Program in C++.
The paper forms that they presently use have the following:
Diver’s Name, City
JudgeScore1 - The scores entered are from 0 to 10.
JudgeScore2
JudgeScore3
JudgeScore4
JudgeScore5
DegreeOfDifficulty - This is assigned once for each diver.
OverAllScore - The overall score is the individual diver’s scores totaled and then
divided by the degree of difficulty. The highest and lowest scores are removed as
they are often skewed entries. Total the three scores left, divide them by 3, and then
multiply that by the DegreeOfDifficulty. The degree of difficulty ranges from 1.00 to
1.67.
Display the diver's information and overall score.
When the competition is complete, there is a summary reportcreated that lists the
total number of divers and the average of the overall scores.
Lab hints: When writing this lab, use nested loops. A nested loop is when one loop is
completely contained in another loop. In an inner loop, you will read the five scores
one at a time. Every time you read the score (in the loop), you will compare the score
to the highest so far and also to the lowest so far so you can determine the highest
and lowest scores, in addition to adding the scores up one at a time.
You also need to have your program process multiple divers. Put this in an outer
loop. After you process the information for one diver, prompt the user if she/he
wants to process another diver. Allow the user to type either a “Y” or “y” to enter
another diver's information; otherwise, exit the loop. Write an event summary by
calculating and displaying the average score for all divers and the total number of
divers participating.
Garbage in Garbage Out (GIGO): The data being entered by the user needs to be
validated. Scores by judges may range between 0 and 10. If the user enters an invalid
score, display an error message, and prompt for the score again. Keep doing this
until the user enters the score correctly. The degree of difficulty may range from 1.00
to 1.67.
Sample output from program
Report to the media
Event: Diving competition
Enter the diver's name: Sue Jones
Enter the diver's city: Dallas
Enter the score given by judge #1: 45
Invalid score - Please reenter (Valid Range: 0 - 10)
Enter the score given by judge #1: 3
Enter the score given by judge #2: 4.5
Enter the score given by judge #3: 6.7
Enter the score given by judge #4: 89
Invalid score - Please reenter (Valid Range: 0 - 10)
Enter the score given by judge #4: 8
Enter the score given by judge #5: 9.2
What was the degree of difficulty? 1.9
Invalid degree of difficulty - Please reenter (Valid Range: 1 - 1.67)
What was the degree of difficulty? 2
Invalid degree of difficulty - Please reenter (Valid Range: 1 - 1.67)
What was the degree of difficulty? 1.2
Diver: Sue Jones, City: Dallas
Overall score was 7.68
Do you want to process another diver (Y/N)? y
Enter the diver's name: Dave Smith
Enter the diver's city: Houston
Enter the score given by judge #1: 5.7
Enter the score given by judge #2: 6.8
Enter the score given by judge #3: 7.6
Enter the score given by judge #4: 8.7
Enter the score given by judge #5: 6.7
What was the degree of difficulty? 1.1
Diver: Dave Smith, City: Houston
Overall score was 7.74
Do you want to process another diver (Y/N)? n
EVENT SUMMARY
Number of divers participating: 2
Average score of all divers: 7.71
Press any key to continue . . .
Step 2: Processing Logic
Using the pseudocode below, write the code that will meet the requirements.
Write report heading
Loop as long as there are divers to process
Input diver's name and city
Initialize highest score, lowest score and total score
Using a do-while loop input the 5 judge's scores
Validate the score to ensure it is between 0 and 10
Add score to total
Determine highest and lowest scores
Input and validate the degree of difficulty
Calculate the overall diver's score
Display the diver's information and overall score
Add diver's overall score to the final score
Add 1 to the number of divers
Prompt the user if she wants to process another diver
End-Loop
Calculate the average score for all divers
Display the number of divers and the average score for all divers
Step 3: Create a New Project
Create a new project and name it LAB3.
Write your code using the Processing Logic in Step 2. Make sure to save your
program.
Step 4: Build Solution
To compile the program, click Debug then Build solution (F7). You should receive no
error messages. If you see some error messages, check the code above to make sure
you didn’t key in something wrong. Once you make your corrections to the code, go
ahead and click Build >> Build Solution again.
Step 5: Execute the Program
Once you have no syntax errors, to execute or run your program, click Debug on the
menu bar and then click Start Debugging.

More Related Content

PPT
Devry cis-170-c-i lab-3-of-7-looping
PPT
Devry cis-170-c-i lab-3-of-7-looping
DOCX
Cis 170 Extraordinary Success/newtonhelp.com
DOC
CIS 170 Focus Dreams/newtonhelp.com
DOC
CIS 170 Life of the Mind/newtonhelp.com   
DOC
CIS 170 Imagine Your Future/newtonhelp.com   
DOCX
9.6.28.8.53.10.62.-1.100.2.25.93..docx
DOC
Project report
Devry cis-170-c-i lab-3-of-7-looping
Devry cis-170-c-i lab-3-of-7-looping
Cis 170 Extraordinary Success/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   
9.6.28.8.53.10.62.-1.100.2.25.93..docx
Project report

Similar to Devry cis 170 c i lab 3 of 7 looping (20)

PPTX
3 Program Development Life Cycle.aaaaapptx
PPTX
Csci101 lect03 algorithms_i
PDF
Introduction to Computer Programming
DOCX
data analytics - python.docx
DOCX
data analytics - python.docx
DOC
Comp 122 lab 6 lab report and source code
PPTX
Standard algorithms
PPTX
2.1.1 PROBLEM SOLVING & DESIGN
PPTX
Fundamentals of Problem Solving using Python.pptx
DOCX
CIS 170 Become Exceptional--cis170.com
DOCX
CIS 170 Achievement Education--cis170.com
DOCX
CIS 170 Inspiring Innovation -- cis170.com
PPTX
ANALYSIS AND DESIGN OF ALGORITHMS -M1-PPT
PDF
PPS_Lab_Manual_2023-24[1] of Programming for problem solving
PPTX
[ASM]Lab5
PPT
Algorithms the fundamentals, For computer Science.ppt
PPT
C++ programming program design including data structures
PDF
CIS 170 Redefined Education--cis170.com
PDF
CIS 170 Education for Service--cis170.com
PPSX
Problem solving and design
3 Program Development Life Cycle.aaaaapptx
Csci101 lect03 algorithms_i
Introduction to Computer Programming
data analytics - python.docx
data analytics - python.docx
Comp 122 lab 6 lab report and source code
Standard algorithms
2.1.1 PROBLEM SOLVING & DESIGN
Fundamentals of Problem Solving using Python.pptx
CIS 170 Become Exceptional--cis170.com
CIS 170 Achievement Education--cis170.com
CIS 170 Inspiring Innovation -- cis170.com
ANALYSIS AND DESIGN OF ALGORITHMS -M1-PPT
PPS_Lab_Manual_2023-24[1] of Programming for problem solving
[ASM]Lab5
Algorithms the fundamentals, For computer Science.ppt
C++ programming program design including data structures
CIS 170 Redefined Education--cis170.com
CIS 170 Education for Service--cis170.com
Problem solving and design
Ad

More from shyaminfo04 (17)

PPT
Uop cmgt-433-week-4-team-red-team
PPT
Uop cmgt-433-week-2-team-red-team
PPT
Uop cmgt-433-week-1-individual-cyber-security -ict--legal-obligations-and-con...
PPT
Cmgt 431-week-1-threat-model-new
PPT
Cmgt 431-all-assignments-new
PPT
Cmgt 431-week-1-threat-model-new
DOC
Ese 633 week 3 dq 2
DOC
Ash ese 633 week 6 dq 1
DOC
Ash ese 633 week 5 dq 1
DOC
Ash ese 633 week 5 assignment collaborative problem solving
DOC
Ash ese 633 week 4 dq 1
DOC
Ash ese 633 week 4 assignment helping parents promote independence
DOC
Ash ese 633 week 2 dq 1 non
DOC
Ash eco 203 week 3 assignment efforts to reduce the budget deficit
DOC
Ash edu 675 week 6 dq 1 impact reflection new
DOC
Devry cis 170 c i lab 5 of 7 arrays and strings
DOC
Devry cis 170 c i lab 1 of 7 getting started
Uop cmgt-433-week-4-team-red-team
Uop cmgt-433-week-2-team-red-team
Uop cmgt-433-week-1-individual-cyber-security -ict--legal-obligations-and-con...
Cmgt 431-week-1-threat-model-new
Cmgt 431-all-assignments-new
Cmgt 431-week-1-threat-model-new
Ese 633 week 3 dq 2
Ash ese 633 week 6 dq 1
Ash ese 633 week 5 dq 1
Ash ese 633 week 5 assignment collaborative problem solving
Ash ese 633 week 4 dq 1
Ash ese 633 week 4 assignment helping parents promote independence
Ash ese 633 week 2 dq 1 non
Ash eco 203 week 3 assignment efforts to reduce the budget deficit
Ash edu 675 week 6 dq 1 impact reflection new
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 1 of 7 getting started
Ad

Recently uploaded (20)

PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
A systematic review of self-coping strategies used by university students to ...
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
Classroom Observation Tools for Teachers
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Cell Types and Its function , kingdom of life
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
Final Presentation General Medicine 03-08-2024.pptx
A systematic review of self-coping strategies used by university students to ...
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
STATICS OF THE RIGID BODIES Hibbelers.pdf
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Supply Chain Operations Speaking Notes -ICLT Program
202450812 BayCHI UCSC-SV 20250812 v17.pptx
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Orientation - ARALprogram of Deped to the Parents.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
01-Introduction-to-Information-Management.pdf
Microbial diseases, their pathogenesis and prophylaxis
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Classroom Observation Tools for Teachers
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Cell Types and Its function , kingdom of life
Chinmaya Tiranga quiz Grand Finale.pdf
Microbial disease of the cardiovascular and lymphatic systems
Paper A Mock Exam 9_ Attempt review.pdf.

Devry cis 170 c i lab 3 of 7 looping

  • 1. DEVRY CIS 170 C iLab 3 of 7 Looping Check this A+ tutorial guideline at http://www.cis170entirecourse.com/cis- 170/cis-170-c-ilab-3-of-7-looping For more classes visit http://www.cis170entirecourse.com CIS 170 C iLab 3 of 7 Looping Lab # CIS CIS170C-A3 Lab 3 of 7: Looping Lab Overview – Scenario/Summary You will code, build, and execute a program that will use looping to determine the score for a diver based on individual judge’s scores. Learning outcomes: Become familiar with the different types of looping structures. Be able to debug a program of syntax and logic errors. Be able to use the debug step-into feature to step through the logic of the program and to see how the variables change values.Deliverables Section Deliverable Points Lab 3 Step 6: Program Listing and Output 45 Lab Steps Preparation: If you are using the Citrix remote lab, follow the login instructions located on the iLab tab in Course Home.
  • 2. Locate the Visual Studio 2010 icon and launch the application. Lab: Step 1: Requirements - DIVER Scoring Program Your State Dive Association presently scores its diving competitions with pencil and paper. They would like for you to design and develop a Dive Program in C++. The paper forms that they presently use have the following: Diver’s Name, City JudgeScore1 - The scores entered are from 0 to 10. JudgeScore2 JudgeScore3 JudgeScore4 JudgeScore5 DegreeOfDifficulty - This is assigned once for each diver. OverAllScore - The overall score is the individual diver’s scores totaled and then divided by the degree of difficulty. The highest and lowest scores are removed as they are often skewed entries. Total the three scores left, divide them by 3, and then multiply that by the DegreeOfDifficulty. The degree of difficulty ranges from 1.00 to 1.67. Display the diver's information and overall score. When the competition is complete, there is a summary reportcreated that lists the total number of divers and the average of the overall scores. Lab hints: When writing this lab, use nested loops. A nested loop is when one loop is completely contained in another loop. In an inner loop, you will read the five scores one at a time. Every time you read the score (in the loop), you will compare the score to the highest so far and also to the lowest so far so you can determine the highest and lowest scores, in addition to adding the scores up one at a time. You also need to have your program process multiple divers. Put this in an outer loop. After you process the information for one diver, prompt the user if she/he wants to process another diver. Allow the user to type either a “Y” or “y” to enter another diver's information; otherwise, exit the loop. Write an event summary by calculating and displaying the average score for all divers and the total number of divers participating. Garbage in Garbage Out (GIGO): The data being entered by the user needs to be validated. Scores by judges may range between 0 and 10. If the user enters an invalid score, display an error message, and prompt for the score again. Keep doing this until the user enters the score correctly. The degree of difficulty may range from 1.00 to 1.67. Sample output from program Report to the media Event: Diving competition Enter the diver's name: Sue Jones Enter the diver's city: Dallas Enter the score given by judge #1: 45 Invalid score - Please reenter (Valid Range: 0 - 10)
  • 3. Enter the score given by judge #1: 3 Enter the score given by judge #2: 4.5 Enter the score given by judge #3: 6.7 Enter the score given by judge #4: 89 Invalid score - Please reenter (Valid Range: 0 - 10) Enter the score given by judge #4: 8 Enter the score given by judge #5: 9.2 What was the degree of difficulty? 1.9 Invalid degree of difficulty - Please reenter (Valid Range: 1 - 1.67) What was the degree of difficulty? 2 Invalid degree of difficulty - Please reenter (Valid Range: 1 - 1.67) What was the degree of difficulty? 1.2 Diver: Sue Jones, City: Dallas Overall score was 7.68 Do you want to process another diver (Y/N)? y Enter the diver's name: Dave Smith Enter the diver's city: Houston Enter the score given by judge #1: 5.7 Enter the score given by judge #2: 6.8 Enter the score given by judge #3: 7.6 Enter the score given by judge #4: 8.7 Enter the score given by judge #5: 6.7 What was the degree of difficulty? 1.1 Diver: Dave Smith, City: Houston Overall score was 7.74 Do you want to process another diver (Y/N)? n EVENT SUMMARY Number of divers participating: 2 Average score of all divers: 7.71 Press any key to continue . . . Step 2: Processing Logic Using the pseudocode below, write the code that will meet the requirements. Write report heading Loop as long as there are divers to process Input diver's name and city Initialize highest score, lowest score and total score Using a do-while loop input the 5 judge's scores Validate the score to ensure it is between 0 and 10 Add score to total Determine highest and lowest scores Input and validate the degree of difficulty Calculate the overall diver's score Display the diver's information and overall score Add diver's overall score to the final score Add 1 to the number of divers Prompt the user if she wants to process another diver
  • 4. End-Loop Calculate the average score for all divers Display the number of divers and the average score for all divers Step 3: Create a New Project Create a new project and name it LAB3. Write your code using the Processing Logic in Step 2. Make sure to save your program. Step 4: Build Solution To compile the program, click Debug then Build solution (F7). You should receive no error messages. If you see some error messages, check the code above to make sure you didn’t key in something wrong. Once you make your corrections to the code, go ahead and click Build >> Build Solution again. Step 5: Execute the Program Once you have no syntax errors, to execute or run your program, click Debug on the menu bar and then click Start Debugging.