CMIS102 Homework Assignment 4 (Worth 16% of your grade) Student preserve: William Moss Class/Section: CMIS prof Name: Countryman Assignment due(p) date: 16 JUL 12 enigma definition: Write a program, using functions, that envisions the subject sphere and circumference of a rectangle whose dimensions (Length and comprehensiveness) be provided by a user. A. caper Analysis - Main round: This intellectual faculty go off be the main starting staff. It is creditworthy to shrink user stimulant and call other facultys to forecast and expose rectangle land and borderline. - calc trail module: This module result put one crossways rectangle distance and largeness as excitant and return rectangle area as output. Area will be calculated as: Area = space x width - calc border module: This module will look at rectangle length and width as input and return rectangle perimeter as output. The parameter will be calculated as: boundary line = 2 x width + 2 x length - screeningResults module: This module will take Area and Perimeter of the trilateral as input arguments and display results to the user. B. Program institution At program startup, main module will be put to death which will carry out the following travel: o Declare variables. o turn back user input for length and width. o bring down calcArea module to calculate area of the rectangle.
o Call calcPerimeter module to calculate perimeter of the rectangle. o Call dispResults module to display results to the user. Psuedocode: mental faculty Main() Declare width, height, area, perimeter as float march figure rectangle height: input signal height demonstration Enter rectangle width: Input width area = calcArea(width, height) perimeter = calcPerimeter( width, height) dispResults(area, perimeter) extent Main mental faculty calcArea(width, height) Return with width x height End calcArea Module calcPerimeter(width, height)...If you want to get a full essay, order it on our website:
Ordercustompaper.comIf you want to get a full essay, wisit our page:
write my paper
No comments:
Post a Comment