Skip to content

Lab1 - The SOLID principles

The SOLID principles

Download PDF

Download TP1

Introduction

The SOLID principles are design principles that are used in Object-Oriented software development in order to encourage us to create more maintainable, understandable, and flexible applications. In this workshop, we will iterate through each principle where a given problem has already been addressed. We will analyze the existing solution, identify its shortcomings and then suggest a more SOLID design for it.

Questions

Clone this repository https://github.com/INSATunisia/SOLID locally and go through the examples in the following order:

  • SRP (Single Responsibility Principle)
  • OCP (Open-Closed Principle)
  • LSP (Liskov Substituion Principle)
  • ISP (Interface Segregation Principle)
  • DIP (Dependency Inversion Principle)

In each directory, you will find an example with its refactored solution (called example_refactored) and an exercice. You need to apply the given principle to the exercice, model it with UML and explain the reasons of your choice.

I invite you to discover PlantUML for designing UML diagrams.

Deliverables

You will need to submit the following deliverables in the Classroom space (the work is done by pairs) :

  • A report depicting the design of each exercise before and after the applied modification, with an explanation of the principle and how/why did you perform the changes.
  • A link of the github repository showing your code.

Last update: 2022-09-21