Shopping Cart
Your shopping cart is empty!

CMIS 102 Week 5 Hands-On Lab NEW

CMIS 102 Week 5 Hands-On Lab NEW
Model:Latest
Price: $10.00 $7.00
Qty:   Check out
This Tutorial Purchased: 8  Times.  Tutorial Rating: A

attachments This Tutorial contains following Attachments:

  • CMIS 102 Week 5 Hands-On Lab NEW.docx

CMIS 102 Week 5 Hands-On Lab NEW

 

Overview

This hands-on lab allows you to follow and experiment with the critical steps of developing a program including the program description, analysis, test plan, design (using pseudocode), and implementation with C code. The example provided uses sequential, selection and repetition statements.

Program Description

This program will calculate the average of 10 positive integers. The program will ask the user to 10 integers. If any of the values entered is negative, a message will be displayed asking the user to enter a value greater than 0. The program will use a loop to input the data.

Analysis

I will use sequential, selection and repetition programming statements. I will define two integer numbers: count, value and sum. count will store how many times values are entered. value will store the input. Sum will store the sum of all 10 integers. I will define one double number: avg. avg will store the average of the ten positive integers input.

The sum will be calculated by this formula:

Learning Exercises for you to complete

1. Change the code to average 20 integers as opposed to 10. Support your experimentation with screen captures of executing the new code.

2. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the code you created after step 1.

3. What happens if you entered a value other than an integer? (For example a float or even a string). Support your experimentation with screen captures of executing the code.

4. Modify the code to allow the user to enter an unspecified number of positive integers and calculate the average. In other words, the user could enter number of positive integers. (Hint: You can prompt the user for how many they want to enter. Or; you could use a sentinel value to trigger when the user has completed entering values). You may need to conduct some research on your own to solve this problem. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the code you created. Support your experimentation with screen captures of executing the new code

Write a review

Your Name:


Your Review: Note: HTML is not translated!

A   B   C   D   F  

Enter the code in the box below:



Assignment Cloud © 2019 All Rights Reserved