subject

For this assignment you will be completing a program that manages cars and car repairs at wolfie’s car repair shop. the program is menu-driven. the menu can be found in homework6driver. java. provided in that . call methods from the class carrepairshop. it is these methods in the carrepairshop that you will be implementing for homework. in essence you will be implementing a very simple database system that uses arrays and possibly a handful of other variables to store data. the methods you write will implement basic “crud” functionality, as it is known in the database world: create, read, update and delete data records. because a major goal of this assignment is to give you practice working with arrays of objects, you are not permit- ted to use the arraylist class or any other kind of collection except for arrays. the grading software will ana- lyze your code and search for the use of classes outside the java. lang package. if you import any packages or use any fully-qualified class names to use classes outside of java. lang (e. g., java. util. arraylist), you will receive no credit for the homework assignment.1. int addnewcar(string vin, string make, int year)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. int addrepairticket(string vin, double cost, string description)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.double getrepaircost(int ticketnum)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. double gettotalrepaircosts(string vin)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. string getworstcarmake()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. boolean updaterepaircost(int ticketnum, double newcost)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. boolean deleterepair(int ticketnum)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. boolean deleteallrepairsforcar(string vin)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. boolean deletecarandrepairs(string vin)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. methods to implementimplement 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. note that none of these methods asks the user to give input. also, none of them produces any output to the screen.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 24.06.2019 03:30
It is not necessary to develop strategies to separate good information and bad information on the internet. true or false
Answers: 1
question
Computers and Technology, 24.06.2019 08:30
@josethesolis i need can anyone text me and follow me
Answers: 1
question
Computers and Technology, 24.06.2019 09:00
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
You know the right answer?
For this assignment you will be completing a program that manages cars and car repairs at wolfie’s c...
Questions
question
Mathematics, 02.07.2019 12:30
question
Mathematics, 02.07.2019 12:30
question
Biology, 02.07.2019 12:30
question
Business, 02.07.2019 12:30
Questions on the website: 13722361