(CSCI 2010 - Quiz 1: 2026 Test Preparation)
Only one constructor may be defined per class. False
What is a method? A member of a class that defines an operation on an object.
A classed called Printer has a method called printPage(4);
printDocument. This calls a void method in the Printer
class called printPage that takes an integer
representing the page number as an argument. How
should printDocument call printPage with an argument
of 4?
Given a class called Rectangle with a constructor that Rectangle rect = new Rectangle(8.2, 3.5);
takes two doubles as arguments representing the
dimensions, which of the following is the correct way
to invoke that constructor?
Page 1 3/30/2026, 4:48:56 PM
Only one constructor may be defined per class. False
What is a method? A member of a class that defines an operation on an object.
A classed called Printer has a method called printPage(4);
printDocument. This calls a void method in the Printer
class called printPage that takes an integer
representing the page number as an argument. How
should printDocument call printPage with an argument
of 4?
Given a class called Rectangle with a constructor that Rectangle rect = new Rectangle(8.2, 3.5);
takes two doubles as arguments representing the
dimensions, which of the following is the correct way
to invoke that constructor?
Page 1 3/30/2026, 4:48:56 PM