Posts

Showing posts from January, 2025

LLD and State Diagram of a General Vending Machine

Image
In this blog, we'll discuss about the Low Level Design ans State Machine Diagram of General Vending Machine. Low Level Design  State Diagram

LLD of a Parking Lot

Image
  Requirements Gathering : Possible objects we will require : Vehicle  VehicleNo VehicleType Ticket EntryTime ParkingSpot EntraceGate method findParkingSpace  method updateParkingSpace method generateTicket ParkingSpot id  isEmpty VehicleType VehicleNo price  method parkVehicle method removeVehicle

Routine, Subroutine and Coroutine in Programming - Explained Easy

Image
 Routine in General When I was in school, I used to wake up at 7:00 in the morning and then would prepare up myself for school. Come back from school by 3:00 in the afternoon and then study for sometime and then go for playing basketball. In a very basic sense, I followed a Routine. And I followed this routine for the entire lifetime when I was in the school. It did not change. Routine in Programming A Routine is essentially something that stays same for the entire lifetime of it and does not change. Similarly in programming, a routine is a fixed number of code lines that are intended to perform a specific task. Like my very own routine, which prepared me for school and so on ! Important points about Routine in Programming : Routines are self - contained. They do not depend on any other piece of code in your program. They are used to break down a complex program into smaller sub-programs to reduce the redundancy.  They can be invoked independently from other part of code to pe...