A Real Estate Inc. problem has two classes. It includes ?House Seller? and ?House Buyer?. Here the
Question:
A Real Estate Inc. problem has two classes. It includes ?House Seller? and ?House Buyer?. Here the class House Seller is taken to be processed further.
Invariant in CRC card
Invariant is a type of constraint captured in object oriented language. Invariants are the contracts that must be true for each instance of the class. For example: the range of values for an attributed.
Invariants are generally attached with the class and specified in CRC cards and class diagrams as well through adding a set of the assertions within them. The below card shows the attributes with invariants.
For the real estate Inc:
A. Choose one of the classes and create a set of invariants for attributes and relationships and add them to the CRC card for the class.
B. Choose one of the methods in the class that you chose and create a contract and a method specification for it.
Use OCL to specify any pre- or post condition and use both structured English and an activity diagram to specify the algorithm.