Looking for FIT2099 Object oriented design and implementation - S1 2026 test answers and solutions? Browse our comprehensive collection of verified answers for FIT2099 Object oriented design and implementation - S1 2026 at learning.monash.edu.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
The lecture slides on Dependency Injection list types or patterns for injecting dependencies into a client class. Which of the following is not one of the standard types of dependency injection explicitly listed in the course materials?
A programmer writes a physics engine calculating the trajectory of a projectile. Throughout the physics class, the literal decimal 9.81 appears in over a dozen different mathematical formulas. According to the course guidelines, what is the primary architectural flaw with this code, and what is the optimal solution?
A developer creates a Bird superclass with a fly() method. They then create an Ostrich subclass that extends Bird. Because ostriches cannot fly, the developer overrides the fly() method in the Ostrich class to immediately throw an UnsupportedOperationException. Which SOLID principle does this specific design directly violate?
A retail application calculates shipping costs using a ShippingCalculator class. Inside this class, the developer uses a massive series of if-else statements checking if (package instanceof StandardBox) else if (package instanceof FragileCrate) to apply different mathematical formulas. Next month, the company plans to introduce a new RefrigeratedContainer package type. How should the developer refactor this code to satisfy the Open/Closed Principle?
The lecture materials state that one of the primary reasons to use interfaces is to achieve "loose coupling" within a software architecture. If an OrderProcessor class and a PaymentGateway class are loosely coupled via an interface, what is the practical, everyday benefit of this design?
A junior developer is programming a combat system for an RPG. They decide to manage player status effects using standard String variables, writing code like player.inflictStatus("Burned"); and checking it later with if (status.equals("burned")). According to the "Pre-class activities: enumeration" reading, what is the primary architectural danger of this approach, and how does a Java enum resolve it?
List<String> words = new ArrayList<>();Rather than explicitly declaring it as the concrete class, for example:
ArrayList<String> words = new ArrayList<>();public static final int MAX_STUDENTS = 200;
What does the keywords static and final imply here?