Skip to content

Esperanza961/Data_Structure_Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Food Storage System — Stack & Queue Implementation

This Java project simulates a food tray storage system using three classic data structures: Stack, Linear Queue, and Circular Queue. Each structure models a different way of organizing trays in a kitchen, helping chefs manage food efficiently.


Project Overview

  • StackStorage: Implements LIFO (Last-In-First-Out) logic — ideal for vertical tray stacking.
  • QueueStorage: Implements FIFO (First-In-First-Out) logic using a linear array — simple but space-limited.
  • CircularQueueStorage: Implements FIFO with circular logic — reuses space efficiently using modular arithmetic.

Each storage type supports:

  • Adding trays (addItem)
  • Removing trays (removeItem)
  • Peeking at the next tray (peekItem)
  • Displaying all trays with index and details (displayItem)
  • Checking if the storage is full or empty

Learning Goals

This project was built to reinforce:

  • Manual implementation of stack and queue logic
  • Understanding circular array behavior
  • Interface usage and polymorphism in Java
  • Debugging scope, logic, and indexing errors
  • Clean, readable output formatting for console applications

SAMLE OUTPUT Food Tray Details: Index [3] Name : pizza Weight : 300g Best Before : 2025-10-14 Time Placed : 2025-09-30 Valid Tray : true

FOLDER STRUCTURE src/ ├── data_structure_2025137/ │ ├── FoodItem.java │ ├── StorageUnit.java │ ├── StackStorage.java │ ├── QueueStorage.java │ ├── CircularQueueStorage.java │ └── Main.java

AUTOR Maria Martinez (Esperanza) Bookkeeper & aspiring developer Currently studying Computing at CCT College Dublin Passionate about visual learning, clean logic, and practical coding

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages