Skip to content
/ CAT-2 Public

Rules for the CAT (Continuous Assessment Test) 1. General Guidelines • All answers must be well-structured and clearly written. • Use one GitHub repository for CAT 2. • Use README file to explain your code • All code must compile and run successfully; otherwise, marks will be deducted. • Submit your answers within the allocated time. •

Notifications You must be signed in to change notification settings

193330/CAT-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

CAT 2 Java Programming Assignment.

Project Overview

This repository contains Java implementations illustrating key Object-Oriented Programming concepts.

Implemented Concepts

1. Encapsulation

  • Class: Student
  • Features:
    • Private attributes: name and grade
    • Public getter and setter methods
    • Grade validation (0-100 range)

2. Method Overloading and Overriding

  • Classes:
    • MathOperations: Demonstrates method overloading
    • Animal, Dog, Cat: Shows method overriding and polymorphism

3. Abstraction

  • Abstract class: Appliance
  • Concrete subclasses: Fan, TV
  • Illustrates abstract method implementation

4. Exception Handling

  • Class: DivisionExample
  • Handles division by zero scenario
  • Provides user-friendly error messaging

Setup and Running

  1. Ensure Java Development Kit is installed
  2. Compile each class separately
  3. Run the main method in each demonstration class

Compilation Instructions

.java
java ClassNameToRun

Key Learning Outcomes

  • Understanding encapsulation principles
  • Implementing method overloading
  • Practicing method overriding
  • Applying abstraction concepts
  • Handling runtime exceptions

About

Rules for the CAT (Continuous Assessment Test) 1. General Guidelines • All answers must be well-structured and clearly written. • Use one GitHub repository for CAT 2. • Use README file to explain your code • All code must compile and run successfully; otherwise, marks will be deducted. • Submit your answers within the allocated time. •

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published