During a machine coding round of the company, I designed the Conference Room System in a given one hour.

Overview

DesignConferenceRoom

DESIGN A CONFERENCE ROOM

One of the core problems which people face at every company is the unavailability of conference rooms. So we thought of building one conference room management system. The system should have the following features.

Assumptions:

  1. Conference rooms are scattered across multiple buildings and multiple floors and each floor can have multiple conference rooms, but each conference room should be uniquely identifiable.

  2. Booking will be done for slots in hours. Hours will be taken in 24 hours format eg. Book from 1am to 3am {1:3}, from 12pm to 1pm {12:13}

  3. Each conference room can be booked given that no one has already booked for that slot.

  4. Booking can be done for a maximum of 12 hour.

Features:

  1. List down all the conference rooms available in any building.

  2. Users should be able to book a room for a particular slot if it’s valid and available.

  3. Users should be able to cancel existing booking and rooms should be free to be booked again for that slot.

  4. List down all the bookings.

Commands:

ADD BUILDING

Eg: ADD BUILDING

Output: Added building b1 into the system.

ADD FLOOR

Eg. ADD FLOOR b1 2

Output: Added floor 2 in building b1.

ADD CONFROOM

Eg: ADD CONFROOM c1 1 b1

Output: Added conference room c1 in first floor of building b1.

List the available conference rooms:

LIST ROOMS

Ex :

c1 1 b1 [{1:24}]

c2 2 b2 [{2:12}, {14:18}]

output Format :

Books the given Conference room for a given slot, on the given floor of the building.

BOOK

Ex: BOOK 1:5 b1 7 C1

Cancels the slot booked for the floor in a given building.

CANCEL

List down all the bookings

LIST BOOKING

Output format:

Ex:

2:6 3 b1 c1

6:10 3 b1 c2

Expectation

  • Code should be Demo-able and functionally complete.
  • Code should fail gracefully with a proper error message for corner/invalid cases, use exceptions for handling these cases.
  • Code should be modular, try thinking in terms of Object-Oriented Design.
  • Input can be taken from the command line or in the main function.
  • Do not use any database or NoSQL store, use in-memory data structure.
  • Do not create any UI for the application
  • Driver class can be designed as per your choice, but it should cover all the scenarios.
  • Please prioritise code compilation, execution, and completion.

Output

  1. Output 1
  2. Output 2
  3. Output 3
You might also like...

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

OpenAPI Generator Master (5.4.x): 6.0.x (6.0.x): ⭐ ⭐ ⭐ If you would like to contribute, please refer to guidelines and a list of open tasks. ⭐ ⭐ ⭐ ‼️

Dec 30, 2022

It creates a Trie with given input and perform character based operations

It creates a Trie with given input and perform character based operations

Trie-with-character-based-operations It creates a Trie with given input and perform character based operations Boolean Search(String arg): This functi

Jul 3, 2022

All the Assignment Programs given by College

All the Assignment Programs given by College

OOPs-Assignment This is a Repo holding the Assignments or test programs given by the College in the 5th Semester. We will try to include as much as pr

Jul 16, 2022

OpenAPI JSON Schema Generator allows auto-generation of API client libraries with a focus on JSON schema given an OpenAPI Spec

OpenAPI JSON Schema Generator IMPORTANT: before the first release, one will need to build the project locally to use the enhancements, bug fixes in th

Dec 31, 2022

A simple live streaming mobile app with cool functionalities and time extension, and live chat. With a payment system integrated. Server is designed with socket.io to give you full flexibility.

A simple live streaming mobile app with cool functionalities and time extension, and live chat. With a payment system integrated. Server is designed with socket.io to give you full flexibility.

Video Live Streaming Platform Android A simple live streaming mobile app with cool functionalities and time extension, and live chat. With a payment s

Dec 16, 2022

source code of the live coding demo for "Building resilient and scalable API backends with Apache Pulsar and Spring Reactive" talk held at ApacheCon@Home 2021

reactive-iot-backend The is the source code of the live coding demo for "Building resilient and scalable API backends with Apache Pulsar and Spring Re

Jan 13, 2022

30 Days Coding Challenge with Arsh Goyal.

#ReviseWithArsh #6Companies30Days #ArshGoyal #ReviseWithArsh #6Companies30Days Challenge! Offical Doc:- Explore the docs » Offical Video:- Explore the

Jan 3, 2023

Jarm is a small Tech Minecraft Mod I'm coding

jarm Jarm is a small Tech Minecraft Mod I'm coding. This is currently WIP and may get discontinued. Also, I'm not a professional coder. #Installation

May 8, 2022

This repository contains solutions to all the Bit Manipulations problems and coding challenges

This repository contains solutions to all the Bit Manipulations problems and coding challenges. I have also written a course on how to solve problems using bit manipulation. You can visit it here: https://www.educative.io/courses/bit-manipulation (Grokking Bit Manipulation For Coding Interviews)

Nov 15, 2022
Owner
Shubham Thakur
Software Engineer 👨‍💻 | Full Stack Web Developer | Enthusiastic About Learning New Things, Building Stuff & Solving Problems 🛠️
Shubham Thakur
Curated Collection of all Low level design Questions and implementation asked in major Tech companies , Get yourself prepared for the LLD round and ace the interview.

Low level Design / Machine Coding Question Collections What is Machine Coding Round ? Machine Coding Round has become very popular interview round in

Kumaran gowthaman 619 Dec 31, 2022
FreeLogJ - Start a conversation in your company about paying open source maintainers

Start a conversation in your company about paying open source maintainers! In the meantime enjoy this super-simple logging framework^W class.

Chris Newland 11 Jan 24, 2022
A secured RESTful service for company payrolls.

Account Service A RESTful service for a company to upload employee payrolls. Scope Project was created as part of a learning track of an online academ

Alexios Giazitzis 1 Feb 14, 2022
📊It includes all the work done during the Java-React Bootcamp.

?? Java + React Bootcamp ?? Part 1 - Java Part 2 - React ?? Lecture Class: Youtube ?? Instructor: Engin Demirog ?? Course Materials: Kodlama.io Bootca

İlknur Sucaklı 20 Jun 21, 2022
DSMovie is a full stack web and mobile application built during Spring React Week, an event organized by DevSuperior

projeto-DSMovie Sobre o projeto DSMovie é uma aplicação full stack web e mobile construída durante a Semana Spring React, evento organizado pela DevSu

Matheus Maia Alvarez 7 Apr 18, 2022
Application developed during the DDD training with 6 students.

Easyorder Application developed during the DDD training with 6 students. MongoDB To start MongoDB, use docker: docker run -p 27017:27017 --name mongo

RUARO Thibault 1 Jan 21, 2022
Android application made during an introduction class to mobile application development.

Reflex Revolution Android application made during an introduction class to mobile application development. Contributors Hailey Savoie Carter Moore Fre

Frederic Verret 3 Aug 27, 2022
The respository of a student group called 'Bombenstimmung' at the University of Wuppertal during the SWT-Praktikum 2021/22

Bomberfrau The respository of a student group called 'Bombenstimmung' at the University of Wuppertal during the SWT-Praktikum 2021/22 Installation: Vo

BEJOSCHR 7 Jan 10, 2022
This repository contains all the code developed during lessions of Foundations of Informatics T2.

If you're using the content of this Repostory, please consider to Watch or Star it in order to help tracking how many people are drawing on it. Founda

null 7 Nov 24, 2022
A Maven extension for validating and collecting checksums of all artifacts during execution.

Maven checksum extension This extension allows for the creation and the enforcement of checksums for any artifact that is resolved by Maven. Without s

Rafael Winterhalter 12 Aug 6, 2022