Skip to content

alemoskalev/stack-queue_project

Repository files navigation

Stack and Queue Project

This repository contains several Java implementations of fundamental data structures and a simple banking application. These classes include custom implementations of linked lists, queues, and stacks, along with an example usage in a bank simulation.

Project Overview

This project demonstrates the use of custom data structures in a Java application. These classes provide insight into linked list, stack, and queue operations, which are foundational in computer science.

The banking application, Bank.java, serves as a practical example that interacts with the Person class, modeling a bank system where individuals perform transactions and data structures manage internal operations.

Classes

Bank.java The Bank class represents a simple banking application where Person objects are managed using various data structures like stacks and queues.

MyLinkedList.java This class implements a custom linked list, managing elements through Node objects. It provides typical operations such as adding, removing, and traversing nodes.

MyQueue.java This class demonstrates a queue data structure using a linked list as the underlying structure. It follows the First-In-First-Out (FIFO) principle.

MyStack.java This class implements a stack data structure, adhering to the Last-In-First-Out (LIFO) principle. It uses a linked list as its base.

myStackAndQueue.java This class is a utility that demonstrates how both stacks and queues are used in a practical example.

Node.java The Node class represents individual elements in the linked list, storing a reference to the next node and holding data.

Person.java This class models a person with attributes such as name, age, and other relevant information for the bank simulation.

How to Use

Clone the repository: bash Copy code git clone https://github.com/yourusername/java-data-structures Compile the project: bash Copy code javac Bank.java MyLinkedList.java MyQueue.java MyStack.java Node.java Person.java Run the Bank class to simulate the banking operations: bash Copy code java Bank

Installation

To get started with this project, ensure you have the following:

Java JDK 8 or higher A Java IDE or text editor Git (optional for version control) Contributing Contributions are welcome! If you would like to improve this project, please fork the repository and submit a pull request.

About

Creating a stack and queue for practice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages