In the following code, which lines make up all of the accessor methods?0 public class Bus {1 private BankAccount ba;2 private double fuelLeft;3 private final double FUEL_MAX = 40.0;4 private final double FUEL_COST = 3.54;5 public Bus(BankAccount baRef) {6 fuelLeft = 0;7 ba = baRef;8 }9 public void fillTank() {10 double cost = (FUEL_MAX - fuelLeft) * FUEL_COST;11 if (ba.pay(cost) == true) {12 fuelLeft = FUEL_MAX;13 }14 }15 public double getFuelLeft() {16 return fuelLeft;17 }18 }
A. Lines 9-14
B. Lines 15-17
C. Lines 9-17
D. Lines 5-8
Answer: C
Computer Science & Information Technology
You might also like to view...
After you set a property of an object to a value within the Properties pane, it can no longer be changed.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology
What is a hash function?
a. A method used to compute the hash number used for storing data in a hash table b. A data structure c. A way to determine algorithm complexity d. A search algorithm
Computer Science & Information Technology
In addition to the paragraph and heading elements, there are several other ____ text elements.
A. block-level B. phrase level C. inline D. formatting
Computer Science & Information Technology
Secure Digital cards are formatted with the NTFS file system
Indicate whether the statement is true or false.
Computer Science & Information Technology