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 : 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
Guitars
Basses
Drums
Enter a category id to exit:
BASSES
Code Name Price
precision Fender Precision $
hofner Hofner Icon $
CATEGORIES
Guitars
Basses
Drums
Enter a category id to exit:
DRUMS
Code Name Price
ludwig Ludwig piece Drum Set with Cymbals $
tama Tama Piece Drum Set with Cymbals $
CATEGORIES
Guitars
Basses
Drums
Enter a category id to exit:
Bye!
Specifications
You will be provided with a database file and driver guitarshop.sqlite, sqlitejdbcjar 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
addjar 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
