Skip to content

RiyazB-1/priority-queue-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

CS Department Manager + Priority Queue System

A two-part Java project built solo as a sixth-semester Advanced OOP academic assignment, covering generic class design, inheritance, file-based data parsing, and custom circular/priority queue data structures.

Part 1 — MyCsDept: Department Domain Model

Models a college CS department using generics and inheritance:

  • Professor<T> — a generic class representing a professor, with fields for seniority, hiring date, disciplines taught, and offered courses. Parses professor records from a colon-delimited text file (profs.txt) using Scanner, and includes a compareTo() method for seniority-based comparison.
  • Courses — represents a course (ID, title, discipline, hours, number of groups), parsed from courses_f22.txt.
  • Department — extends Professor<Object> and manages a HashMap<String, Courses> of offered courses.

Demonstrates: generics, inheritance, HashMap/HashSet/ArrayList usage, LocalDate handling, and file I/O parsing of structured text data into domain objects.

Part 2 — project: Circular & Priority Queues

A progression of custom queue implementations, each building on the last:

  • MyQueue — a basic int-based circular array queue (enqueue/dequeue with modulo wraparound, resizing)
  • MyGenQueue<T> — a generic version of the same circular queue, working with any reference type
  • MyPriorityCircularQueue<T extends Comparable<T>> — extends MyGenQueue<T> to maintain elements in priority order on insertion, using a bounded type parameter so only Comparable types can be used

Demonstrates: generic type parameters, bounded type parameters (T extends Comparable<T>), inheritance over generic classes, circular array indexing, and dynamic array resizing.

Tech Stack

  • Java (with the Java Module System — see module-info.java)

Project Structure

src/MyCsDept/    → Professor, Courses, Department classes + sample data files
src/project/     → MyQueue, MyGenQueue, MyPriorityCircularQueue

How to Run

Each class with a main() method (Professor, Courses, MyQueue) can be run independently:

  • Professor.main() and Courses.main() read and parse the sample .txt data files in src/MyCsDept/
  • MyQueue.main() is interactive — prompts for queue size and elements via console input

Author

Built solo by Riyaz Badhan as a sixth-semester Advanced OOP academic project.

About

Java project modeling a CS department with generics and inheritance, plus a custom-built priority queue using bounded type parameters and circular array indexing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages