Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ CSE 108 β€” Object Oriented Programming Sessional

Bangladesh University of Engineering and Technology (BUET)

Language: C++ Language: Java

A comprehensive collection of assignments, online assessments, and practice problems covering core Object-Oriented Programming concepts in C++ and Java.


πŸ“‘ Table of Contents


πŸ“– About

This repository contains all coursework for the CSE 108: Object Oriented Programming course. The course transitions from foundational C++ OOP concepts (classes, memory management, operator overloading) to advanced Java topics (inheritance hierarchies, interfaces, exception handling, multithreading, collections, and generics).

Each assignment is self-contained with its respective problem statement and solution.


🧠 Topics Covered

# Topic Language Assessment
1 Classes, Encapsulation, Dynamic Memory C++ Offline 1, Online 1
2 Constructors, Copy Constructors, Destructors C++ Offline 2, Online 2, Online 3
3 Operator Overloading C++ Offline 2, Online 3
4 Inheritance & Polymorphism C++ Practice
5 Function Overriding & Virtual Functions C++ Practice
6 Classes, Encapsulation, Arrays of Objects Java Online 4
7 Abstract Classes & Inheritance Java Offline 3, Online 5
8 Interfaces & Custom Exceptions Java Offline 3, Online 5
9 Multithreading (Thread, join) Java Online 6
10 Collections, Generics, File I/O Java Practice

πŸ“‚ Repository Structure

CSE_108/
β”œβ”€β”€ πŸ“ Offline/                     # Lab assignments
β”‚   β”œβ”€β”€ πŸ“ Offline_1/               # C++ β€” Classes & Dynamic 2D Matrix
β”‚   β”œβ”€β”€ πŸ“ Offline_2/               # C++ β€” Political Party Management System
β”‚   └── πŸ“ Offline_3/               # Java β€” Vehicle Workshop (Inheritance + Interface)
β”‚
β”œβ”€β”€ πŸ“ Online/                      # Timed in-class assessments
β”‚   β”œβ”€β”€ πŸ“ Online_01/               # C++ β€” FileHandler Class & File I/O
β”‚   β”œβ”€β”€ πŸ“ Online_02/               # C++ β€” Playlist (Song + Album Management)
β”‚   β”œβ”€β”€ πŸ“ Online_03/               # C++ β€” ShiftArray (Operator Overloading)
β”‚   β”œβ”€β”€ πŸ“ Online_04/               # Java β€” Gym Membership Fee Calculator
β”‚   β”œβ”€β”€ πŸ“ Online_05/               # Java β€” Delivery Service (Abstract + Exception)
β”‚   └── πŸ“ Online_06/               # Java β€” Multi-threaded Prime Sum
β”‚
β”œβ”€β”€ πŸ“ Practice/                    # Self-practice problems
β”‚   β”œβ”€β”€ πŸ“ CPP/                     # Inheritance, Overriding, Operator Overloading
β”‚   └── πŸ“ Java/                    # Banking System, Movie Collections & Generics
β”‚
β”œβ”€β”€ .gitignore
└── README.md

πŸ“ Offline Assignments

Concepts: Classes, Encapsulation, Dynamic Memory Allocation, 2D Arrays

Implementation of a Figure class that manages dynamically allocated 2D integer matrices. Handles matrix creation, naming based on dimensions, and memory management using constructors and destructors.

πŸ“„ View Files
File Description
Ass1_2405087_Dec25.cpp.cpp Complete solution with Figure class
Question.docx Problem specification

Concepts: Composition, Copy Constructor, Deep Copy, Dynamic Arrays, Friend Functions

A system to manage political parties and their members. Features include adding/removing members, nominating candidates, and displaying party details with proper deep-copy semantics.

πŸ“„ View Files
File Description
2405087.cpp Solution β€” PartyMember & Party classes
CSE108_Offline 2_Specifications.pdf Problem specification

Concepts: Abstract Classes, Inheritance, Interfaces, Custom Exceptions, Polymorphism

A vehicle service workshop simulation featuring an abstract Vehicle class extended by Car, Bike, and Truck. Implements a Serviceable interface and uses a custom ServiceException for validation. The WorkshopManager demonstrates polymorphic service cost calculations.

πŸ“„ View Files
File Description
Vehicle.java Abstract base class with service cost logic
Car.java / Bike.java / Truck.java Concrete vehicle implementations
Serviceable.java Service interface
ServiceException.java Custom checked exception
WorkshopManager.java Manager class with polymorphic operations
Main.java Driver program

πŸ’» Online Assessments

Concepts: File I/O (ofstream), Resource Management, Encapsulation

Implements a FileHandler class that wraps file operations, ensuring files are opened and closed only once during the object's lifetime.

πŸ“„ View Files
File Description
main.cpp Complete solution with FileHandler class
Question.pdf Problem specification

Concepts: Composition, Dynamic Arrays, Class Relationships

A music playlist system with Song and Album classes supporting song management, display, and album operations.

πŸ“„ View Files
File Description
main.cpp Complete solution with Song & Album classes
July 2025 CSE 108 _ Online 2 - B1+B2.pdf Problem specification

Concepts: Operator Overloading (+, -, ++, --, <<), Deep Copy, Destructor

Custom array class with circular shift operations via overloaded operators. Demonstrates proper memory management and deep-copy semantics.

πŸ“„ View Files
File Description
main.cpp Complete solution with overloaded shift operations
Online 3 - B1_B2.pdf Problem specification

Concepts: Classes, Arrays, Encapsulation, Object Composition

Calculates late fees for gym members across multiple plans using GymMember and Plan classes with fee computation logic.

πŸ“„ View Files
File Description
Main.java Driver program and entry point
GymMember.java / Plan.java Member and Plan business logic
Online4_B.pdf Problem specification

Concepts: Abstract Classes, Inheritance, Custom Exceptions, Input Validation

A delivery service with an abstract DeliveryRequest base class, extended by FoodDelivery and ParcelDelivery. Uses InvalidRequestException for robust input validation.

πŸ“„ View Files
File Description
Main.java Driver program and execution simulation
DeliveryRequest.java Abstract base delivery request class
FoodDelivery.java / ParcelDelivery.java Concrete request types
InvalidRequestException.java Custom exception for input validation
CSE108_Online-5_Set_B_Question.pdf Problem specification

Concepts: Multithreading, Thread class, join(), Range Partitioning

Computes the sum of all prime numbers in a given range using multiple threads. Divides the work into chunks and aggregates partial sums via Thread.join().

πŸ“„ View Files
File Description
Main.java Multi-threaded solution and logic
Sec B.pdf Problem specification

πŸ§ͺ Practice Problems

C++ Practice

Problem Topics Resources
PP_week_04.cpp Inheritance, Polymorphism, Virtual Functions πŸ“• Specification
Inheritence_practice.cpp Class Hierarchies, Method Overriding πŸ“ Source Folder
function_overridding.cpp.cpp Virtual Functions, Runtime Polymorphism πŸ“ Source Folder
operator_overloading_practice.cpp Operator Overloading πŸ“ Source Folder

Java Practice

Problem Topics Files
Banking System (Java Practice 1/) Classes, Account & Branch management Account.java / Branch.java / Main.java
Movie Collection (Java_Practice_Collections_Generics/) ArrayList, HashMap, Generics, File Parsing, Comparable Main.java / Movie.java / movies.txt / πŸ“• Specs

πŸ”— Related Repositories

Explore other academic repositories containing coursework, implementations, and study materials:

Repository Description Language / Tech
🌌 OOPverse A comprehensive repository dedicated to Object-Oriented Programming design patterns, principles, and practice problems. Java / C++
🧬 DSA Genesis C++17 implementations of core Data Structures & Algorithms at BUET CSE (CSE-105 & CSE-207), covering trees, graphs, sorting, and dynamic programming. C++17
πŸ§ͺ CSE 106 Laboratory coursework, programming assignments, and exam solutions for Data Structures & Algorithms I Sessional at BUET. C / C++

πŸ›  Tech Stack

Tool Purpose
C++ (g++) OOP fundamentals β€” memory management, operator overloading
Java (JDK 17+) Advanced OOP β€” inheritance, interfaces, threading, collections
Git Version control
VS-Code, IntelliJ Writing & Editing Code

πŸš€ How to Run

C++ Programs

# Compile
g++ -o output filename.cpp

# Run
./output

Java Programs

# Compile
javac FileName.java

# Run
java FileName

Note: Some Java files use package declarations (e.g., package Online.Online_04;). To run these, compile and execute from the project root:

javac Online/Online_04/*.java
java Online.Online_04.Main

πŸ‘€ Author

Badhon Pain

  • πŸŽ“ Student ID: 2405087
  • πŸ› Bangladesh University of Engineering and Technology (BUET)
  • πŸ”— GitHub: @BadhonPain

Maintained as part of coursework at BUET.

About

πŸŽ“ Coursework, assignments, and online assessments for CSE 108: Object Oriented Programming Sessional at BUET. Implemented in C++ and Java.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages