Skip to content

VasylP0/java-oop-ru-inheritance

Repository files navigation

Java OOP — Inheritance Project

This project is part of the Hexlet Java OOP course.
It demonstrates the concept of inheritance, method overriding, and object composition in Java by building a simple HTML tag rendering system.


🧩 Project Overview

The main goal of this assignment is to show how classes can inherit behavior from a base class and extend or override it to add specific functionality.

Key concepts covered:

  • Inheritance between base and derived classes
  • Method overriding and super calls
  • Code reuse through a common abstract type
  • Encapsulation and clean OOP hierarchy

🏗️ Main Classes

  • Tag – base class representing a generic HTML tag
  • SingleTag – subclass for self-closing tags (e.g., <br>, <img>)
  • PairedTag – subclass for tags with content and nested children (e.g., <div>, <p>)

Each subclass customizes the rendering behavior to produce valid HTML output.


🧪 Run Tests

To verify correctness locally:

make test

About

Hexlet Java OOP course assignment: demonstrating inheritance, method overriding, and polymorphism.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published