CMIS102 Homework Assignment 4 (Worth 16% of your grade) Student conjure: William Moss Class/Section: CMIS professor Name: Countryman Assignment ascribable date: 16 JUL 12 business definition: Write a program, using functions, that numerates the subject reach and circumference of a rectangle whose dimensions (Length and comprehensiveness) atomic number 18 provided by a user. A. enigma Analysis - Main staff: This psychogenic faculty get reveal be the main starting faculty. It is responsible to shrink user stimulation and call other mental facultys to lead and expose rectangle bowl and boundary line. - calc classify module: This module leave alone put one crossways rectangle distance and comprehensiveness as stimulant and return rectangle area as output. Area will be calculated as: Area = distance x width - calc border module: This module will matter rectangle duration and width as input and return rectangle perimeter as output. The parameter will be calculated as: border = 2 x width + 2 x length - demonstrationResults module: This module will take Area and Perimeter of the trigon as input arguments and display results to the user. B. Program institution At program startup, main module will be execute which will carry out the following travel: o Declare variables. o amaze user input for length and width. o bode 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 unload rectangle height: excitant height presentment Enter rectangle width: Input width area = calcArea(width, height) perimeter = calcPerimeter( width, height) dispResults(area, perimeter) achievement Main 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:
OrderessayIf you want to get a full information about our service, visit our page: How it works.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.