Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 1.87 KB

README.md

File metadata and controls

44 lines (38 loc) · 1.87 KB

🎓 Mastering Java OOP: Classes and Inheritance

📚 What is Covered?

This module covers the core concepts of Object-Oriented Programming (OOP) in Java, specifically focusing on Classes, Constructors, Inheritance, and String handling.

  • Classes and Objects: Understanding the blueprint vs. the instance, fields, and methods.
  • Encapsulation: Using Getters and Setters to protect data.
  • Constructors: Initialization, Constructor Chaining, and the this() and super() calls.
  • POJOs and Records: Traditional Plain Old Java Objects vs. the modern Java Records.
  • Inheritance: Extending classes, overriding methods, and the java.lang.Object hierarchy.
  • String Handling: String immutability, formatting (including Text Blocks), and the StringBuilder class.

🏗️ Project Structure

The project is organized into several subfolders, each focusing on a specific topic:

  • classes-constructors/:
    • Classes: Introduction to class definitions and objects.
    • BankAccount: Practice with fields, methods, and encapsulation.
    • CustomerData: Deep dive into constructors and constructor chaining.
    • Records: Exploring the modern Record type in Java.
  • inheritance/:
    • Inheritance: Basics of class extension (Animal, Dog, Fish).
    • TheObjectClass: Understanding the root of the Java class hierarchy.
  • text-strings/:
    • AllAboutStrings: String methods and manipulation.
    • StringFormatting: Formatting output and using Text Blocks.
    • StringOptions: Efficient string building with StringBuilder.
  • challenges/:
    • InheritanceChallenge: A comprehensive challenge to design a worker hierarchy using inheritance.
    • CylinderCircleInheritance: Inheritance challenge involving Circles and Cylinders.
    • CuboidPoolAreaCalculation: Practice with rectangle and cuboid inheritance for area and volume calculations.