University of Iowa Computer Science Department

Quiz 03


1. Assume a class named Room has been declared with a constructor that takes two arguments, a width and a length. Write the statement that will create a new Room object of width 20.1 feet and a length of 15.7 feet. Store the newly created Room object in a variable named room.

2. When looking at a method header, what two characteristics identify it as a constructor?

UI CLAS CRA ACM Valid CSS! Valid XHTML 1.0 Transitional Level Double-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0 Cynthia tested
| Modified: .