Premium Essay

Write a Program, Using Functions, That Calculates the Area and Permieter of a Rectangle Whose Dimensions (Length and Width) Are Provided by a User

In:

Submitted By mjculber
Words 471
Pages 2
Submit Files - Homework 4
-------------------------------------------------
Top of Form Hide Folder Information | Folder | | Homework 4 | Instructions | | FunctionsIn this homework, you will design a program to perform the following task:Write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (Length and width) are provided by a user. Assume the rooms are rectangular and that the user can enter from 1 to 10 rooms for the house. Also calculate and display the total area and total perimeter (i.e. the sum of the perimeters) of the house. Note: this is very similar to Assignment 1 and you can reuse any code there that is appropriate. Before attempting this exercise, be sure you have completed all of chapter 8 and course module readings, participated in the weekly conferences, and thoroughly understand the examples throughout the chapter. There are 4 main components of your submission including the problem analysis, program design and documentation, and sample test data.1. Provide your analysis for the following problem statement: You need to write a program that calculates the area and perimeter of a rectangle whose dimensions (Length and width) are provided by a user.Your analysis should be clearly written and demonstrate your thought process and steps used to analyze the problem. Be sure to include what is the required output? What is the necessary input and how you will obtain the required output from the given input? Also, include your variable names and definitions. Be sure to describe any necessary formulas and sample calculations.2. Provide your program design for the problem you analyzed for calculating and displaying the area and perimeter of a rectangle. Always work for modular design where possible. Be sure to use separate functions for calculating the area and perimeter of the rectangle.

Similar Documents