Computer scienceFundamentalsEssentialsSoftware constructionDesign patternsStructural design patterns

Facade pattern

Facade in pseudocode

Report a typo

Here's a simple chunk of pseudocode. Which class represents a facade?

class Circle is
  method draw() is
    print "Circle"

class Square is
  method draw() is
    print "Square"


class ShapeMaker is
  Circle circle = new Circle()
  Square square = new Square()

  method circle() is
    circle.draw()
  
  method square() is
    square.draw()
    

class Client is
  method main() is
    ShapeMaker shapes = new ShapeMaker()
    
    shapes.circle()
    shapes.square()
Select one option from the list
___

Create a free account to access the full topic