Exam 3: Implementing Classes

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

In the statement below, amount is referred to as the ____ parameter. public void deposit(double amount)

(Multiple Choice)
4.8/5
(38)

Which of the following corresponds to a valid constructor header for the Player class?

(Multiple Choice)
4.7/5
(37)

The black boxes from which a program is manufactured are called ___.

(Multiple Choice)
4.7/5
(40)

Consider the following method comment and method header: Consider the following method comment and method header:   Fill in the blank. Fill in the blank.

(Multiple Choice)
4.9/5
(32)

Fill in the first line of this SquareTester program so that it declares and initializes a variable mySquare as an instance of a Square class with a side length of 6. Fill in the first line of this SquareTester program so that it declares and initializes a variable mySquare as an instance of a Square class with a side length of 6.

(Multiple Choice)
4.9/5
(32)

Assume the method below has been added to the BankAccount class. Assume the method below has been added to the BankAccount class.

(Multiple Choice)
5.0/5
(43)

We want to create a class that represents a date.A date has a day, month, and year.For example, the date March 16, 2014 has the day 16, month 3, and year 2014.The basic framework of a date class is below: We want to create a class that represents a date.A date has a day, month, and year.For example, the date March 16, 2014 has the day 16, month 3, and year 2014.The basic framework of a date class is below:   Which of the constructor specifications below will allow this code to behave as desired? Which of the constructor specifications below will allow this code to behave as desired?

(Multiple Choice)
4.8/5
(33)

What will be output from the following statements that use BankAccount class? What will be output from the following statements that use BankAccount class?

(Multiple Choice)
5.0/5
(46)

What is a tester class?

(Multiple Choice)
4.7/5
(30)

.Consider the following method comment and method header: .Consider the following method comment and method header:   Fill in the blank. Fill in the blank.

(Multiple Choice)
4.9/5
(42)

We want to create a class that represents a geometric sequence.A geometric sequence is a sequence of numbers that begin at some value and then multiplies each value by some constant to get the next value.For example, the geometric sequence 1, 2, 4, 8, 16 starts at 1 and multiplies each term by 2 to get the next.The geometric sequence 10.8, 5.4, 2.7, 1.35 starts at 10.8 and multiplies each term by 0.5 to get the next.The basic framework of a geometric sequence class is below: We want to create a class that represents a geometric sequence.A geometric sequence is a sequence of numbers that begin at some value and then multiplies each value by some constant to get the next value.For example, the geometric sequence 1, 2, 4, 8, 16 starts at 1 and multiplies each term by 2 to get the next.The geometric sequence 10.8, 5.4, 2.7, 1.35 starts at 10.8 and multiplies each term by 0.5 to get the next.The basic framework of a geometric sequence class is below:

(Multiple Choice)
4.9/5
(39)

What is the name of the parameter variable of the recordPurchase method of the CashRegister class?

(Multiple Choice)
4.8/5
(35)

What verifies that a class works correctly in isolation, outside a complete program?

(Multiple Choice)
4.7/5
(41)

Which line of code is part of the private implementation of the BankAccount class?

(Multiple Choice)
4.8/5
(35)

Which of the following corresponds to the getArea method body for a Square class where the instance variable is named sideLength?

(Multiple Choice)
4.9/5
(28)

Fill in the blank in the following method comment. Fill in the blank in the following method comment.

(Multiple Choice)
4.7/5
(34)

What is a local variable?

(Multiple Choice)
4.8/5
(34)

Consider the following method header: Consider the following method header:   Fill in the blank in the javadoc comment: Fill in the blank in the javadoc comment:

(Multiple Choice)
4.8/5
(40)

If a method has two parameters, one explicit and one implicit, and a return type of void, then the documentation comments should include:

(Multiple Choice)
4.8/5
(34)

Complete the following tester program by choosing the line that prints the expected outcome. Complete the following tester program by choosing the line that prints the expected outcome.

(Multiple Choice)
4.9/5
(40)
Showing 41 - 60 of 108
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)