Represent the design of a program by using natural language or creating diagrams that indicate the classes in the program and the data and procedural abstractions found in each class by including all attributes and behaviors.
A programmer needs to refactor a complex inventory management system where multiple classes directly access and modify each other’s data fields. Which refactoring approach best applies abstraction principles to improve the design?
Combine all classes into a single large class to eliminate inter-class dependencies and simplify data access
Convert all instance variables to static variables and make all methods static to eliminate object creation overhead
Make all methods private and create a single public method in each class that handles all possible operations
Make all data fields private and create public accessor and mutator methods that encapsulate business rules and validation logic, then decompose complex operations into smaller, focused methods within each class
APFIVE