Question: Write a program for a car dealership that has a database of information for different automobiles. Each automobile has one or more attributes associated with

 Write a program for a car dealership that has a database

of information for different automobiles. Each automobile has one or more attributes

associated with it (color, Looks sporty, etc.). The number of attributes that

Write a program for a car dealership that has a database of information for different automobiles. Each automobile has one or more attributes associated with it (color, Looks sporty, etc.). The number of attributes that each automobile has is not known at this time (and can be different for each). The program needs to accept commands with the goal of providing a list of automobiles that fit your criteria Input: 1. The list of automobiles and attributes should be stored in a file called autodata.txt. This file is to be read at the beginning each time your program is run (if it exists). Your program will create this file. The format for this file shall be: NameCar1,Attribute1,Attribute2,.. NameCar2,Attribute1, Attribute2.,.. This is just a comma separated list with the car name first followed by all of its attributes. I will also check your programs with a data file that I generate so the file MUST be in this format. 2. The input formats as well as the commands are in the table below. Also, the entire program shal not be case sensitive Output: The responses to the user's commands Each time you execute the SHOW command, also place the results in a file called results.txt. This file can be any format, however, make sure it is labeled clearly. Also, this file should append these results to previous runs. 1. 2. 3. When new cars along with their attributes are added using the ADD command, this data must be persisted to the autodata.txt. Commands How it is processed Adds a new automobile. Prompt user for car name and the list of attributes. Shall not work if in search mode Puts program in search mode. Prompt for name of this search (should probably be a heading in the results.txt file) Prompt user to enter an attribute to look for. Then process your list of current cars that match this criterion. If there is only one car left, print out the name of this car and that ADD Search hasFeature CheckAuto Show Exit ou have found it (this case would terminate search mode). (Search Mode On Input the name of an automobile and print out the attributes about it if it exists in our search list. (Search Mode Only) Shows the current list of automobiles that match all of the features you have listed as criteria thus far. (Search Mode Only) Exits Search mode and resets all attributes that were entered. Save the autodata.txt file if automobiles have been added and exits the program. Quit Notes: Write a program for a car dealership that has a database of information for different automobiles. Each automobile has one or more attributes associated with it (color, Looks sporty, etc.). The number of attributes that each automobile has is not known at this time (and can be different for each). The program needs to accept commands with the goal of providing a list of automobiles that fit your criteria Input: 1. The list of automobiles and attributes should be stored in a file called autodata.txt. This file is to be read at the beginning each time your program is run (if it exists). Your program will create this file. The format for this file shall be: NameCar1,Attribute1,Attribute2,.. NameCar2,Attribute1, Attribute2.,.. This is just a comma separated list with the car name first followed by all of its attributes. I will also check your programs with a data file that I generate so the file MUST be in this format. 2. The input formats as well as the commands are in the table below. Also, the entire program shal not be case sensitive Output: The responses to the user's commands Each time you execute the SHOW command, also place the results in a file called results.txt. This file can be any format, however, make sure it is labeled clearly. Also, this file should append these results to previous runs. 1. 2. 3. When new cars along with their attributes are added using the ADD command, this data must be persisted to the autodata.txt. Commands How it is processed Adds a new automobile. Prompt user for car name and the list of attributes. Shall not work if in search mode Puts program in search mode. Prompt for name of this search (should probably be a heading in the results.txt file) Prompt user to enter an attribute to look for. Then process your list of current cars that match this criterion. If there is only one car left, print out the name of this car and that ADD Search hasFeature CheckAuto Show Exit ou have found it (this case would terminate search mode). (Search Mode On Input the name of an automobile and print out the attributes about it if it exists in our search list. (Search Mode Only) Shows the current list of automobiles that match all of the features you have listed as criteria thus far. (Search Mode Only) Exits Search mode and resets all attributes that were entered. Save the autodata.txt file if automobiles have been added and exits the program. Quit Notes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!