Suppose we have written a class called BankAccount with a method inside it, defined as: public double
Question:
Suppose we have written a class called BankAccount with a method inside it, defined as:
public double computeInterest(int rate)
If the client code has declared a BankAccount variable named acct , which of the following would be a valid call to the above method?
a. double result = computeInterest(acct, 42);
b. acct.computeInterest(42.0, 15);
c. int result = BankAccount.computeInterest(42);
d. double result = acct.computeInterest(42);
e. new BankAccount(42).computeInterest();
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted: