...CMIS 102 Hands-On Lab // Week 3 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 both flow chart and pseudocode visualization), and implementation with C code. The example provided uses sequential and selection statements. Program Description: This program will calculate the area of a right triangle. The program will ask the user to enter the base and height and then use these values to calculate and then print the area of the triangle. If the area of the triangle is greater than 100 square units, an additional message is printed stating the triangle is too large for the specification. However; if the triangle is less than or equal to 100 square units, the additional message will state the triangle is within specifications. The design step will include both pseudocode and flow chart visualization. Analysis: I will use sequential and selection programming statements. I will define two float numbers for the base and height: base, height. Float numbers were selected as opposed to integers to make sure triangles of all dimensions are possible and not just whole numbers. Float number will store the area: area The area will be calculated by this formula: Area = ½ * (base * height) For example if the base was 4.2 and the height was 5.3 the area would be calculated as: Area = ½ * (4.2 * 5.3) = ½ * (22.26) = 11.13 The additional selection...
Words: 723 - Pages: 3