CS FundamentalsModerateProduct-company MCQ pattern
Match each pattern with its intent. P. Builder Q. Facade R. Proxy S. Strategy 1. Give a simple single entry point to a complex subsystem 2. Construct a complex object step by step, separating construction from representation 3. Swap interchangeable algorithms at run time behind one interface 4. Stand in for another object to control access, add lazy loading or caching
- A. P-2, Q-4, R-1, S-3
- B. P-2, Q-1, R-4, S-3
- C. P-3, Q-1, R-4, S-2
- D. P-1, Q-2, R-4, S-3
Correct answer: B. P-2, Q-1, R-4, S-3
Builder = step-by-step construction (2); Facade = simplified front to a subsystem (1); Proxy = surrogate controlling access (4); Strategy = interchangeable algorithms (3). Facade and Proxy are the pair most often swapped.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- Assertion (A): A lazily initialised Singleton that checks if (instance == null) before creating the object can end up with two instances…
- How many of the following HTTP methods are idempotent by the HTTP specification: GET, PUT, DELETE, POST?
- Assertion (A): In a RESTful API, every request from the client must carry all the information needed to process it, such as an auth token…
- Match each HTTP status code with its meaning. P. 204 Q. 304 R. 409 S. 429 1. Too many requests (rate limit hit) 2. Request conflicts with…
- How many of the following are managed by the cloud provider (not the customer) in a PaaS offering such as a managed app platform? 1. The…
- How many of the following statements about serverless computing (FaaS, such as AWS Lambda) are correct? 1. Functions are typically billed…