next up previous contents
Next: Question 4 (35 points) Up: Questions Previous: Question 2 (20 points)   Contents

Question 3 (25 points)

Write a simulation for a phone company. The company serves two types of clients depending whether they use a mobile phone or not. When you want to make a call you ask the phone company for a connection. In return you receive a unique callID. This will be used to maintain the connection. The person called will obtain the same callID. In order to do so the phone company will contain a collection of connections and a collection of phones. Whenever a connection is requested an object of type Connection is created containing the caller and the callee. The communication between the two parties is established by passing messages to the phone company who will pass it on the corresponding Connection for handling. Charges for the call are based on the type of phones used and the number of messages sent to a Connection. A connection can be closed by either party after which the caller is informed of the cost of the call. Make sure that you provide means to track the connections and phone calls. Provide a program that demonstrates the full capabilities of your system.

One of the main aims and marking criteria of this question is the design of your system. We will take into account the usage of abstract classes, inheritance and polymorphism. A good and robust demonstration of your program is also one of the marking criteria.

NOTE: Some of this question description is left intentionally vague to stimulate your own creativity.

HINT: Have a closer look at the LAN-simulation we have done during the lab-sessions.

DESIGN: The design of your program can be commented on by the tutors. However, this will cost you 5 marks for this question. This should not stop you from asking general design questions. Tutors will, before answering a 5 point question, inform you about this. The choice will then be yours.


next up previous contents
Next: Question 4 (35 points) Up: Questions Previous: Question 2 (20 points)   Contents
Marina De Vos 2004-10-28