SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


OOSC Tutorial

DeutschTel Inc. sells phone cards for making cheap long distance calls around the world. In this assignment, you will write a (much simplified) Java program to manage their business.

DeutschTel Inc. sells 3 types of phone cards: NATel5 cards, which cost €5 and are good only for calls in Canada and the USA, GlobalTel5 cards, which cost €5 and are good for overseas calls, and GlobalTel15 cards, which cost €15 and are also good for overseas calls.

The per minute rates for each type of card and call zone are as follows:

NATel5 GlobalTel5 GlobalTel15
Africa N/A €0.50 €0.35
Asia N/A €0.50 €0.35
Australia N/A €0.40 €0.25
Canada €0.05 €0.10 €0.08
Europe N/A €0.30 €0.20
Latin America N/A €0.40 €0.25
USA €0.08 €0.15 €0.10

The initial balance on the cards and the weekly maintenance fee are indicated below:

NATel5 GlobalTel5 GlobalTel15
Initial value €5.00 €5.00 €15.00
Weekly fee €0.25 €0.35 €0.50

In order to help the DeutschTel Inc. to manage its work, we have implemented a hierarchy of classes to represent the different types of cards. However the implementation still missing some details, your main task during this tutorial is to fill in the gaps in our provided implementation.

Task 0: Check out our implemention from the SVN repository

https://svn.iai.uni-bonn.de/repos/IAI_Software/se/oosc2008ss/team#

Make sure to replace # with your team number!

Username and password for your SVN team folder was sent to the email address you registered with at the beginning of the course. (Username = oosc.<familyname>)

Task 1: Complete the implementation

  • Go through the classes in the given order, you can find 18 small tasks that you have to accomplish:
    • PhoneCard.java
    • NATel5Card.java
    • GlobalTel5Card.java
    • GlobalTel15Card.java
    • TestApplication.java

Task 2 (optional):

  • Convert the CallZone class into an enumeration. Modify other classes' code accordingly.
  • Hints:
    • Convert the zone type from integer to a CallZone object.
    • Add a function in the CallZone enumeration type to convert from a string to an enumeration object.
teaching/lectures/oosc/2008/exercises/warmup/tutorial.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2021