Clara World Practical 6 - Expression, methods and arrays Problem 6_2 - Multiple Rooms Hows would write
Question:
Clara World Practical 6 - Expression, methods and arrays
Problem 6_2 - Multiple Rooms
Hows would write code for question?
/* PERMITTED COMMANDS
move, turnLeft, turnRight, treeLeft, treeRight, treeFront, onLeaf, putLeaf, removeLeaf, mushroomFront
JAVA
if, while, for
*/
Question:
first request the user to enter three integer numbers (room width, room height and the number of rooms). These numbers must be validated so that the house fits inside Clara's world. If any of the numbers does not satisfy this requirement - user must re-enter the corresponding number. When the numbers are correctly entered - Clara must draw the containing the desired number of rooms as shown in Figure 2. Each of the rooms would have the same dimensions (width and height) as entered by the user. In the example from Figure 2 the user has requested to draw a house with three rooms where each of the room has width = 6 and height = 5.
Introduction To Probability And Statistics
ISBN: 9781133103752
14th Edition
Authors: William Mendenhall, Robert Beaver, Barbara Beaver