GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dyneth02/Java-Collections-Framework-Example: Java OOP project demonstrating Collection Framework and Generics for SLIIT coursework. Includes implementations using PriorityQueue for book management and HashMap for inventory tracking with add, update, and remove operations.

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
BookApp.java
BookApp.java
 
 
InventoryApp.java
InventoryApp.java
 
 
README.md
README.md
 
 
Tool.java
Tool.java
 
 

Repository files navigation

šŸ“š Java Collection Framework & Generics Examples

This project was developed for the SLIIT Object-Oriented Programming (OOP) module to demonstrate the use of Java Collections Framework and Generics.
It includes two mini applications: BookApp (PriorityQueue) and InventoryApp (HashMap).


šŸ“š Project Overview

This project showcases how to:

  • Use PriorityQueue to manage book titles dynamically.
  • Use HashMap to manage a product inventory with unique product codes.
  • Apply Generics for type safety and clean object management.

🧩 Components

1ļøāƒ£ BookApp.java

Implements a library management system using a PriorityQueue.

Features

  • Accepts book titles until the user types "done".
  • Allows removing a specific book by title.
  • Displays whether removal was successful or not.
  • Counts and prints remaining books in alphabetical order.

Core Concepts

  • PriorityQueue for sorted data storage.
  • Scanner for input handling.
  • Generics for type-safe collection operations.

2ļøāƒ£ InventoryApp.java

Implements a simple inventory system using a HashMap.

Features

  • Adds, updates, and removes products.
  • Stores product details (code, name, quantity, price).
  • Displays complete inventory after each operation.
  • Automatically updates products if the code already exists.

Core Concepts

  • HashMap for key-value storage.
  • Object references as map values.
  • Method-based CRUD operations.
  • Iteration using enhanced for-loops.

3ļøāƒ£ Tool.java

Helper class defining the product structure with:

  • Product code (String)
  • Product name (String)
  • Quantity in stock (int)
  • Price per unit (double)

Used as the value object in the inventory HashMap.


āš™ļø How to Run

Clone the Repository

git clone https://github.com/<your-username>/Java-Collections-Framework-Examples.git
cd Java-Collections-Framework-Examples

🧠 Concepts Demonstrated

| Concept           | Description                               |
| ----------------- | ----------------------------------------- |
| **PriorityQueue** | For ordered book title management         |
| **HashMap**       | For efficient key-value product inventory |
| **Generics**      | For compile-time type safety              |
| **Encapsulation** | Through the Tool (Product) class          |
| **Polymorphism**  | Used via overridden `toString()` methods  |

About

Java OOP project demonstrating Collection Framework and Generics for SLIIT coursework. Includes implementations using PriorityQueue for book management and HashMap for inventory tracking with add, update, and remove operations.

Topics

abscollections-frameworkhashmap-javajavajava-genericsoopoop-in-javaoop-principlespriority-queue

Resources

Readme
Activity

Stars

10 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.