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...

The ________ of a business database consists of the database forms, queries, reports, and macros

Fill in the blank(s) with correct word

Computer Science & Information Technology

Tables allow for calculations in a total row such as summations, averages, or counts

Indicate whether the statement is true or false

Computer Science & Information Technology