Question: s: C# CITP3310 Assignment 5 Rectangle Area The program will ask the user to enter the length and width of a rectangle and the display
s:

C#
CITP3310 Assignment 5 Rectangle Area The program will ask the user to enter the length and width of a rectangle and the display the rectangle's length, width and area on the computer screen (See sample output belowl The program's Main function must call the following four functions getLength-This function should ask the user to enter the rectangle's iength, validate then return that value as a double to the main function. setWidth -This function should ask the user to enter the rectangle's width, validate it, and the return that value as a double to the main function. * and . getArea-This function should accept the rectangle's length and width as arguments compute the rectangle's area with these arguments and return the rectangle's area to the main function The area is calculated by multiplying the length by the width displayData- This function should accept the rectangle's length, width, and area as arguments, and display them in an appropriate message on the computer screen (see sample output below). Input Validation: Do not accept length and width values lower than 0. Sample Output Enter the length:S ERROR: Enter a positive nunber. Enter the length: 15 inter the width:3 RROR:Enter a positive nunber. Enter the width: 30 lectangle Data ength: 15 idth: 30 area: 45 Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
