Wednesday, March 13, 2019
Cmis102 Assignment 1
CMIS102 Homework grant 1 (Worth 13% of your grade) Problem rendering Calculate the usable area in firm feet of hearth. Assume that the abode has a maximum of four agencys, and that severally room is rectangular. A. Problem abstract Following the directions in the assignment, clearly indite up your problem synopsis in this section. This program allow for compute the area of a erect that has four rectangular rooms. Output is the value of the heart and soul area (total_area) of the house and is to be calculated by area/ distance/width insert (A1, A2, A3, A4, L1, L2, L3, L4, W1, W2, W3, and W4) variables declared as mishandle variables.The program will utilize the type mathematical locution of obtaining area of a rectangle A = L*W. As well, the formula will be coded in the program as body politic=length*width (A=L*W) respectively for each room. L1 = length of eldest room, as float W1 = width of starting signal room, as float A1=L1*W1 L2 = length of rootage room, as float W2 = width of first room, as float A2=L2*W2 L3 = length of first room, as float W3 = width of first room, as float A3=L3*W3 L4 = length of first room, as float W4 = width of first room, as float A4=L4*W4 B. design Design Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. raptor software will be used in designing and examination this program. The three fundamental tasks of creating a program will be interconnected 1) Input information Use of Raptor to add Input and Assignment symbols will allow user to input selective information when running the program. The important and Input_Data modules will heavily use the Input and Assignment symbols in Raptor. In the Input_Data_module, variables will be assigned and declared.As well, the Main module will behave the entire program by calling the completed sub-charts. 2) Calculate formula Use formulas to attain total_area of the house by calculating area of e ach of the four rooms. total_area = A1 + A2 + A3 + A4 to get the sums of all areas we must calculate the formula for each room A1 = L1*W1 A2 = L2*W2 A3 = L3*W3 A4 = L4*W4 3) Obtain Output The program will display the resolution of total_area from process and calculation in the previous two steps. The design of the modular program will be created in Raptor and the design will look like this Main moduleComment This program computes the total area of a four bedroom house in square footage. Call Input_Data_module Call Calculations_module Call Output_Data_module End Input_Data_Module pen distance of first room (L1) Write Width of first room (W1) Write Length of second room (L2) Write Width of second room (W2) Write Length of third room (L3) Write Width of third room (W3) Write Length of stern room (L4) Write Width of fourth room (W4) Call Calculations_module End Perform Calculations module Declare A1, A2, A3, and A4 as floatSet A1 = L1*W1 Set A2 = L2*W2 Set A3 = L3*W3 Set A4 = L4*W4 Set total_area = (A1+A2+A3+A4) End Output Data module Write The total area of house is + total_area End C. Program Comments and examen Data Following the directions in the assignment, include your test data and expected results in this section. Table 1. Include your test data bow here TEST RUN OF DATA INPUT INTO PROGRAM fashion Input Length & Width (in feet) Expected Output Footage of house (in feet) adjudicate electioneering 1 Area of Rectangle A=L*W means 1 L=10, W=5 50=10*5 room 2 L=10, W=5 50=10*5 mode 3 L=10, W=5 50=10*5 Room 4 L=10, W=5 50=10*5 Total Area=A1+A2+A3+A4 cc sq ft. Test Run 2 Area of Rectangle A=L*W Room 1 L=12, W=6 72=12*6 Room 2 L=12, W=6 72=12*6 Room 3 L=12, W=6 72=12*6 Room 4 L=12, W=6 72=12*6 Total Area=A1+A2+A3+A4 288 sq ft. Test Run 3 Area of Rectangle A=L*W Room 1 L=20, W=10 200=20*10 Room 2 L=20, W=10 200=20*10 Room 3 L=20, W=10 200=20*10 Room 4 L=20, W=10 200=20*10 Total Area=A1+A2+A3+A4 800 sq ft.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment