0
0
LLDsystem_design~10 mins

Facade pattern in LLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the Facade class constructor.

LLD
class Facade {
    constructor() {
        this.subsystem = new [1]();
    }
}
Drag options to blanks, or click blank then click option'
AFacade
BSubsystem
CClient
DController
Attempts:
3 left
💡 Hint
Common Mistakes
Using the Facade class itself instead of the Subsystem.
Using unrelated class names like Client or Controller.
2fill in blank
medium

Complete the code to implement a Facade method that calls a subsystem method.

LLD
class Facade {
    operation() {
        return this.subsystem.[1]();
    }
}
Drag options to blanks, or click blank then click option'
Aexecute
Bstart
Cprocess
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using method names not defined in the subsystem.
Using generic names that do not exist in the subsystem.
3fill in blank
hard

Fix the error in the Facade method to correctly call two subsystem methods.

LLD
class Facade {
    complexOperation() {
        this.subsystem.[1]();
        this.subsystem.[1]();
    }
}
Drag options to blanks, or click blank then click option'
Ainitialize
Bstart
Cexecute
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using different method names for the two calls.
Using method names that do not exist in the subsystem.
4fill in blank
hard

Fill both blanks to complete the Facade method that coordinates subsystem methods.

LLD
class Facade {
    coordinate() {
        this.subsystem.[1]();
        this.subsystem.[2]();
    }
}
Drag options to blanks, or click blank then click option'
Ainitialize
Bstart
Cexecute
Dshutdown
Attempts:
3 left
💡 Hint
Common Mistakes
Reversing the order of initialization and start.
Using shutdown instead of start.
5fill in blank
hard

Fill all three blanks to implement a Facade method that manages subsystem lifecycle.

LLD
class Facade {
    lifecycle() {
        this.subsystem.[1]();
        this.subsystem.[2]();
        this.subsystem.[3]();
    }
}
Drag options to blanks, or click blank then click option'
Ainitialize
Bstart
Cshutdown
Dexecute
Attempts:
3 left
💡 Hint
Common Mistakes
Incorrect order of method calls.
Using initialize instead of execute.