CSE 1030 E Labtest 2 March 19, 2014

For reference:

This test consists of a short programming question and some short answer written questions. I recommend budgeting 50 minutes for the programming question and 30 minutes for the written questions.

Part 1 Programming Question

In this question, you will work on a set of classes that represent phone cards for making cheap long distance calls. There are many kinds of phone cards, so we define the abstract class PhoneCard that collects common features among them. One specific kind of card is represented by the class SmartANZAsia10Card, a subclass of PhoneCard. It only allows calls to Australia and New Zealand and to Asia. These classes use another class CallZone that represents the different zones to which calls can be made.

Your task is to implement the SmartANZAsia10Card class. Here are some resources for you to use:

  1. API for all classes
  2. jar file containing PhoneCard and CallZone
  3. starter code; we have given you the implementation for one constructor and two methods
  4. JUnit tester

Do not create a package for your class; it can go into the default package.

It is expected that your program compiles, meets the specifications given in the API, and follows the style guidelines for CSE1030. Javadoc comments are not required.

When you are finished, submit your code for the implemented SmartANZAsia10Card class as follows:

submit -l 1030 labtest2E SmartANZAsia10Card.java

You may submit your code more than once; the last version submitted is the one that will be graded.

Part 2 Non-Programming Questions

Your non-programming questions are here.

Type your answers to the non-programming questions into a file answers.txt. Make sure that you number your answers to match the questions.

When you are finished, submit your answers as follows:

submit -l 1030 labtest2E answers.txt