CSE 1320: Assignment 9 solved

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (3 votes)

1. A vehicle sales company has contracted you to create a sales calculator which suggests a vehicle given a customer’s budget. To maximize sales, the calculator should
suggest the two highest price items that fit their budget.
The program will be implemented using a Binary Search Tree.
Data Format
struct Car {
char *make;
char *model;
double price;
}
Requirements
• Accept a CSV file containing the manufacturer’s vehicle catalog. It is OK if
no CSV is given.
• Present a menu with options as shown in the example run. The user should
stay in the program until they choose to quit.
• Add functionality to add a model to the catalog.
• Add functionality to navigate through the catalog using depth first search such
that the models are displayed from highest price to lowest price.
• When printing out the list of vehicles, use a fixed width of 15 spaces for each
member.
• When adding a model, it should be inserted into the Binary Search Tree based
on the price.
• The struct declarations and all function declarations should be declared in a
header file with the same name as your C file. Be sure to use a header guard.
Example Run
CSE 1320: Assignment 9 Dillhoff
1. Suggest Vehicle
2. Add Model to Catalog
3. View Catalog
4. Exit
> 2
Enter make: Honda
Enter model: Civic
Enter price: 20000
1. Suggest Vehicle
2. Add Model to Catalog
3. View Catalog
4. Exit
> 1
Enter budget: 20000
MAKE MODEL PRICE
Honda Civic $20000
Toyota Yaris $15000
1. Suggest Vehicle
2. Add Model to Catalog
3. View Catalog
4. Exit
> 3
MAKE MODEL PRICE
Chevrolet Camaro $30000
Honda Civic $20000
Toyota Yaris $15000
1. Suggest Vehicle
2. Add Model to Catalog
3. View Catalog
4. Exit
> 4
Create a zip file using the name template LASTNAME_ID_A9.zip which includes the all
required code files. Submit the zip file through Canvas.
2