Question: I need help with this Java Project Project 2 1 - 2 : Products by Category Create an application that accepts a category id and

I need help with this Java Project
Project 21-2: Products by Category
Create an application that accepts a category id and displays the products in that category from the tables
in a database.
Console
Products by Category
CATEGORIES
1- Guitars
2- Basses
3- Drums
Enter a category id (999 to exit): 2
BASSES
Code Name Price
--------------------------------------------------------------
precision Fender Precision $799.99
hofner Hofner Icon $399.50
CATEGORIES
1- Guitars
2- Basses
3- Drums
Enter a category id (999 to exit): 3
DRUMS
Code Name Price
--------------------------------------------------------------
ludwig Ludwig 5-piece Drum Set with Cymbals $699.99
tama Tama 5-Piece Drum Set with Cymbals $799.99
CATEGORIES
1- Guitars
2- Basses
3- Drums
Enter a category id (999 to exit): 999
Bye!
Specifications
You will be provided with a database file and driver (guitar_shop.sqlite, sqlite-jdbc.jar) that contains
tables that store the data for the categories and the products. Both these should be copied into the root
of your application. You should right click on the Library folder in your application and click on
add/jar folder find the jar file you placed in the root of your application.
Create Category and Product classes that you can use to store with the data from the Category and
Product tables of the database.
Create a class named ProductDB with methods that provides a method for getting all categories and
another method for getting all products for the specified category.
Use prepared statements to retrieve the data.
Make sure to close database connections, prepared statements, and result sets when youre done with
them.

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!