0 LIKES LikeUnLike
I have written a class that outlines sets the Length and the Width and has a Method to calculate the area. My driver Program has to prompt the user to enter the how many rooms they have which initialises the size of an array in which I have a for loop to as the user to enter the Length and Width. This I can do but how to I get the array to hold each variable so I may output the value. I have tried something like Room roomNo = new Room /* to create a new room classand double myRoom[] /* to initialise the arrayand for every count on the for loop myRoom = newRoom.getLengthBut this brings up a incompatible data type errorPlease Help!!!!Cheers
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 1 answers.