In the following code, which lines make up the constructor(s)?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 1-4
B. Lines 5-8
C. Lines 1-8
D. Lines 0-18
Answer: B
Computer Science & Information Technology
You might also like to view...
How is inheritance exhibited by human beings?
Give a brief answer to each of the following “object think” questions:
Computer Science & Information Technology
Answer the following statements true (T) or false (F)
1) In a valid XHTML document,
- or
- tags.
2) The width of all data cells in a table must be the same.
3) framesets can be nested.
4) You are limited to a maximum of 100 internal links per page.
5) All browsers can render framesets.
Computer Science & Information Technology
To quickly see all the details of your network, consult the _______________
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology
VoIP is an acronym for Voice over Internet ____.
A. ?Program B. ?Process C. ?Protocol D. ?Procedure
Computer Science & Information Technology