Question
Which design pattern is most suitable for controlling
access to a resource by limiting the number of clients that can use it concurrently?Solution
The Proxy Pattern is a structural design pattern used to control access to resources by acting as an intermediary or placeholder. It can implement restrictions like access control, caching, or logging. In the context of concurrency, the proxy ensures that only a limited number of clients access a resource at a time. For example, a proxy server can manage a pool of database connections, granting access to clients based on availability. This pattern reduces resource contention and improves system scalability and security. By isolating the resource, the Proxy Pattern adds flexibility and control over its usage. Why Other Options Are Incorrect :
- Singleton Pattern : Ensures a single instance of a class but does not control concurrent access.
- Factory Pattern : Focuses on object creation, unrelated to access control.
- Decorator Pattern : Enhances object functionality dynamically but does not manage access.
- Flyweight Pattern : Shares objects to save memory, not for controlling resource access.
The radius of a circle is 7 cm. (Take π = 22/7.) What is the area of the circle?

If the area of a rhombus is 14504 m² and the ratio of the diagonals is 37:49 then find the length of the shorter diagonal.
The diameter of the base of a cylindrical drum is 28 cm and its height is 15 cm. The drum is full of water and the water from the drum is transferred to...
The radius of a sphere is 18cm. The surface of the sphere is what percent of its volume.
Area of a rectangle is equal to the total surface area of a hemisphere having volume 13718 cm³ . Find the perimeter of the rectangle if its length is 1...
The ratio of length to breadth of a rectangle is 5:4, respectively. Perimeter of rectangle is 270 cm. If each side of a square is 25% more than the brea...
The area of four walls of a room is 192 cm2. If the length and breadth of the room were equal and the height of the room is 6 cm, then what i...
A rectangular park measures 60 m by 45 m. A uniform walkway is constructed around the outside of the park. If the area of the walkway is 904 m², what i...
After increase in sugar prices by 20%, a person is able to buy 2 kg less sugar for Rs. 540. Find the original and increased price of sugar per kg.
...