LLD - Design — Elevator SystemWhich class should contain the attribute that stores the floor number in an elevator system?ARequestBBuildingCElevatorDFloorCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify which class represents floorsThe Floor class logically represents each floor and should store its number.Step 2: Eliminate other classesRequest stores user requests, Elevator moves, Building is a container but doesn't store floor numbers directly.Final Answer:Floor -> Option DQuick Check:Floor class stores floor number [OK]Quick Trick: Floor class holds floor number, not Elevator or Request [OK]Common Mistakes:MISTAKESAssigning floor number to ElevatorConfusing Request with FloorAssuming Building stores floor numbers directly
Master "Design — Elevator System" in LLD9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More LLD Quizzes Behavioral Design Patterns — Part 1 - Iterator pattern - Quiz 10hard Behavioral Design Patterns — Part 1 - Chain of Responsibility pattern - Quiz 12easy Behavioral Design Patterns — Part 2 - Null Object pattern - Quiz 6medium Design — Elevator System - Scheduling algorithm (SCAN, LOOK) - Quiz 7medium Design — Library Management System - Why library management tests CRUD design - Quiz 4medium Design — Parking Lot System - Concurrency considerations - Quiz 4medium Design — Parking Lot System - Requirements analysis - Quiz 14medium Design — Parking Lot System - Concurrency considerations - Quiz 1easy Design — Tic-Tac-Toe Game - Board, Player, Game classes - Quiz 8hard Design — Tic-Tac-Toe Game - Extensibility (NxN board, multiple players) - Quiz 14medium