Assignment 1


This is an individual assignment that requires you to design, develop and test a small procedural Java


Timelines and Expectations

Percentage Value of Task: 20%

Due: Refer to course description

Minimum time expectation: 10 hours

Learning Outcomes Assessed

The following course learning outcomes are assessed by completing this assessment:

• Identify and use the correct syntax of a common programming language

• Recall and use typical programming constructs to design and implement simple software


• Reproduce and adapt commonly used basic algorithms

• Utilise pseudocode and/or algorithms as a major program design technique

• Write and implement a solution algorithm using basic programming constructs

• Demonstrate debugging and testing skills whilst writing code

• Develop self-reliance and judgement in adapting algorithms to diverse contexts

• Design and write program solutions to identified problems using accepted design constructs

Your task is to design, develop and test a small application for Santa. Christmas is only weeks away

and Santa has decided to open his own Christmas Parcel Delivery System. His first task is to develop

a Christmas Parcel Delivery Calculator. The Calculator will allow his elves to setup a travel surcharge,

enter parcels and display the end delivery costs.

Stage 1: Design

This stage requires you to prepare documentation that describes the function of the program and how

it is to be tested. There is no coding or code testing involved in this stage. A document template has

been provided for your use.


1) Read through Stage 2: Program Development  to obtain details of the requirements of this


2) Write an algorithm that describes how the program will operate.

a. All program requirements – base, standard and advanced – must be included, even if you

do not end up including all these requirements in your program code.

b. The algorithm must be structured logically so that the program would function correctly.

3) Prepare and document test cases that can be used to check that the program works correctly,

once it has been coded. You do NOT need to run the test cases in this stage; this will occur in

Stage 3: Testing .

a. All program requirements – base, standard and advanced, must be included, even if you

do not end up including all these requirements in your program code.

b. Make sure the test cases include checking of data entered by the user to make sure that

only valid data is accepted. If the user enters invalid data, the user should be informed of

this and given another chance to enter the data. NB: As we have not covered exception

handling, you may assume that the user will always enter an integer.

c. Test cases should be documented using a template like the one below. You may include

extra information if you wish. At this stage, the Actual Result column will be left blank.

Stage 2: Program Development

Using the Design Documentation to assist you, develop a Java program that allows a user to set up

transport (travel) costs, enter a parcels details and then calculates the total cost of sending the parcel.

These requirements have been broken into three groups:

• Base Functionality includes the minimal level of requirements to achieve the essential

components of this assignment. This group of requirements focuses on getting the code to

work and on using the programming constructs we cover in class. You can expect to use

constants, variables, loops, conditional statements and arithmetic operators for these

requirements and you should look for opportunities to use these wherever you can. You will not

receive full marks for implementing a requirement (even if it works) if you have not used the

appropriate programming construct to do so.

At this level, you can decide if it is easier for you to code everything within a single method, or

to modularize it straight away.

• Standard Functionality ensures the code is modularized, and that method calls are used to

ensure the program flows correctly. It allows data to pass from one method to another as


• Advanced Functionality provides a challenge task, and is best left until all the other requirements

have been addressed. It requires looking at a Java API to find out how to use a class we have

not covered in the course, and using this to calculate the delivery date.

You are expected to follow coding conventions, such as proper layout of code, use naming

conventions and write meaningful comments throughout your program.

Base Functionality:

1) Display a welcome message when the program starts

Related posts: