Answered step by step
Verified Expert Solution
Link Copied!

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:
1. Data encapsulation
2. Instantiate classes
3. Inheritance
4. Graphical User Interface concepts
5. Exception Handling
6. Inner classes
7. Database
Project Name: Supermarket
The program will have the following private attributes:
1. Product No. unique identifier for the product
2. Product Name product name
3. Product Description product description
4. Product Brand product brand name
5. Product Image Name hold the image of the product name
6. Quantity quantity on storage
7. Cost cost by piece
8. 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:
1. File
Add Product
Modify Product
Display Product
Products Report
Exit
2. 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(10) NOT NULL UNIQUE,
productName varchar(15) NOT NULL,
productDescription varchar(100) NOT NULL,
productBrand varchar(15) NOT NULL,
productImage varchar(30),
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 ('J23A12-P', 'Adobo Golla', 'Sasonador en polvo', 'Goya', 'adoboGoya.jpg',25,1.99,2.99);
-- Select all products from DB
SELECT * FROM Supermarket.product;
-- Select an specific product
SELECT * FROM Supermarket.product WHERE productNo ='J23A12-P';
-- Update a product
UPDATE Supermarket.product SET productName='Adobo Goya', quantity=30 WHERE productNo ='J23A12-P';

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is an annuity? Discuss in detail.

Answered: 1 week ago

Question

(a) What is the best model for the data provided?

Answered: 1 week ago