SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 3 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 16 Nov 2017 My Price 10.00

RepairData porscheEngine = new RepairData();

I need help figuring out this code. I will provide the following attachments for it.

  • package carmidterm;

    public class Driver {

        public static void main(String[] args) {
            RepairData porscheEngine = new RepairData();
            porscheEngine.addPart("part-2");
            porscheEngine.addPart("part-12");
            porscheEngine.addPart("part-20");
            porscheEngine.setHours(15.5);
            RepairData porscheBody = new RepairData();
            porscheBody.addPart("part-1");
            porscheBody.setHours(20.2);
            LandVehicle porsche911 = new LandVehicle("1XYZ123",
                    porscheEngine, porscheBody);
           
            RepairData vwEngine = new RepairData();
            vwEngine.addPart("part-6");
            vwEngine.addPart("part-7");
            vwEngine.addPart("part-8");
            vwEngine.setHours(30.5);
            RepairData vwBody = new RepairData();
            vwBody.addPart("part-1");
            vwBody.addPart("part-2");
            vwBody.addPart("part-5");
            vwBody.addPart("part-15");
            vwBody.addPart("part-17");
            vwBody.addPart("part-18");
            vwBody.setHours(10.7);
            LandVehicle vw = new LandVehicle("5ABC123",
                    vwEngine, vwBody);
           
            RepairData boatEngine = new RepairData();
            boatEngine.addPart("part-6");
            boatEngine.addPart("part-7");
            boatEngine.addPart("part-8");
            boatEngine.setHours(30.5);
            WaterVehicle boat = new WaterVehicle("REG1",
                    boatEngine);
           
            Inventory inventory = new Inventory();
            inventory.addVehicle(porsche911);
            inventory.addVehicle(vw);
            inventory.addVehicle(boat);
           
            System.out.println("Total Repair Cost for Porsche:");
            System.out.println(inventory.getTotalCostForVehicle("1XYZ123"));
            System.out.println("---------------------------");
            System.out.println("Total Repair Cost for VW:");
            System.out.println(inventory.getTotalCostForVehicle("5ABC123"));
            System.out.println("---------------------------");
            System.out.println("Total Repair Cost for Boat:");
            System.out.println(inventory.getTotalCostForVehicle("REG1"));
            System.out.println("---------------------------");
            System.out.println("Total Repair Cost for ALL VEHICLES:");
            System.out.println(inventory.getTotalCostForInventory());
        }package carmidterm;

    import java.util.HashMap;
    import java.util.Map;

    public class PricingUtility {
        public static double PAY_RATE = 35.5;
        public static double WATERPROOF_TEST_COST = 150.0;
        private static Map<String, Double> PARTS_LIST = new HashMap<>();
       
        static {
            PARTS_LIST.put("part-1", 120.00);
            PARTS_LIST.put("part-2", 59.99);
            PARTS_LIST.put("part-3", 12.65);
            PARTS_LIST.put("part-4", 240.00);
            PARTS_LIST.put("part-5", 76.18);
            PARTS_LIST.put("part-6", 100.50);
            PARTS_LIST.put("part-7", 127.89);
            PARTS_LIST.put("part-8", 56.30);
            PARTS_LIST.put("part-9", 6.99);
            PARTS_LIST.put("part-10", 88.88);
            PARTS_LIST.put("part-11", 197.50);
            PARTS_LIST.put("part-12", 345.67);
            PARTS_LIST.put("part-13", 430.30);
            PARTS_LIST.put("part-14", 210.00);
            PARTS_LIST.put("part-15", 124.56);
            PARTS_LIST.put("part-16", 136.90);
            PARTS_LIST.put("part-17", 175.00);
            PARTS_LIST.put("part-18", 150.00);
            PARTS_LIST.put("part-19", 160.00);
            PARTS_LIST.put("part-20", 1035.13);
        }
       
        public static double getPartCost(String partId) {
            Double cost = PARTS_LIST.get(partId);
            if (cost != null) {
                return cost;
            }
            throw new IllegalArgumentException();
        }
    }
    ]
    }

Attachments:

Answers

(5)
Status NEW Posted 16 Nov 2017 02:11 PM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)