📅Week 2: Practice Low-Level Design with Problems for Day 6 and 7.


NOTE: - I started my 8-week system design journey with Coder Army. I will be journaling every day, recording what I learn, reflecting on it, and sharing it with my network to help newcomers to system design.
📌 Introduction
Welcome to Week 2 of my Low-Level Design (LLD) journey!
In Day 6 and Day 7, I focused on applying the SOLID principles by solving a hands-on design problem:
🎯 Redesigning an Image Editor system using clean object-oriented practices.
This blog post walks through the thought process, class structure, code, and implementation in Java using VS Code.
📍Qs 1)
💠 Step 1: Understand the Problem
From the image:
The
ImageEditor
class has too many responsibilities:Capturing an image
Editing operations (crop, sharpen, apply color)
Saving the image
This violates the Single Responsibility Principle (SRP).
Also, if we add a new filter or save to a different database, we'll have to modify this class — violating Open/Closed Principle (OCP).
💠 Step 2: Apply SOLID Principles
We'll redesign the system using the following:
Principle | What to Apply |
S - SRP | Each class should have only one reason to change. |
O - OCP | Add new filters or saving mechanisms without modifying existing code. |
L - LSP | Subclasses should be replaceable with base types. |
I - ISP | Don't force classes to implement unnecessary methods. |
D - DIP | High-level modules should depend on abstractions, not concrete implementations. |
✅ Solution Using SOLID:
SRP:
- Split responsibilities:
Camera
→ capture,Editor
→ apply filters,Storage
→ save
- Split responsibilities:
OCP:
- Introduced interfaces (
Filter
,Storage
) to allow new features without changing existing code
- Introduced interfaces (
DIP:
ImageEditor
andMain
depend on abstractions, not concrete classes
💠 Code: My GitHub Repo
🔗 GitHub: Image Editor Using SOLID Principles
📍Qs 2)
💠 Step 1: Understand the Problem Statement
The task is to build a flexible sorting module that supports multiple sorting strategies such as:
✅ QuickSort: Standard & Randomized
✅ MergeSort: Normal & In-Place
✅ Should allow for easy addition of new algorithms (like HeapSort)
✅ Should allow for order direction (Ascending / Descending)
✅ Should follow OOP best practices, especially the Strategy Pattern
💠 Step 2: Apply SOLID Principles
Principle | Applied How? |
S - SRP | Each class has a single responsibility: SortHandler delegates, strategies perform actual sorting. |
O - OCP | Easy to add new sort strategies (HeapSort, BubbleSort, etc.) without modifying existing classes. |
L - LSP | All strategies (QuickSortStrategy , MergeSortStrategy ) can be used wherever SortStrategy is expected. |
I - ISP | SortStrategy interface contains only sort(...) — no unnecessary methods forced. |
D - DIP | SortHandler depends on abstraction (SortStrategy ), not concrete classes. |
✅ SOLID Principles Applied (Sorting Context LLD)
🔹 SRP (Single Responsibility)
Each class has one job:
SortHandler
: Delegates sortingQuickSortStrategy
,MergeSortStrategy
: Implement specific sorting logic
🔹 OCP (Open/Closed)
Add new strategies (e.g., HeapSort
) without changing existing code.
→ Thanks to the SortStrategy
interface.
🔹 LSP (Liskov Substitution)
All strategies (QuickSort
, MergeSort
) can be used interchangeably via SortStrategy
.
🔹 ISP (Interface Segregation)
The SortStrategy
interface is minimal — only one method: sort(int[], boolean)
.
No unnecessary code for strategy classes.
🔹 DIP (Dependency Inversion)SortHandler
depends on the interface SortStrategy
, not concrete classes.
→ Promotes loose coupling and easy testing.
💠 Code: My GitHub Repo
🔗 GitHub: Image Editor Using SOLID Principles
Week -2 (Day 6 & 7) Completed ✅ System Design
NOTE : - A big thanks to my mentors Rohit Negi Sir and Aditya Sir for launching this amazing 8-week course absolutely free on YouTube via CoderArmy9 :- https://www.youtube.com/@CoderArmy9🙌
👉 Share this blog with your connections! Let’s keep learning, growing, and supporting one another on this journey. 🚀
✍️ Payal Kumari 👩💻
Jai Hind 🇮🇳 | #CoderArmy #LearningInPublic #SystemDesign #TechForAll #MentorshipMatters #8weeksLLdChallenge #LowLevelDesign #Code #LLD
Subscribe to my newsletter
Read articles from Payal Kumari directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Payal Kumari
Payal Kumari
I'm a passionate full-stack developer with a strong foundation in the MERN stack—building and maintaining scalable web applications using React.js, Node.js, and Next.js. My journey in open source began with Hacktoberfest 2023, where I made four impactful pull requests that sparked a love for collaborative coding, global learning, and open knowledge sharing. Since then, I’ve contributed to and mentored projects in top open source programs like GSSoC’24, SSOC’24, and C4GT’24. As a Google Gen AI Exchange Hackathon ’24 Finalist and Google’s Women Techmakers (WTM) Ambassador, I’ve been privileged to support diverse communities in building meaningful tech solutions. My work as a Top 50 Mentor for GSSoC ’24 reflects my commitment to nurturing new talent in tech. Beyond development, I serve as a Student Career Guide, Profile Building Expert & Evangelist at Topmate.io, where I conduct workshops, guide students through resume building and career strategy, and help mentees navigate open source and tech careers. Recognized among the Top 5% of mentors and featured on “Topmate Discover,” I take pride in making mentorship accessible and impactful. My technical voice has also been acknowledged by LinkedIn, where I’ve earned the Top Voice badge seven times in domains like web development, programming, and software engineering. In addition, I hold LinkedIn Golden Badges for Research Skills, Interpersonal Skills, Critical Thinking, and Teamwork—signaling a well-rounded approach to both individual contribution and team collaboration. Graduating with an MCA from Chandigarh University in 2023, I’ve continued to fuel my curiosity by writing technical articles and sharing practical MERN stack insights across platforms. Whether it’s building polished UIs, optimizing backend performance, or guiding a mentee through their first pull request, I’m driven by the power of community and continuous learning. Let’s connect! I'm open to collaborations, mentorship, or building something impactful together. Reach out to me at kumaripayal7488@gmail.com or visit my profile on Topmate.io.