Air Freight Billing System: An Object-Oriented Design Journey

System Overview This article documents the evolution of an air cargo billing system across two development iterations. The project emphasizes solid object-oriented principles including Single Responsibility, Liskov Substitution, Open/Closed, and Composition Over Inheritance. The core challenge lies not in algorithmic complexity but in building ...

Posted on Tue, 30 Jun 2026 16:30:14 +0000 by BLottman

Strategy Design Pattern Implementation

Behavioral patterns define how objects interact and ditsribute responsibilities. The Strategy pattern encapsulates algorithms within interchangeable objects, enabling runtime selection of difefrent behaviors. Pattern Components The Strategy pattern consists of three core elements: Strategy Interface: Defines the common contract for all algorit ...

Posted on Wed, 24 Jun 2026 16:39:59 +0000 by freedomsam

Implementing the Strategy Pattern with Spring Plugin

The Spring Plugin library provides a core interface for building plugin-based architectures: package org.springframework.plugin.core; public interface Plugin<S> { boolean supports(S criteria); } Here is an implementation of this interface for a payment processing scenario. The PayByPaypal class defines the logic for PayPal transacti ...

Posted on Thu, 04 Jun 2026 18:05:00 +0000 by Pointybeard

Implementing Strategy Pattern in Spring Boot to Replace Conditional Logic

First, define the strategy interface and its various implementations: // Strategy contract for payment processing public interface PaymentProcessor { TransactionResult processTransaction(PaymentRequest request); } // Credit card payment implementation @Service public class CreditCardPaymentProcessor implements PaymentProcessor { @Overr ...

Posted on Tue, 19 May 2026 18:15:36 +0000 by ace01