CTEC2402: Sofware Development Project

Adding Relationships

The Model classes are related, for example a Customer will take out a Contract. To model these relationships virtual properties need to be added. The Contract is central to most classes, and you will need to get to the Customer, the phone and the Tariff for a particular contract. The example below shows typical virtual properties added to the Contract class and used to establish those relationships

Relationships

You will almost certainly wish to display all the phone calls made on a particular contract for a given time period. To make this easier, the virtual property Messages has been added. You may also need Downloads and Payments to complete all the transactions on a particular contract.