Your low level design videos helped me to clear Amazon SDE-2 interviews :) Just got verbal confirmation they are going with L5., Waiting for offer letter. Very underrated channel.
One input from my side: at 3.22 min timestamp, when you define API is ParkingSpaceAvailableForVehicle, instead of boolean return ,I think we should return List floors where parking is available
For those who are preparing for the interview, this is reqlly good stuff but not enough to face interview, there would be counter question, how concurency ia achieved, how things are updated etc.
I strongly suggest to have a UML diagram to represent the relatonship between classes, that will make you solution easy to visualize and language agnostic.
It's very easy to write classes, interfaces, and enums. There should be implementation of key API's and some client code calling these API's/methods to show the interaction.
Thank you so much for the efforts! Had a small doubt, could you please check? Why Vehicle has both classes PaymentInfo, ParkingTicket? It can just have PaymentInfo as ParkingTicket is already present in it? Similarly, amount need not be present in PaymentInfo as it is already present in ParkingTicket I think.
Much awaited video bro. Referred your videos to three other friends and they are also impressed by your work. Thanks you so much for the great content.
Video is nice.But I have your code 2-3 times and there are some questions i would like to ask: 1. There are functions to generate ticket and process payment at "Parking Attendant" class and at "Gate class". It is not clear what is difference between these two. 2. I dont see need of parking ticket in payment info. Parking ticket "has" payment info or payment receipt. 3. Why do you need display board? All we need to know whether space is there or not.Since we got ticket at entry only ,it means we know where to park our vehicle. Now what will display board data help in any way?If you say, that we will get ticket and we can park at any free spot, then it is not an automated system that we are building at first place. My thoughts for point 1 :There should be a ticketService, which can generate ticket,process payment for a ticket, and it maintains info like, which slots are free and occupied,and talks to parking lot to get this info. Now on booking ticket,slot status change and on payment process slot status change, this service will handle all those stuff, and it can be called from gate or from parking attendant. Update code : ideone.com/gQl4ah
Great video ! I have a small doubt though. The admin class has methods like addParkingFloor(), addParkingSpace(), addParkingDisplayBoard. Isnt this class voilating the single responsibility principle ? Shouldnt we just keep admin related information in the admin class and have another class which exposes these functions as APIs and allows admin to interact with these APIs? Same thing for ParkingAttendant class.
Hi Soumyajit, Couple of questions from my side . Would be grateful if you could answer them. 1) Why is there a vehicle object inside parking space class ? 2) Account class has a function addParkingFloor(ParkingLot parkingLot, ParkingFloor floor); I believe Account object will be created in the Main function (meaning client side). And to call addParkingFloor we must first create an object of Parkingfloor in client side. But should not the floor object be created inside ParkingLot class following composition rule since ParkingLot controls the lifecycle of ParkingFloor ?
@saha 1. when i tried to write my code, i also did not place vehicle in parking space.I am not sure if it is needed or not. 2. I too have some doubt here.Floor will be created in Parking lot only.Parking lot will expose api to add floor which, will be eventually called by admin class.
Thanks for sharing . My sincere request , please make video on - Design Logging Module which can be imported in any client application Thanks soumyajit
It would be great if you can also give a rough call flow of APIs in different scenarios, since i see lot of duplicate methods like for payment, cost etc. and not sure how they all will be called. Thanks.
Hi Soumyajit Thanks for making this video. It is really helpful. In a 1 hour LLD round, what should we focus on more? Defining the models itself takes up a lot of time. What is the interviewer looking for exactly? In this design, is there any design pattern we could use? I am new to this and it would be really helpful if you reply. 😄
doesnt it seems a bad idea to keep processVehicle and processPayment inside parkingAttendant class ? because lets say a parking attendant at one of the exit gates might processVehicleEntry by mistake , i think ParkingAttendant can further be inherited to EntryParkingAttendant and ExitParkingAttendant and those 2 functions will be divided into each one of them. Or if we go by your approach then in proceesVehiclEntry and processPayment the ParkingAttendant object also needs to be passed in order to handle such erroneous requests within those 2 functions only and return false. thoughts ? at 12:57
Aren't we breaking the Open Close Principle while adding Enums in the System? For Example, You have PaymentType as Enum, and suppose a new PaymentType is added in the future, you will have to modify the makePayment method of the Payment Class to take care of that. Instead, we can have a PaymentType as an Interface and Concrete classes like UPI, Credit Card, etc. having a payment method. @Soumyajit Bhattacharyay Please share your views on this.
@@aditigupta6870it wont fail. But you’d have to make changes in the original code, which would be something like adding an extra IF ELSE statement. The idea being discussed here is on the lines of strategy design pattern, which I think is a better fit. EDIT: Enums for cases like the parking status should be okay. I think adding some other design pattern there, from the beginning, would be over engineering
Thanks for the feedback!! Surely i will do that as well!! The elevator design can take a wide variety of different use cases. Will try to cover as much as possible!
Hi @Soumyajit, (Just to get your input) As ParkingAttendant at Entry doesn't have to do payment processing but only exit ParkingAttendant has to. Here Payment is accessible to all ParkingAttendant, so would it be better to have two separate entity as EntryAttendant and ExitAttendant where EntryAttendant has ability to only processVehicleEntry and ExitAttendant can processPayment ? (as an improvement?)
Hey Soumyajit, Thank you for making this video. I have one suggestion, I think its better to make a payment factory class which will support different type of payment options. What do you think ?
Hi, we have the same method in Payment as well as ParkingAttendant class, which takes as input ParkingTicket, PaymentType and returns PaymentInfo, I think we shouldnt have a new Payment class with this method, because Payment object is anyways inside the ParkingAttendant class, and ParkingAttendant class has the same method already, instead in Payment class we can have other core functionalities of handling payment securities etc.
In a real time interview, 1. Do we need to draw use-case diagrams? 2. And then code the complete solution or just draw class diagrams? Please clear this doubt ASAP.
Use case diagram is generally not required in an interview but is for your understanding. It will make the design process very simple. We definitely have to write the classes/interfaces and interaction between them. Whether or not you have to implement some portion will depend on the interviewer
@@SoumyajitBhattacharyay do we need to draw class diagram.Do we need to learn UML stuff like composition,agreegation.If we are comfortable with writing code template with min. required use cases as you did, then do we need to focus on how to draw these things in class diagram with UML notations??
How to solve concurrency issue ? If 2 Vehicles are entering at same time from 2 different Gates, then how to assure that same parking spot will not be allotted to them And also, what should be the algorithm to find best parking spot for each incoming Vehicle
@Mohammad Kaif yeah payment is not complete. Bare mini. we should have a payment class which has some api like payViaCard(CardDetails,amount) or payViaUIP(upid,amount), obviously there will be better designs than what I told, but in video its incomplete,he should have left it instead of putting like this.I also got confused earlier.
can u tell what is difference betweeen extry gate getParkingTicket() fxn and ParkingAttendent processVechicle() api, who will be called when and how these differ?Once returns bool and one parking ticket,but what is the exact flow to enter a vehicle?And why exit gate dont have payment if it has ability to process payment?
Why the makePayment and getTicket APIs are not in some other service, why it is in EXITGATE Object? Like PaymentService at the service level, is it necessary to put API methods in individual objects instead of defining classes at the Service level (IN MVC type of Architecture) ?
What if required to provide nearest parking spot from entrance and have multiple entrances? // 100 parking spots are divided 25 each into 4 different entrances. // PriorityQueue is use for min heap because min heap provide smallest distance from entrance to most nearest parking spot and distances increases 2nd most nearest // parking spot......and so on.... Map entrance_1 = new HashMap(); Map entrance_2 = new HashMap(); Map entrance_3 = new HashMap(); Map entrance_4 = new HashMap();
Hi abhishek! Thanks for the feedback. The key to any LLD is that you need to be able to visualise the problem clearly. In my previous videos i have shown what needs to be done to be able to come up with these designs. In short first properly define the requirements. Believe me this is the most important step. After that, come up with a use case diagram containing major actors in the design and then translate the use case diagram to class design. You can go through the playlist to get a sense of it. I will be adding a lot more.
@@SoumyajitBhattacharyay Thank you so much for explaining. I will go through your entrie playlist. Are you also planning for hld(and db schema) or some good resources for the same in your opinion?
can you provide codes of all your LLD videos in C++ also It would be very helful , or can you suggest some websites from where I can get C++ implementations of the same.?
The LLD is ok for freshers. Just defines entities. In an actual interview for experienced candidates - you need to think about concurrency and write code snippets for critical design decisions.
This was the case for SDE2 interviews for all the firm's I have interviewed for. Be it Indeed, twilio, Amazon, media net inmobi etc. And I have gotten offers from all of them. So this holds true even for experienced hires at the SDE 2 level. This is what was expected in their interviews. Mostly, class design, ApI design, database design and small algorithmic implementation. 🙂
Some points that were not clear : 1. Why do we need display boards on all floors?When a vehicle enters,i suppose system will auto assign a space to it.SO who will be using this display boards for reading?If a car enters,it has a spot assigned ,what the board shows in each floor, how is it useful? 2.I think payment should be and abstract class and with multiple implementation like credit card,debit,upi etc. implementing it.Just passing debit card as a type to payment method,it is not able to process without debit card details. 3.I dont see any use case of putting payment info in vehicle.Vehicle has number and parking ticket. Is it a sort of bill for a parking ticket?
Every level should have a display board because as there are multiple entry points and multiple exit points, think of a scenario where there are entry and exit points present at each of the levels, in that case the display board will be displaying the information gor that level and the driver along with vehicle can decide to skip larking at that level if there isnt any space available etc. That is exactly how it will be implemented. I had decided not to add the inplementation of the payment module here itself as it can by itself be a whole another beast. The paymentType enum will be used to generate the appropriate object from the factory that will return cc/dc/upi etc. Implementation object which will then itself trigger its flows. Since thats a separate system al to gether decided to abstract it here. Probably can take up the payment systems in a separate video? What say? Payment info is being put along with parking ticket inside the vehicle to madel the real life scenario where a copy of the parking ticket is given to the driver/vehicle at the point of entry. Since the vehicle has a parking ticket and an associated payment info with it I have added it inside the vehicle class itself
@@SoumyajitBhattacharyay cool.Its fine.There are lot of requirements to cover in one question only.And it is better that we restrict ourself to min. stuff that we can provide.I understood now.Thanks.And yes,if you can take up payment in a more details in next LLD video or may be a as a separate entity only in a single video,it would be great and the functionality will be same for payment everywhere. But payment bean for credit card/debit card etc. will be different for different customers,so I dont know whether factory method will be a good fir there.Is it a good idea when factory class has argument constructor with type of card and details of card like debit/credt/upi etc. and then create a new payment object from that everytime.I thought like payment as a abstract class and the child are debit/credit card as its implementation and then we can pass object of abstract payment and this it can be processed.
Yes i was also thinking of the same!. Will try and come up with a good design and shoot the video. Currently done with the shoot for stack overflow LLD! Stay tuned for that
@@SoumyajitBhattacharyay one more point i want to add is that parking board ,if it is at every floor, then it should display the entire lot info and not the current parking floor info.Because you can enter from any entry then the parking floors are inter connected mostly and we should inform person ,like which floor he/she can go to park as per space on board.let us say person sees only current floor info and he sees full and he did not enter and possibility is that other floor has space available.
Surely i will cover. Recently in one of my interviews i was asked about the hld of yelp, which is a location based app. Will try and make a video around it!
True! I must have missed it while editing. Will make sure to rectify this as much as possible in the future. But sometimes it becomes un avoidable though! ☺
Hello all , can some one throw some some light on how the interaction between processPayment of ParkingAttendant and payParkingBill of Exit gate happens
completely wrong, this is an exactreplica of the answers you will find online. However a real world system low level design for a parking space app will not be somewhere identical to this.
Not at all good, bro you are just reading the code and explaining like some presentation. Even we know how to read a code. You should rather explain how to approach.
Your low level design videos helped me to clear Amazon SDE-2 interviews :) Just got verbal confirmation they are going with L5., Waiting for offer letter. Very underrated channel.
Thats so awesome!!! It is really great to see that it helped you ❤.
Do share it among your friends as well it will help the channel a lot! ❤❤
Did you got the offer?
What package
@@ronitroy3174 amazon sde2 band is around 75 LPA ( base pay 38 Lacs/ year)
Not true. Even 1.5 year experience guys who are getting promoted, get a base of 40+
This is old data though.
One input from my side: at 3.22 min timestamp, when you define API is ParkingSpaceAvailableForVehicle, instead of boolean return ,I think we should return List floors where parking is available
Not many have the skill to teach,you are blessed with one. I wish you all the best brother.
This is the best parking lot lld video, most comprehensible and logical.
This is the best LLD series, other channels wear make up and talk non sense.
You are a hidden diamond sir. Thank you!!!
Glad you feel this way
For those who are preparing for the interview, this is reqlly good stuff but not enough to face interview, there would be counter question, how concurency ia achieved, how things are updated etc.
watching your videos before my LLD interview. Hope it goes well.
All the best for your interviews
I strongly suggest to have a UML diagram to represent the relatonship between classes, that will make you solution easy to visualize and language agnostic.
It's very easy to write classes, interfaces, and enums. There should be implementation of key API's and some client code calling these API's/methods to show the interaction.
True. But that is generally not the expectation out of the LLD round. However, same will be the expectation out of a machine coding round.
Very nicely explained and in a much simpler manner as compared to other resources available.
Thank you so much for the efforts! Had a small doubt, could you please check? Why Vehicle has both classes PaymentInfo, ParkingTicket? It can just have PaymentInfo as ParkingTicket is already present in it? Similarly, amount need not be present in PaymentInfo as it is already present in ParkingTicket I think.
Much awaited video bro. Referred your videos to three other friends and they are also impressed by your work. Thanks you so much for the great content.
Thanks so much!! Really appreciate the feedback!! Keep supporting tgr channel!.
Any other video suggestions??
@@SoumyajitBhattacharyay Elevator LLD.
Video is nice.But I have your code 2-3 times and there are some questions i would like to ask:
1. There are functions to generate ticket and process payment at "Parking Attendant" class and at "Gate class". It is not clear what is difference between these two.
2. I dont see need of parking ticket in payment info. Parking ticket "has" payment info or payment receipt.
3. Why do you need display board? All we need to know whether space is there or not.Since we got ticket at entry only ,it means we know where to park our vehicle. Now what will display board data help in any way?If you say, that we will get ticket and we can park at any free spot, then it is not an automated system that we are building at first place.
My thoughts for point 1 :There should be a ticketService, which can generate ticket,process payment for a ticket, and it maintains info like, which slots are free and occupied,and talks to parking lot to get this info.
Now on booking ticket,slot status change and on payment process slot status change, this service will handle all those stuff, and it can be called from gate or from parking attendant.
Update code : ideone.com/gQl4ah
@Mohammad Kaif yeah u are correct
Still relevant in 2024. Thanks for the video.
Very Good Explanation! and one doubt! Don't we need to write code for the functions we have declared in the LLD round?
Hi soumyajit, can you design a task scheduler, will really help just like your other videos
Great video !
I have a small doubt though. The admin class has methods like addParkingFloor(), addParkingSpace(), addParkingDisplayBoard. Isnt this class voilating the single responsibility principle ? Shouldnt we just keep admin related information in the admin class and have another class which exposes these functions as APIs and allows admin to interact with these APIs? Same thing for ParkingAttendant class.
Hi Soumyajit,
Couple of questions from my side . Would be grateful if you could answer them.
1) Why is there a vehicle object inside parking space class ?
2) Account class has a function addParkingFloor(ParkingLot parkingLot, ParkingFloor floor);
I believe Account object will be created in the Main function (meaning client side). And to call addParkingFloor we must first create an object of Parkingfloor in client side. But should not the floor object be created inside ParkingLot class following composition rule since ParkingLot controls the lifecycle of ParkingFloor ?
@saha
1. when i tried to write my code, i also did not place vehicle in parking space.I am not sure if it is needed or not.
2. I too have some doubt here.Floor will be created in Parking lot only.Parking lot will expose api to add floor which, will be eventually called by admin class.
Thanks for sharing .
My sincere request , please make video on - Design Logging Module which can be imported in any client application
Thanks soumyajit
It would be great if you can also give a rough call flow of APIs in different scenarios, since i see lot of duplicate methods like for payment, cost etc. and not sure how they all will be called. Thanks.
Agree. API flow will help understand more better. Like connecting dots at the end.
@@Abhisheksaharn you can watvh him then @udit agarwal
No UML Diagrams??
Hi Soumyajit
Thanks for making this video. It is really helpful. In a 1 hour LLD round, what should we focus on more? Defining the models itself takes up a lot of time. What is the interviewer looking for exactly? In this design, is there any design pattern we could use?
I am new to this and it would be really helpful if you reply. 😄
doesnt it seems a bad idea to keep processVehicle and processPayment inside parkingAttendant class ? because lets say a parking attendant at one of the exit gates might processVehicleEntry by mistake , i think ParkingAttendant can further be inherited to EntryParkingAttendant and ExitParkingAttendant and those 2 functions will be divided into each one of them. Or if we go by your approach then in proceesVehiclEntry and processPayment the ParkingAttendant object also needs to be passed in order to handle such erroneous requests within those 2 functions only and return false. thoughts ? at 12:57
Aren't we breaking the Open Close Principle while adding Enums in the System?
For Example, You have PaymentType as Enum, and suppose a new PaymentType is added in the future, you will have to modify the makePayment method of the Payment Class to take care of that.
Instead, we can have a PaymentType as an Interface and Concrete classes like UPI, Credit Card, etc. having a payment method.
@Soumyajit Bhattacharyay Please share your views on this.
This makes sense. Enum should only be used if you know the states are final.
well said
@shashankmittal8820, can you explain that how if we add new enum values in PaymentType, the makePayment() in Payment class will fail?
@@aditigupta6870it wont fail. But you’d have to make changes in the original code, which would be something like adding an extra IF ELSE statement.
The idea being discussed here is on the lines of strategy design pattern, which I think is a better fit.
EDIT:
Enums for cases like the parking status should be okay.
I think adding some other design pattern there, from the beginning, would be over engineering
Hello Soumyajit. Great content!! For the next video can you make LLD for elevator design, as that is also a pretty popular question
Thanks for the feedback!! Surely i will do that as well!!
The elevator design can take a wide variety of different use cases. Will try to cover as much as possible!
Nice Work Dude..it would be cherry on top if uml diagram also there..
Hi @Soumyajit, (Just to get your input) As ParkingAttendant at Entry doesn't have to do payment processing but only exit ParkingAttendant has to. Here Payment is accessible to all ParkingAttendant, so would it be better to have two separate entity as EntryAttendant and ExitAttendant where
EntryAttendant has ability to only processVehicleEntry and ExitAttendant can processPayment ? (as an improvement?)
@Rahul Parking attendent can sit at entry gate sometimes and exit gate sometimes, what you suggested is too contrained.
Just a thought. If we are collecting ticket at the entry gate, what is the use of having vacant spots display at each floor ? Isn't it contradicting ?
I think its just for visibility on traffic for everyone present on that floor
Such a great explanation. Can you create one for Design elevator system? This will be very helpful as there no such good videos for elevator design.
I was looking for this design. Thanks a lot and by the way aj KKR jitche😊
Thanks for the feedback!!
Aajke KKR hope so jete!! :P
Hey Soumyajit, Thank you for making this video. I have one suggestion, I think its better to make a payment factory class which will support different type of payment options. What do you think ?
Try to make interfaces also along with classes ..
Video begins at 1:56
Ato vlo contain akn vabchi agay subscribe korlay aro agay onk kechu jantay partam.
Bhaiya call center, deck of cards, online chat lld videos too, please, and this video was awesome
Very helpful video
Hi, we have the same method in Payment as well as ParkingAttendant class, which takes as input ParkingTicket, PaymentType and returns PaymentInfo, I think we shouldnt have a new Payment class with this method, because Payment object is anyways inside the ParkingAttendant class, and ParkingAttendant class has the same method already, instead in Payment class we can have other core functionalities of handling payment securities etc.
In a real time interview,
1. Do we need to draw use-case diagrams?
2. And then code the complete solution or just draw class diagrams?
Please clear this doubt ASAP.
Use case diagram is generally not required in an interview but is for your understanding.
It will make the design process very simple.
We definitely have to write the classes/interfaces and interaction between them.
Whether or not you have to implement some portion will depend on the interviewer
@@SoumyajitBhattacharyay do we need to draw class diagram.Do we need to learn UML stuff like composition,agreegation.If we are comfortable with writing code template with min. required use cases as you did, then do we need to focus on how to draw these things in class diagram with UML notations??
Not in an interview. You can directly jump to thinking about design clases.
But in the job, definitely uml, sequence diagrams etc. Need to be drawn.
@@SoumyajitBhattacharyay thanks for quick reply:)
How to solve concurrency issue ? If 2 Vehicles are entering at same time from 2 different Gates, then how to assure that same parking spot will not be allotted to them
And also, what should be the algorithm to find best parking spot for each incoming Vehicle
explaining only this much of code will be enough for the interview?
So Attendant would be for whole parking lot or at each parking floor ?
Do we have to write database schema also for lld?
Will parkingTicket not have vehicle NUmber? How can parkingAttendant validate that the ticket belongs to the owner?
Thanks a lot for the great video
Brilliant bro! Couldn't find better video than this. Waiting for more such design videos and tips, thanks a lot for great content!
So glad that you liked it. I am coming up with a series on design patterns, oops concepts and their usage!!
next request: Linkedin or Facebook Design:)
Sure low level or high level?
We need both:). I think you can first complete Low level playlist and then start on high level designs.
@Mohammad Kaif yeah payment is not complete. Bare mini. we should have a payment class which has some api like payViaCard(CardDetails,amount) or payViaUIP(upid,amount), obviously there will be better designs than what I told, but in video its incomplete,he should have left it instead of putting like this.I also got confused earlier.
Wow very nice. More of these please :)
Why did you keep the vehicle object inside parkingSpace class?? It doesn't look more granular code in this case.
bhai pleas add concurrency while assigning a slot, grokking the system design on educative has much more depth
can u tell what is difference betweeen extry gate getParkingTicket() fxn and ParkingAttendent processVechicle() api, who will be called when and how these differ?Once returns bool and one parking ticket,but what is the exact flow to enter a vehicle?And why exit gate dont have payment if it has ability to process payment?
Please upload the lld videos for elevator and splitwise
Why the makePayment and getTicket APIs are not in some other service, why it is in EXITGATE Object? Like PaymentService at the service level, is it necessary to put API methods in individual objects instead of defining classes at the Service level (IN MVC type of Architecture) ?
Shouldn't PaymentInfo contain a payment method as well?
Please make a video on
uber
What if required to provide nearest parking spot from entrance and have multiple entrances?
// 100 parking spots are divided 25 each into 4 different entrances.
// PriorityQueue is use for min heap because min heap provide smallest distance from entrance to most nearest parking spot and distances increases 2nd most nearest
// parking spot......and so on....
Map entrance_1 = new HashMap();
Map entrance_2 = new HashMap();
Map entrance_3 = new HashMap();
Map entrance_4 = new HashMap();
When you explain I understand, but it looks very complex. How to come up with such clear design?
Hi abhishek! Thanks for the feedback.
The key to any LLD is that you need to be able to visualise the problem clearly. In my previous videos i have shown what needs to be done to be able to come up with these designs.
In short first properly define the requirements. Believe me this is the most important step. After that, come up with a use case diagram containing major actors in the design and then translate the use case diagram to class design. You can go through the playlist to get a sense of it. I will be adding a lot more.
@@SoumyajitBhattacharyay Thank you so much for explaining. I will go through your entrie playlist.
Are you also planning for hld(and db schema) or some good resources for the same in your opinion?
Thank you so much for the great content ❤️
No problem at all
can you provide codes of all your LLD videos in C++ also
It would be very helful , or can you suggest some websites from where I can get C++ implementations of the same.?
The LLD is ok for freshers. Just defines entities. In an actual interview for experienced candidates - you need to think about concurrency and write code snippets for critical design decisions.
This was the case for SDE2 interviews for all the firm's I have interviewed for. Be it Indeed, twilio, Amazon, media net inmobi etc. And I have gotten offers from all of them. So this holds true even for experienced hires at the SDE 2 level.
This is what was expected in their interviews. Mostly, class design, ApI design, database design and small algorithmic implementation. 🙂
Some points that were not clear :
1. Why do we need display boards on all floors?When a vehicle enters,i suppose system will auto assign a space to it.SO who will be using this display boards for reading?If a car enters,it has a spot assigned ,what the board shows in each floor, how is it useful?
2.I think payment should be and abstract class and with multiple implementation like credit card,debit,upi etc. implementing it.Just passing debit card as a type to payment method,it is not able to process without debit card details.
3.I dont see any use case of putting payment info in vehicle.Vehicle has number and parking ticket. Is it a sort of bill for a parking ticket?
Every level should have a display board because as there are multiple entry points and multiple exit points, think of a scenario where there are entry and exit points present at each of the levels, in that case the display board will be displaying the information gor that level and the driver along with vehicle can decide to skip larking at that level if there isnt any space available etc.
That is exactly how it will be implemented. I had decided not to add the inplementation of the payment module here itself as it can by itself be a whole another beast.
The paymentType enum will be used to generate the appropriate object from the factory that will return cc/dc/upi etc. Implementation object which will then itself trigger its flows. Since thats a separate system al to gether decided to abstract it here.
Probably can take up the payment systems in a separate video? What say?
Payment info is being put along with parking ticket inside the vehicle to madel the real life scenario where a copy of the parking ticket is given to the driver/vehicle at the point of entry. Since the vehicle has a parking ticket and an associated payment info with it I have added it inside the vehicle class itself
@@SoumyajitBhattacharyay cool.Its fine.There are lot of requirements to cover in one question only.And it is better that we restrict ourself to min. stuff that we can provide.I understood now.Thanks.And yes,if you can take up payment in a more details in next LLD video or may be a as a separate entity only in a single video,it would be great and the functionality will be same for payment everywhere.
But payment bean for credit card/debit card etc. will be different for different customers,so I dont know whether factory method will be a good fir there.Is it a good idea when factory class has argument constructor with type of card and details of card like debit/credt/upi etc. and then create a new payment object from that everytime.I thought like payment as a abstract class and the child are debit/credit card as its implementation and then we can pass object of abstract payment and this it can be processed.
Yes i was also thinking of the same!. Will try and come up with a good design and shoot the video.
Currently done with the shoot for stack overflow LLD!
Stay tuned for that
@@SoumyajitBhattacharyay one more point i want to add is that parking board ,if it is at every floor, then it should display the entire lot info and not the current parking floor info.Because you can enter from any entry then the parking floors are inter connected mostly and we should inform person ,like which floor he/she can go to park as per space on board.let us say person sees only current floor info and he sees full and he did not enter and possibility is that other floor has space available.
@Soumyajit Bhattacharyay Do we have a class diagram or Flow diagram of it. That will be so helpful. If somebody has this please reply.
what about the DB schema?
So no design pattern is used here?
Awesome explanation! Can you please cover graph networks and location based apps LLD/HLD! Will most definitely be tuning in for updates
Surely i will cover. Recently in one of my interviews i was asked about the hld of yelp, which is a location based app. Will try and make a video around it!
That'll be awesome!
But you haven't implemented the functions, is that alright?
Can anyone tell me how to run this code and where...I don't know about this..
can you please give this program in python language...
suggestion : Your image is coming over code and some parts like 11:08 are not visible clearly.
True! I must have missed it while editing. Will make sure to rectify this as much as possible in the future. But sometimes it becomes un avoidable though! ☺
online food delivery system please
Just want to know wether you are a fan of Sunil Narine or not. Expecting a reply 😅
Too much for digest to me, I need ENO seriously to digest this. 😅😅😅
Hello all , can some one throw some some light on how the interaction between processPayment of ParkingAttendant and payParkingBill of Exit gate happens
completely wrong, this is an exactreplica of the answers you will find online. However a real world system low level design for a parking space app will not be somewhere identical to this.
Kkr💙💙💙💙💙
Hahah vut this season was a little dissapointing :'(
Yes, but 'korbo lorbo jitbo'
@here anyone working on/ Worked on python implementation of the same ? Need help ! Very Urgent. Thanks in Advance!
abbe dheere bol le bhai thoda
Fake accent
Not at all good, bro you are just reading the code and explaining like some presentation. Even we know how to read a code. You should rather explain how to approach.