# Cmis 102 Assignment 4

0 Comments / 1 / By

1 Lorielle A. Morgan CMIS 102 6381 March 4, 2016 CMIS 102 Hands-On Lab Week 5 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. Test Plan To verify this program is working properly the input values could be used for testing: Test Case Input Expected Output 1 value=1 value=1 value=1 value=0 value=1 value=2 value=0 value=1 value=3 value=2 Average = 1.2 2 value=100 value=100 value=100 value=100 value=100 value=200 value=200 value=200 value=200 value=200 Average = 120.0 1 Lorielle A. Morgan CMIS 102 6381 March 6, 2016 CMIS 102 Hands-On Lab Week 7 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, and implementation with C code. The example provided uses sequential, repetition, selection statements and two user-defined function. Program Description This program will provide options for a user to calculate the square or cube of a positive Integer input by a user. The program will prompt the user to enter an Integer and then prompt the user if they want to calculate the square of the cube of the number. Based on the inputs of the user, the program will output the square of the cube of the positive integer. The program will then print the Integer and square or cube of the integer based on the user’s original choice. The program will continue to prompt the user for Integers and their calculation choice until the user enters a negative integer. The square and cube calculations should be calculated using a function. Test Plan To verify this program is working properly the input values could be used for testing: Test Case Input Expected Output 1 IntValue=10 MenuSelect=1 Square of 10 is 100 2 IntValue=10 MenuSelect=2 Cube of 10 is 1000 3 intValue=-1 MenuSelect=N/A -->