## Big Java Binder Early Objects

Computing

## Quiz 3 :

Implementing Classes

Looking for Programming Homework Help?

Q29 Q29 Q29

We want to change the BankAccount class so that all accounts will have a monthly fee. When a BankAccount is created, its monthly fee is set and cannot be changed. Which of the following will properly define the instance variable monthlyFee that holds the monthly fee?

Free

Unlocked

Multiple Choice

Q30 Q30 Q30

We want to change the BankAccount class so that all accounts will have a monthly fee. When a BankAccount is created, its monthly fee is set and cannot be changed. 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? a. public BankAccount (double initialBalance)

Free

Unlocked

Multiple Choice

Q31 Q31 Q31

We want to change the BankAccount class so that all accounts will have a monthly fee. When a BankAccount is created, its monthly fee is set and cannot be changed. 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?

Free

Unlocked

Multiple Choice

Q32 Q32 Q32

We want to change the BankAccount class so that all accounts will have a monthly fee. When a BankAccount is created, its monthly fee is set and cannot be changed. The instance variable monthlyFee will hold the monthly fee. Which of the following methods deducts the value of the monthly fee from the account? a. public void chargeFee()

Free

Unlocked

Multiple Choice

Q33 Q33 Q33

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: public class GeometricSequence

Free

Unlocked

Multiple Choice

Q34 Q34 Q34

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: public class GeometricSequence

Free

Unlocked

Multiple Choice

Q35 Q35 Q35

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: public class GeometricSequence

Free

Unlocked

Multiple Choice

Q36 Q36 Q36 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: public class GeometricSequence

Free

Unlocked

Multiple Choice