942 words - 4 pages

Problem Definition: The problem here is to calculate the usable area in square feet of house. We are to assume that the house has a maximum of four rooms, and that each room is rectangular.

Problem Analysis

Objective: Devise a program that calculates the usable area of a house. This is minimally what is being requested.

• Outputs: This problem calls for a simple output, the total usable square foot of the house, with a maximum of four rooms, each room being rectangular.

Total number of square foot = Area of Room1 + Area of Room2 + Area of Room3 + Area of Room4

• Inputs: The problem will require us to know the length and width of each of the four rectangular ...view middle of the document...

Program Design –

The tasks involved in this program are to prompt the user for the length and width of each of the rooms and then multiply the values in order to obtain the area of each room and finally taking the sum of those values to obtain the total usable area of the house.

Main Module

Declare AreaofRoom1 As Float

Declare AreaofRoom2 As Float

Declare AreaofRoom3 As Float

Declare AreaofRoom4 As Float

Declare TotalAreaofHouse As Float

Declare Length1 As Float

Declare Length2 As Float

Declare Length3 As Float

Declare Length4 As Float

Declare Width1 As Float

Declare Width2 As Float

Declare Width3 As Float

Declare Width4 As Float

Input Data Module

Write “What is the Length of Room 1”

Input Length1

Write “What is the Width of Room 1”

Input Width1

Write “What is the Length of Room 2”

Input Length2

Write “What is the Width of Room 2”

Input Width2

Write “What is the Length of Room 3”

Input Length3

Write “What is the Width of Room 3”

Input Width3

Write “What is the Length of Room 4”

Input Length4

Write “What is the Width of Room 4”

Input Width4

Perform Calculations Module

Set AreaofRoom1 = Length1 * Width1

Set AreaofRoom2 = Length2 * Width2

Set AreaofRoom3 = Length3 * Width3

Set AreaofRoom4 = Length4 * Width4

Set TotalAreaofHouse = AreaofRoom1 + AreaofRoom2 + AreaofRoom3 + AreaofRoom4

Output Results Module

Write “The Total Area of House is: ” + TotalAreaofHouse

Flow Diagram – this is where you attach your flow diagrams for each of your modules. If you are using Raptor you would attach the Raptor diagrams by copying the diagram to the clipboard and pasting it into your assignment. If you are not using Raptor create your flow diagrams using another flowcharting tool.

B. Program Pseudocode –

Start

Declare AreaofRoom1 As Float // variables are a float variable

Declare AreaofRoom2 As Float

Declare AreaofRoom3 As Float

Declare AreaofRoom4 As Float

Declare TotalAreaofHouse As Float

Declare Length1 As Float

Declare Length2 As Float

Declare Length3 As Float

Declare Length4 As Float

Declare Width1 As Float

Declare Width2 As Float

Declare Width3 As Float

Declare Width4 As Float

Write “What is the Length of...

Beat writer's block and start your paper with the best examples