Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project Objectives: Write a program that implements the following Advanced Programming concepts: 1 . Data encapsulation 2 . Instantiate classes 3 . Inheritance 4 .
Project Objectives:
Write a program that implements the following Advanced Programming concepts:
Data encapsulation
Instantiate classes
Inheritance
Graphical User Interface concepts
Exception Handling
Inner classes
Database
Project Name: Supermarket
The program will have the following private attributes:
Product No unique identifier for the product
Product Name product name
Product Description product description
Product Brand product brand name
Product Image Name hold the image of the product name
Quantity quantity on storage
Cost cost by piece
Price price for client
The project will display a splash screen then a login frame. If the username and
password are correct, then will show the menu program.
The program will have the following menu and menu items:
File
Add Product
Modify Product
Display Product
Products Report
Exit
Help
Help Contents
About
Items menu description:
Add Product will add a new product.
Modify Product search should be made first by product no then if it is found
will display modify frame.
Display Product will ask for product no If it is found will display all product
information.
Products Report will display all products from database in a JTable
component Addition will have two columns, total cost and total price.
Help contents will display the help of your program.
About will display an about window displaying each of your member team
names.
All the records or data will be saved into the database and the photo image into a default
directory.
Before opening the Modify Product and Display Product frame you should open a
dialog window search frame asking the product no Once you enter product no then you
will open the Modify Product or Display Product frame.
The Products Report will display all products information registered on the database
which will be displayed on a JTable component.
The Add Product, Modify Product and Display Product frames should display the
products image. The Add Product and Modify Product frames should use the class
JFileChooser to get the products image name.
this is All SQL queries provided:
Drop database IF EXISTS Supermarket;
CREATE DATABASE Supermarket;
USE Supermarket;
CREATE TABLE product
productNo varchar NOT NULL UNIQUE,
productName varchar NOT NULL,
productDescription varchar NOT NULL,
productBrand varchar NOT NULL,
productImage varchar
quantity int,
cost float,
price float
;
Insert or create a new product
INSERT INTO Supermarket.product productNo productName, productDescription, productBrand, productImage, quantity, cost, price
VALUES JAP 'Adobo Golla', 'Sasonador en polvo', 'Goya', 'adoboGoya.jpg;
Select all products from DB
SELECT FROM Supermarket.product;
Select an specific product
SELECT FROM Supermarket.product WHERE productNo JAP;
Update a product
UPDATE Supermarket.product SET productName'Adobo Goya', quantity WHERE productNo JAP;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started