Skip to content

About

πŸ› A desktop-based online shopping application developed using the JavaFX framework. Built as part of a Teaching Assistant role for the Object-Oriented Programming and Design Patterns course at HUST

Topics

Resources

Stars

21 stars

Watchers

4 watching

Forks

Latest commit

Β 

History

68 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ› AIMS β€” An Internet Media Store

A desktop application for browsing and purchasing media products (Books, CDs, DVDs) built with Java and JavaFX.


Screenshots

Home Page Cart / Place Order Shipping Form
Home Page Cart and Place Order Shipping Form

System Design

Database Design

Database Design

Class Diagram

Class Diagram


Features

  • Browse a catalog of media products: Books, CDs, and DVDs
  • Add items to a shopping cart and manage quantities
  • Place orders with delivery information
  • Process payments via an interbank payment subsystem (credit card)
  • View order invoices and transaction history
  • Persistent data storage with SQLite

Tech Stack

Layer Technology
Language Java 11+
UI Framework JavaFX 15
Database SQLite (sqlite-jdbc)
Testing JUnit 5
IDE Eclipse

Project Structure

AIMS-Student/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ App.java                  # Application entry point
β”‚   β”œβ”€β”€ common/exception/         # Custom exception classes
β”‚   β”œβ”€β”€ controller/               # Business logic controllers
β”‚   β”œβ”€β”€ entity/                   # Domain models (Cart, Media, Order, Payment, …)
β”‚   β”œβ”€β”€ subsystem/                # Interbank payment subsystem
β”‚   β”œβ”€β”€ utils/                    # Utility classes & configuration
β”‚   └── views/                    # JavaFX FXML layouts & screen handlers
β”œβ”€β”€ test/                         # Unit tests
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ linux/javafx-sdk-15/      # JavaFX SDK for Linux
β”‚   └── win/javafx-sdk-15/        # JavaFX SDK for Windows
└── assets/
    β”œβ”€β”€ db/                       # SQLite schema & MySQL Workbench file
    └── images/                   # Product and UI images

Design Patterns

Pattern Where applied Purpose
Singleton Cart, AIMSDB Ensure a single shared instance of the cart and database connection across the app
MVC entity/ Β· controller/ Β· views/ Cleanly separate domain data, business logic, and UI rendering
Facade InterbankSubsystem Expose a simple payment API that hides the internal InterbankSubsystemController complexity
Template Method BaseController β†’ controllers Β· BaseScreenHandler β†’ screens Define a common skeleton and let subclasses specialise behaviour
Strategy (Interface) InterbankInterface Decouple payment logic from a concrete implementation so the subsystem can be swapped or mocked
Inheritance / Polymorphism Media β†’ Book, CD, DVD Share common media attributes while allowing each type to carry its own fields

Getting Started

Note

Prerequisites β€” make sure you have all of the following before continuing:

  • Java 11 or higher
  • Eclipse IDE (recommended)
  • JavaFX 15 (bundled under lib/)

Step 1 β€” Clone the repository

git clone https://github.com/leminhnguyen/AIMS-Student.git
cd AIMS-Student

Step 2 β€” Open in Eclipse

Tip

Go to Eclipse β†’ File β†’ Open Projects from File System… and select the cloned root directory.


Step 3 β€” Configure dependencies

Important

You need to add three libraries to the build path.

SQLite JDBC

Project β†’ Properties β†’ Java Build Path β†’ Classpath β†’ Add JARs…
Select sqlite-jdbc-3.7.2.jar from the lib/ directory.

JUnit 5

Project β†’ Properties β†’ Java Build Path β†’ Modulepath β†’ Add Library… β†’ JUnit β†’ Next

JavaFX

Eclipse β†’ Window β†’ Preferences β†’ Java β†’ Build Path β†’ User Libraries β†’ New
Name it (e.g. JavaFX15) and add all JARs from:
  β€’ Linux  : lib/linux/javafx-sdk-15/lib/
  β€’ Windows: lib/win/javafx-sdk-15/lib/
Then add the user library to the project classpath.

Step 4 β€” Add VM arguments

Important

Open Run β†’ Run Configurations… β†’ Java Application, select your launch config, and paste the VM arguments below.

Linux

--module-path lib/linux/javafx-sdk-15/lib --add-modules javafx.controls,javafx.fxml

Windows

--module-path lib/win/javafx-sdk-15/lib --add-modules javafx.controls,javafx.fxml

Step 5 β€” Set up the database

Tip

Import the SQL schema into SQLite using the file at assets/db/aims_sqlite.sql.


Running Tests

Note

Tests are located in the test/ directory and use JUnit 5.
Run them from Eclipse via Run As β†’ JUnit Test.


Authors

Name Role Batch
nguyenlm Software Engineering Student K61
manhvd Software Engineering Student K61
hieudm ICT Student K61

License

This project is intended for educational purposes as part of the Software Engineering curriculum.

About

πŸ› A desktop-based online shopping application developed using the JavaFX framework. Built as part of a Teaching Assistant role for the Object-Oriented Programming and Design Patterns course at HUST

Topics

Resources

Stars

21 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages