Solid Principles

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

A.

Suppose we need to develop a simple console application for the public


administration. The application is about vehicle tax. They (only) have the
following business rules:

1. If the vehicle is a car and the last time its owner paid the tax was 30 days
ago then the owner has to pay again.

2. If the vehicle is a motorbike and the last time its owner paid the tax was 60
days ago then the owner has to pay again.

In other words, if you have a car you have to pay every 30 days or if you have a
motorbike you have to pay every 60 days.

For each vehicle in the system, the application should test those rules and print
those vehicles (plate number and owner information) that don't satisfy them.

3. Conform to the S.O.L.I.D. principles (especially Open/closed principle).

You might also like