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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, bl88676
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, bartlettcs9817
Which location-sharing service offers items for users as a gaming component and also allows them to collectively link their check-ins to publish a trip? a. whrrl b. buzzd c. foursquare (this option is wrong i already tried) d. gowalla for plato
Answers: 2
image
Computers and Technology, 23.06.2019 00:30, vane3152
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
image
Computers and Technology, 24.06.2019 07:20, djs1002
Ingrid started speaking about her slide presentation. when she clicked to th"third slide, which had just a picture of an elephant, she forgot what she wassupposed to talk about. what could ingrid do to avoid this situation in thefuture? oa. print handouts for her audience. ob. add presenter's notes to each slide. oc. add a video to each slide. od. save her slide presentation to a flash drive
Answers: 2
You know the right answer?
Implement the following methods that can be found in CarRepairShop. java. You may create any additio...

Questions in other subjects:

Konu
English, 28.08.2019 02:30
Konu
Mathematics, 28.08.2019 02:30