Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package carmidterm;
- public abstract class AbstractVehicleRepair implements CostInterface
- {
- RepairData engineData;
- String ID;
- AbstractVehicleRepair(String ID, RepairData data)
- {
- this.ID = ID;
- this.engineData = data;
- }
- public double getTotalCost()
- {
- return this.getTotalCost();
- }
- public double getEngineRepairCost()
- {
- double parts = 0;
- for (String partID : engineData.getPartsList())
- {
- parts = PricingUtility.getPartCost(partID);
- System.out.println(parts);
- }
- double hours = this.engineData.getRepairHours();
- double labor = PricingUtility.PAY_RATE;
- double repairCost = parts + (hours * labor);
- return repairCost;
- }
- public double getBodyRepairCost()
- {
- return this.getBodyRepairCost();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement