I am now doing a UML test section, I understand what does performance and maintainability mean in general, but I don't understand how to rate them with UML class diagram. The test question is:
Consider the model depicted with the UML class diagram in the following figure.
Now consider a change of the model in terms of adding a subtotal attribute (with the value article.getPrice()*quantity) and a get method for it to the OrderLine class, and using it within getTotal(). What effect would this change have on the non-functional properties of the system?
A) worse performance of Order.getTotal(), better maintainability of the system
B) better performance of Order.getTotal(), worse maintainability of the system
C) no effect
D) worse performance of Order.getTotal(), worse maintainability of the system
E) better performance of Order.getTotal(), better maintainability of the system
The right answer here is A, so please explain how to come to this answer.
Thank you.