Object Oriented Programming using C#

(backadmin) #1

Object Oriented Programming using C#
Case Study


To do this the system must perform the following actions :-
• create a new Client object
• pass it (along with the unique ID to associate with it) to the ClientBook object
• add the client to the client book.


By looking at the CRC cards we can see that :-
• the constructor for Client will be able to create a new client object
• The ClientBook has the capability to add a client and
• the ClientBook can hold the IDs associated with each client.


It would therefore appear that this part of the system will work at least in this respect – of course we need to create CRC
cards to describe every class and to test the system with a range of scenarios.


Below are three CRC cards to describe the Message and MessageSet classes and the DisplayBoardControl interface.


What we want to ‘test’ here is that messages can be created, added to the MessageSet and displayed on the display.


A point of requirements definition occurs here. There are two possibilities regarding the interface to the display board:-


a) we load one message at a time, display it, then load the next message, and so on.
b) we load a collection of messages in one go, then tell the board to display them in sequence which it does
autonomously

The correct choice depends on finding out how the real display board actually works.

Free download pdf