Navratri Sale: Get Upto 30% OFF on Live Training! Offer Ending in
D
H
M
S
Get Now

Design Patterns: Implement SRP in a New Feature

Level : Beginner
Mentor: Shailendra Chauhan
Type : GuidedLab
Points : 10
Duration : 00:20:00

Lab Details

Problem Statement:

A lab to follow the SRP principle while doing your code in C#.

  • Create a feature that logs user activities (e.g., login, logout, data update).
  • Develop a UserActivityLogger class that is responsible only for logging activities.
  • Ensure existing classes are not modified to include logging logic but instead use the UserActivityLogger.
  • Implement a UserService class to manage user-related operations.
  • Integrate logging functionality into the existing Program class to capture user activities seamlessly.

Lab Objective:

Upon completion of this lab, you will be able to:

  • Understand and Use the Single Responsibility Principle (SRP) in Logging.
  • Develop a Dedicated Logging Class.
  • Integrate Logging Without Modifying Existing Classes.

Prerequisites

You should install the following software on your machine:

  • VS Code or Visual Studio
  • .NET SDK
Self-paced Membership
  • 24+ Video Courses
  • 825+ Hands-On Labs
  • 400+ Quick Notes
  • 125+ Skill Tests
  • 10+ Interview Q&A Courses
  • 10+ Real-world Projects
  • Career Coaching Sessions
  • Email Support
Upto 60% OFF
Know More
Still have some questions? Let's discuss.
CONTACT US
Accept cookies & close this