Amazon Interview Question
SDE-2sCountry: India
Use Case:
1. User can add a conference room (Admin Panel)
2. User can remove a conference room(Admin Panel)
3. User can add/remove feature of Conference Room.
4. User can book a conference room for a particulate time period.
I think, two micro-services will be required here
1. Conference Room Management
2. Booking Service
Conference Room Management will be dealing with adding/removing of conference rooms
adding/removing of feature of conference rooms.
Booking Service will be responsible for showing available rooms details of room,and initiating booking flow.blocking of rooms
All other use cases are easy one.Last(4th) will need to handle some edge cases.
1. According to user's query,available room(not booked,not blocked) will be displayed to user.
2. User as per his time.floor,capacity go for booking of a room.
3. Room will be blocked for some time,if room is booking it will be marked as booked,
if it is not booked for some time out,Room will be released.
Classes:
If we think in terms of DDD
Conference Room Management.
There should be Below Entity
ConferenceRoom(Aggregate)
Floor
Building
Value Objects
Feature of Conference Room
Booking Service should have:
Booking
Cancellation
Use Case:
1. User can add a conference room (Admin Panel)
2. User can remove a conference room(Admin Panel)
3. User can add/remove feature of Conference Room.
4. User can book a conference room for a particulate time period.
I think, two micro-services will be required here
1. Conference Room Management
2. Booking Service
Conference Room Management will be dealing with adding/removing of conference rooms
adding/removing of feature of conference rooms.
Booking Service will be responsible for showing available rooms details of room,and initiating booking flow.blocking of rooms
All other use cases are easy one.Last(4th) will need to handle some edge cases.
1. According to user's query,available room(not booked,not blocked) will be displayed to user.
2. User as per his time.floor,capacity go for booking of a room.
3. Room will be blocked for some time,if room is booking it will be marked as booked,
if it is not booked for some time out,Room will be released.
Classes:
If we think in terms of DDD
Conference Room Management.
There should be Below Entity
ConferenceRoom(Aggregate)
Floor
Building
Value Objects
Feature of Conference Room
Booking Service should have:
Booking
Cancellation
Use Case:
1. User can add a conference room (Admin Panel)
2. User can remove a conference room(Admin Panel)
3. User can add/remove feature of Conference Room.
4. User can book a conference room for a particulate time period.
I think, two micro-services will be required here
1. Conference Room Management
2. Booking Service
Conference Room Management will be dealing with adding/removing of conference rooms
adding/removing of feature of conference rooms.
Booking Service will be responsible for showing available rooms details of room,and initiating booking flow.blocking of rooms
All other use cases are easy one.Last(4th) will need to handle some edge cases.
1. According to user's query,available room(not booked,not blocked) will be displayed to user.
2. User as per his time.floor,capacity go for booking of a room.
3. Room will be blocked for some time,if room is booking it will be marked as booked,
if it is not booked for some time out,Room will be released.
Classes:
If we think in terms of DDD
Conference Room Management.
There should be Below Entity
ConferenceRoom(Aggregate)
Floor
Building
Value Objects
Feature of Conference Room
Booking Service should have:
Booking
Cancellation
Use Case:
1. User can add a conference room (Admin Panel)
2. User can remove a conference room(Admin Panel)
3. User can add/remove feature of Conference Room.
4. User can book a conference room for a particulate time period.
I think, two micro-services will be required here
1. Conference Room Management
2. Booking Service
Conference Room Management will be dealing with adding/removing of conference rooms
adding/removing of feature of conference rooms.
Booking Service will be responsible for showing available rooms details of room,and initiating booking flow.blocking of rooms
All other use cases are easy one.Last(4th) will need to handle some edge cases.
1. According to user's query,available room(not booked,not blocked) will be displayed to user.
2. User as per his time.floor,capacity go for booking of a room.
3. Room will be blocked for some time,if room is booking it will be marked as booked,
if it is not booked for some time out,Room will be released.
Classes:
If we think in terms of DDD
Conference Room Management.
There should be Below Entity
ConferenceRoom(Aggregate)
Floor
Building
Value Objects
Feature of Conference Room
Booking Service should have:
Booking
Cancellation
Think This model as n-ary tree or compositite design pattern Room is the leaf node and City, Building, Floor are the composite structure.
To add the feature like capacity and tell weather this room is confrence or not use the decorator pattern to make the room dynamically conference or not.
To start a conference, use the iterator pattern to find out the room to connect.
To talk about the HLD use n*n multicast the packet over the wires.
Use Case:
1. User can add a conference room (Admin Panel)
2. User can remove a conference room(Admin Panel)
3. User can add/remove feature of Conference Room.
4. User can book a conference room for a particulate time period.
I think, two micro-services will be required here
1. Conference Room Management
2. Booking Service
Conference Room Management will be dealing with adding/removing of conference rooms
adding/removing of feature of conference rooms.
Booking Service will be responsible for showing available rooms details of room,and initiating booking flow.blocking of rooms
All other use cases are easy one.Last(4th) will need to handle some edge cases.
1. According to user's query,available room(not booked,not blocked) will be displayed to user.
2. User as per his time.floor,capacity go for booking of a room.
3. Room will be blocked for some time,if room is booking it will be marked as booked,
if it is not booked for some time out,Room will be released.
Classes:
If we think in terms of DDD
Conference Room Management.
There should be Below Entity
ConferenceRoom(Aggregate)
Floor
Building
Value Objects
Feature of Conference Room
Booking Service should have:
Booking
Cancellation
Meeting room name should be like <country code>_<city>_<building name>_<floor>_<room number> and others features additions.
- Basu March 06, 2017