Filters
Question type

Study Flashcards

The private implementation of a class consists of ___.


A) instance variables and the method headers
B) local variables and the method headers
C) parameter variables and the method bodies
D) instance variables and the implementation of the constructors and methods

E) C) and D)
F) None of the above

Correct Answer

verifed

verified

Which of the following is a valid constructor header for the Player class that accepts the player name as a parameter?


A) public void Player(String playerName)
B) private Player(playerName)
C) private void Player(playerName)
D) public Player(String playerName)

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

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


A) public BankAccount()
B) balance = balance - amount;
C) public void deposit(double amount)
D) public void withdraw(double amount)

E) A) and C)
F) A) and B)

Correct Answer

verifed

verified

Showing 101 - 103 of 103

Related Exams

Show Answer