Exam 3: Implementing Classes

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

The private implementation of a class consists of ___.

(Multiple Choice)
4.8/5
(36)

Descriptive text used to communicate design and implementation issues about the classes and public methods of programs is called _______?

(Multiple Choice)
4.9/5
(36)

When drawing complex shapes, what is used to initialize the position of the shape?

(Multiple Choice)
4.9/5
(38)

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: public class Date { private int day; private int month; private int year; } The default date will be set to January 1, 1990. What should the body of the constructor with zero parameters be?

(Multiple Choice)
4.8/5
(44)

When using index cards to help with the tracing of the execution of an object by hand, what is written on the front of the card?

(Multiple Choice)
4.9/5
(43)

Given this method comment, fill in the blank in the method implementation. Given this method comment, fill in the blank in the method implementation.

(Multiple Choice)
4.9/5
(33)

The class constructor always has the same name as __.

(Multiple Choice)
4.8/5
(38)

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)
4.8/5
(40)

What is the name of the instance variable for a Counter object?

(Multiple Choice)
4.8/5
(28)

What statement is used to specify the value that a method gives back to its caller?

(Multiple Choice)
4.9/5
(44)

The public constructors and methods of a class form the public _____ of the class.

(Multiple Choice)
4.9/5
(39)

We want to change the BankAccount class so that all accounts will have a monthly fee.The instance variable monthlyFee will hold the monthly fee.Which of the following constructors properly sets the monthly fee to a default value of 20?

(Multiple Choice)
5.0/5
(33)

What mechanism does an object use to store its data?

(Multiple Choice)
4.9/5
(41)

We want to change the BankAccount class so that all accounts will have a monthly fee.The instance variable monthlyFee will hold the monthly fee.Which of the following is the correct public interface for a constructor that sets both the initial balance and monthly fee?

(Multiple Choice)
4.9/5
(41)

Which of the following corresponds to the constructor body for a Square class that accepts an initial side length value called initialLength where the instance variable is named sideLength?

(Multiple Choice)
4.8/5
(34)

We want to change the BankAccount class so that all accounts will have a monthly fee.The instance variable monthlyFee will hold the monthly fee.Which of the following methods deducts the value of the monthly fee from the account?

(Multiple Choice)
4.9/5
(41)

When are instance variables initialized?

(Multiple Choice)
4.8/5
(39)

Which part of a class implementation contains the instructions to initialize an object's instance variables?

(Multiple Choice)
4.9/5
(36)

Which term means the process of hiding object data and providing methods for data access?

(Multiple Choice)
4.8/5
(43)

Instance variables that are object references are initialized to what default value?

(Multiple Choice)
4.8/5
(34)
Showing 61 - 80 of 108
close modal

Filters

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