Threesuns

Email the Instructor

Contact

All Semesters

Semesters

All Courses

Courses

2017Fall

08.22.16 - 12.18.16

Introduction to Computer Programming

CSYS1203

Tuesday Thursday
01:00 PM - 02:20 PM

Rectangles with Error Checking

Lab02

Objective: To practice with flowcharts that show decisions

pastdue

Submit Your Solution

Lab02

Request a Copy of your Solution

Lab02

Requirements

Flowchart if valid and understandable 10 pts
Program design allows required inputs5 pts
Program design handles invalid inputs as described5 pts
Program design correctly finds the area of a rectangle5 pts
Program design produces required outputs in all cases5 pts
Total30 pts

Instructions

For this lab you will need to design the logic for a program using a flowchart. The program would allow the user to enter two numbers and if the two numbers appear valid they would be used to calculate the area of a rectangle.

Both of the input numbers will come from the user and will be whole numbers. There is the possibility the the user could enter a blank, a word, or a negative value for either number in which case the number would be considered invalid. If an invalid number is entered the user should immediately be shown an error message and the program should end.

If both of the input numbers are valid then the first number should be considered to be the width of a rectangle and the second number would be the rectangles height. Based on that, the area of the rectangle should be calculated and displayed for the user.