We’re rewarding the question askers & reputations are being recalculated! Read more.
5

One problem I see with the approach to calculate the totalPayment on the fly that way, is if the Driver.baseRate or Vehicle.hourRate would be changed at a later point of time, the formerly calculated value couldn't be reproduced. I'd prefer to keep track of the totalPayment in a different table, or store it as a manifested attribute in the Booking table. ...


5

If the types that will be stored in your container are known and few in number, you can actually have both type safety and no duplication. You start by writing a generic container, using void* to point at storage and callback functions to do stuff like comparisons. And then you write type-specific wrappers around your generic container and you use those ...


4

Self-balancing trees are required to maintain their structure so that the keys are always sorted (that is, so an inorder traversal of the tree results in all the elements in order). If your rotations are producing a tree that is no longer in order, then your rotations are incorrect. Keys can move "vertically" (children can become parents, and vice-versa), ...


2

I think the viability of different approaches depends heavily on the underlying database being used. This approach suggested to move an item in the ordering: POST /url/of/the/list/reorder-item?from=783;to=1357 That can be subject to race conditions unless you have SERIALIZABLE transactionality. The default level of READ_COMMITTED in most DBs will not ...


1

An abstract class shall not depend on its concrete specialization. This is against the idea of abstraction and totally against the Open/Closed principle. There are two main approaches for solving your design issue: Abstract the rules, for example into an abstract NodeValidator class. In the tree-building process you could then rely on your abstract nodes ...


1

Just to reply to the title of your question: P. 147 of UML 2.5 states: 9.9.17 Property [Class] ... isDerived : Boolean [1..1] = false Specifies whether the Property is derived, i.e., whether its value or values can be computed from other information. You would write a {isDerived} after the property name.


Only top voted, non community-wiki answers of a minimum length are eligible