subject

Implement the following methods that can be found in CarRepairShop. java. You may create any additional methods and classes you like to complete this homework assignment. Be sure to submit all extra .java files your code needs to compile. Do not submit the driver class. Any files containing a main() method will be deleted when your homework is downloaded for grading. Please note that none of these methods asks the user to give input. Also, none of them produces any output to the screen.1. int addNewCar(String VIN, String make, int year) (1 point)Adds a new car to the database with the provided VIN, make (e. g., Ford, Honda, Hyundai, etc.) and year of manufacture. If a car with the given VIN already exists in the database, the method returns ?1 and makes no changes to the database. Otherwise, the method returns the number of cars in the database after adding this new car.2. int addRepairTicket(String VIN, double cost, String description) (1 point)Adds a new repair ticket to the database for the car with the provided VIN, repair cost and repair description. If no car with the given VIN exists in the database, the method returns ?1 and makes no changes to the database. Otherwise, the method returns the repair ticket number. The first ticket added to the database has ticket number 1, the second has ticket number 2, etc. Ticket numbers always increase. For example, suppose 4 tickets were added and then two were deleted. The next ticket added would be assigned ticket number 5.3. double getRepairCost(int ticketNum) (2 points)Returns the cost of the repair associated with the provided repair ticket number. If no repair ticket with the given number exists in the database, the method returns ?1.0. Under no circumstances may the method make changes to the database.4. double getTotalRepairCosts(String VIN) (2 points)Returns the total of all repair costs for the car with the provided VIN. If no car with the given VIN exists in the database, the method returns ?1.0. Under no circumstances may the method make changes to the database.5. String getWorstCarMake() (3 points)Returns the make of car that had the greatest total number of repairs. Note that the method does not return the sum of the costs. Rather, it counts how many times each make of car was repaired and returns the make of the car having the greatest count. If there are no cars in the database, the method returns null. Under no circumstances may the method make changes to the database.6. boolean updateRepairCost(int ticketNum, double newCost) (2 points)Updates the cost for the repair with the given ticket number to newCost and then returns true. If no repair ticket with the given number exists in the database, the method returns false and makes no changes to the database.7. boolean deleteRepair(int ticketNum) (2 points)Deletes the repair with the given ticket number from the database and then returns true. If no repair ticket with the given number exists in the database, the method returns false and makes no changes to the database.8. boolean deleteAllRepairsForCar(String VIN) (2 points) Deletes all repairs for the car with the given VIN from the database and then returns true. If no car withthe given VIN exists in the database, the method returns false and makes no changes to the database.9. boolean deleteCarAndRepairs(String VIN) (3 points)Deletes the car and all repairs for the car with the given VIN from the database and then returns true. If no car with the given VIN exists in the database, the method returns false and makes no changes to the database.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
You know the right answer?
Implement the following methods that can be found in CarRepairShop. java. You may create any additio...
Questions
question
Mathematics, 03.02.2020 04:59
question
Mathematics, 03.02.2020 04:59
Questions on the website: 13722360