Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OOP Java Labs - My Solutions

My lab solutions for Object-Oriented Programming course at Sukkur IBA University. I'm documenting my learning journey through Java programming, from basic syntax to advanced OOP concepts.

Repository - Solutions uploaded as I complete each lab

View Lab 1
View Lab 2
View Lab 3
View Lab 4

Labs Overview

Lab 1: Introduction to Java Programming

Introduction to Java fundamentals including history, features, installation, basic syntax, variables, data types, input/output operations, and type conversion.

Topics Covered:

  • Java environment setup
  • Variables and data types
  • Input/Output with Scanner
  • Type casting and conversion
  • Arrays
  • Control structures
  • Error handling and debugging

View Lab 1


Lab 2: Methods in Java

Understanding and implementing different types of methods, parameters, return values, and control statements.

Topics Covered:

  • Method types and syntax
  • Parameters and return values
  • Control statements (if-else, switch, ternary)
  • String methods
  • Array methods
  • Math class functions
  • Command-line arguments
  • Code organization and modularity

View Lab 2


Lab 3: Objects, Instance Methods & Encapsulation

Core object-oriented programming concepts including objects, instance methods, constructors, and encapsulation.

Topics Covered:

  • Static vs non-static members
  • Classes and objects
  • Instance variables and methods
  • Object references and aliasing
  • Constructors
  • Encapsulation with private fields
  • Getters and setters
  • The this keyword

View Lab 3


Lab 4: Inheritance & Polymorphism

Core object-oriented programming concepts including class hierarchies, inheritance, method overriding, and polymorphic behavior.

Topics Covered:

  • Inheritance and the extends keyword
  • Superclass and subclass relationships
  • Method overriding
  • The super keyword
  • Polymorphism and dynamic binding
  • Abstract classes and methods
  • The instanceof operator
  • Access modifiers (protected)

View Lab 4


About This Repository

This repository contains my lab solutions for the Object-Oriented Programming course at Sukkur IBA University. I'm uploading my solutions as I complete each lab to track my progress and share my learning journey.

How to Use

  1. Clone this repository:

    git clone https://github.com/qadyyr/oop-java-labs.git
    cd oop-java-labs
  2. Browse the labs - Each lab is documented in a markdown file (Lab1.md, Lab2.md, Lab3.md)

  3. View solutions - Solutions are included within each lab's markdown file

  4. Run the code:

    javac YourProgram.java
    java YourProgram

Prerequisites

  • Java Development Kit (JDK) 8 or higher
  • Text editor or IDE (VS Code, IntelliJ IDEA, Eclipse)

Learning Path

  1. Start with Lab 1 - Get comfortable with Java basics, syntax, and control structures
  2. Progress to Lab 2 - Learn to organize code using methods
  3. Move to Lab 3 - Understand object-oriented programming fundamentals

Skills You'll Gain

  • Java syntax and fundamentals
  • Problem-solving with algorithms
  • Code organization and modularity
  • Object-oriented programming concepts
  • Encapsulation and data hiding
  • Working with objects and classes
  • Debugging and error handling

Repository Structure

OOP-Spring2026/
├── README.md         # This file
├── Lab1.md           # Lab 1: Introduction to Java
├── Lab2.md           # Lab 2: Methods in Java
└── Lab3.md           # Lab 3: Objects & Encapsulation

Feedback Welcome

If you spot any errors or have suggestions for improvement, feel free to open an issue or reach out!

Connect

Note

These are my personal solutions to lab exercises. While I strive for accuracy, there may be alternative or better approaches. Use these as a reference for learning, not just copying.

License

This repository is for educational purposes. Feel free to use it for learning.


Course: CSC-150 - Object Oriented Programming
Semester: Spring 2026
Student At: Sukkur IBA University

Last Updated: February 2025

About

Object-Oriented Programming lab exercises in Java

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors