All projectsProject / 01

Selected project / 01

Java Backend 90d.

A paused Java learning track documenting three practical steps: from procedural banking operations to encapsulated objects, inheritance and method overriding.

Technologies
Java
Status

Paused / Study project

View repository

Project scope

What it covers.

  • 01Java fundamentals
  • 02Encapsulation
  • 03Constructors and validation
  • 04Inheritance
  • 05Method overriding and polymorphism

Overview

A practical path, recorded in code.

The repository organizes progressive Java exercises. Its history and files show three completed steps: basic operations, encapsulation, and an initial inheritance relationship. It is an ongoing study, not a finished application.

The project is currently paused while I focus on other learning priorities.

Learning progression

Three steps, from shared state to polymorphism.

01

Banking operations in a procedural flow

Day 1 · Java fundamentals

A console menu handles interaction and calls operations that change a static balance. The input flow also rejects invalid amounts and withdrawals above the balance.

Files BankApp.java (renamed to BankApp1.java on Day 2)

Learning Variables, static methods, conditionals, loops and exceptions.

02

State and behavior in an object

Day 2 · encapsulation

BankAccount is created with an initial balance; the balance is private, and deposit and withdrawal validate their rules inside the object's methods.

Files BankAccount.java, BankApp.java

Learning Constructors, instance state, encapsulation and behavior ownership.

03

Specializing users

Day 3 · inheritance and overriding

User validates names and email, generates a UUID and defines getRole(). Admin extends User and overrides that method; Main uses a User reference for both User and Admin instances.

Files User.java, Admin.java, Main.java

Learning Inheritance, overriding and polymorphic dispatch. The code does not implement a permissions system.

Code evolution

From operations on shared state to objects with distinct roles.

These excerpts come from the exercises in the first three days. They show concrete changes in the code without implying an application architecture the repository does not yet have.

BankApp1

Day 1 · static state and a simple operation
private static double balance = 1000.0;

public static double deposit(double value) {
    balance += value;
    return balance;
}

BankAccount

Day 2 · state and behavior in the object
private double balance;

public void deposit(double amount) {
    if (amount <= 0) {
        throw new IllegalArgumentException(
            "The amount must be greater than 0."
        );
    }
    balance += amount;
}

Admin

Day 3 · specialization through inheritance
public class Admin extends User {
    public Admin(String name, String email) {
        super(name, email);
    }

    @Override
    public String getRole() {
        return "Admin";
    }
}
UserAdmin

Main also assigns an Admin instance to a User-typed variable; calling getRole() uses Admin's overridden implementation.

Practiced concepts

Fundamentals visible in the exercises.

  • Java fundamentalsVariables, methods, conditionals, loops and console input.
  • EncapsulationPrivate balance and validated operations in BankAccount.
  • Constructors and validationObject initialization and name/email validation in User.
  • Inheritance and overridingAdmin extends User and redefines getRole().
  • PolymorphismMain references an Admin instance through the User type.

Learning

What this project taught me.

The progression helped me see where state and rules belong: first in operations concentrated in the program flow, then in an object that protects its own state, and finally in a specialized class that changes inherited behavior.

Next projectNode HTTP API