Company: Euler Motors_1aug
Difficulty: medium
Software Development and Backend Assessment Choose the best answer for each question. 1. Why is it often recommended to declare member variables (fields) as private? To prevent inheritance To reduce memory usage To adhere to encapsulation and control access through methods To make variables accessible to any class in the package 2. What is the primary intent behind method overriding in class-based OOP? Replace a superclass method entirely Specialize or extend inherited behavior while preserving its interface Duplicate a method so both operate independently Change return type to support multiple constructors 3. What problem does the Singleton design pattern solve? Ensure one instance and provide a global access point Hide internal state Create related object families Decouple sender and receiver 4. In a microservices architecture, how do services typically communicate? Shared in-memory cache Lightweight API calls or messaging queues Directly accessing each other's databases Calling