1.State the assumptions and limitations in your program and tell us how it is re
ID: 3527574 • Letter: 1
Question
1.State the assumptions and limitations in your program and tell us how it is reflected in your pseudo code. For example, your assumption is the user can enter decimal value in the room length and your program will handle that. Limitation is, there is no way to dynamically increase room number from 4 to 5. This is just one example, and there can be more assumptions and limitations. Numbers: Room 1 (H=8ft W=11ft L=11 ft) Room 2 (H=8ft W=16 ft L=17ft) Room 3(H=7ft W=9 L=12ft) Room 4 (H=7ft W=13ft L=14ft) 2.State what exception conditions are handled in your pseudocode. For example, if by mistake, the input length of room length is negative, or character, how you have handled that in your pseudocode. This is just one example. You can add additional exception conditions.Explanation / Answer
IN C
STEP 1 : DECLARE STRUCTURE :
struct room {
float length ;
float height ;
float width ;
};
STEP 2 : DECLARE VARIABLE OF STUCTURE :
struct room Room[5] ; // here is the limitation on room is maximum 5
STEP 3 : TAKE INPUT IN THE ROOM VARIABLE :
for (i=0 ; i<=6 ; i++)
if (i<0 && i>4) then exit ;
else
cin >> l >> h >> w
if ( l <= 0 || h <= 0 || w <= 0 ) then re enter the l h w
else if ( isalpha(l) || isalpha(h ) || isalpha(w) ) then re enter the l h w
else
Room[i].length = l
Room[i].length = h
Room[i].length = w
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.