Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Binder Early Objects
Quiz 3: Implementing Classes
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 41
Multiple Choice
Choose the method header that goes with this method comment. /** Gets the salary of the employee @return the salary of the employee */
Question 42
Multiple Choice
Given this method comment, fill in the blank in the method implementation. /** Gets the current balance of the bank account @return the current balance */ Public double getBalance() { __________ balance; }
Question 43
Multiple Choice
Given this method implementation, fill in the blank in the method comment. /** Gets the current balance of the bank account _________ the current balance */ Public double getBalance() { Return balance; }
Question 44
Multiple Choice
Which line of code is part of the public implementation of the BankAccount class?
Question 45
Multiple Choice
Complete the following tester program by choosing the line that prints the expected outcome. public class BankAccountTester { Public static void main(String[] args) { BankAccount account = new BankAccount(1000) ; Account.deposit(account.getBalance() ) ; System.out.println(account.getBalance() ) ; ___________________ } }
Question 46
Multiple Choice
Fill in the blank in the comment for this method header. /** Constructs a player with the given name _________________________________ */ Public Player(String playerName) ) . .
Question 47
Multiple Choice
Consider the following method header: /** Adds interest to the bank account _________________________________ */ Public void addInterest(double rate) ) . . Fill in the blank in the javadoc comment:
Question 48
Multiple Choice
Given this method comment, fill in the blank in the method implementation. /** Constructs a bank account with a given balance @param initialBalance the initial balance */ Public BankAccount(double _________) { Balance = initialBalance; }
Question 49
Multiple Choice
Fill in the blank in the comment for this method header. /** Gets the interest for the bank account _________________________________ */ Public double getInterest() ) . .
Question 50
Multiple Choice
Given this method implementation, fill in the blank in the method comment. /** Withdraws money from the bank account _________ amount the amount to withdraw */ Public void withdraw(double amount) { Balance = balance - amount; }