Homework 2 - CSC 119 - Homework 2 Multiple Choice Identify...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC 119 - Homework 2 Multiple Choice Identify the letter of the choice that best completes the statement or answers the question. ____ 1. What is the difference between these two constructors? public Transaction(){. ..} public Transaction(int x, int y){. ..} a. they initialize different variables c. they belong to two different classes b. they have different signatures d. they create different object types ____ 2. What happens when this statement is executed? Automobile car = new Automobile(1); a. An object of the Automobile class is created. b. An object of the Automobile class is declared, but not created. c. A constructor that accepts a string in the Automobile class is called. d. The default constructor in the Automobile class is called. ____ 3. What is the name of the class that contains this code? private Clock clock; private Alarm alarm; public AlarmClock(Date time){. ..} a. Clock b. Alarm c. AlarmClock d. can’t determine the class name from the information given ____ 4. What does the following code display? public class GradeCurveApp
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Homework 2 - CSC 119 - Homework 2 Multiple Choice Identify...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online