Skip to content

GalHillel/OOP-Course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OOP Course Repository

Project Overview

This repository contains a collection of projects and assignments completed for the Object-Oriented Programming (OOP) course. The projects demonstrate various OOP principles, design patterns, and Java programming techniques, ranging from basic string manipulation to multi-threaded task execution.

Table of Contents

Assignment 1: Undoable StringBuilder

Location: Assignment-1/

A custom StringBuilder implementation that supports undo operations.

  • Key Features: append, delete, insert, replace, reverse, and undo.
  • Focus: Basic Java syntax, internal state management (Stack), and unit testing.

Assignment 2: Observer Pattern & Memory Monitoring

Location: Assignment-2/

An implementation of the Observer design pattern to monitor changes in an UndoableStringBuilder.

  • Components:
    • GroupAdmin (Subject): Manages members and notifies them of changes.
    • ConcreteMember (Observer): Receives updates and maintains a local state.
    • JvmUtilities: A utility class for tracking JVM memory usage and object footprints.
  • Focus: Design patterns, reference handling, and JVM internals.

Assignment 3: Concurrency & Thread Pools

Location: Assignment-3/

Part A: File Processing

Location: Assignment-3/Part-A

  • Compares performance of line counting in multiple files using:
    • Sequential processing.
    • Multi-threading (Thread class).
    • Thread Pools (ExecutorService).

Part B: Custom Executor Service

Location: Assignment-3/Part-B

  • A custom ThreadPoolExecutor that supports prioritized tasks.
  • Key Features:
    • TaskType: Enum for task priorities (Computational, IO, Other).
    • CustomExecutor: Manages a priority queue of tasks.
    • Task: A generic task wrapper implementing Callable and Comparable.

Tech Stack

  • Language: Java (JDK 19+)
  • Build Tool: Maven (for some assignments)
  • Testing: JUnit 5
  • IDE: IntelliJ IDEA / VS Code

How to Run

Prerequisites

  • Java Development Kit (JDK) 21 or higher.
  • Maven (optional, for dependency management).

Running Tests

Each assignment contains JUnit tests. You can run them using your IDE or Maven.

Example (using Maven):

cd Assignment-2
mvn test

Example (using IDE):

  1. Open the project in IntelliJ IDEA.
  2. Navigate to the test folder in the desired assignment.
  3. Right-click the test class (e.g., Tests.java) and select "Run".

Note: This repository is for educational purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages