You are on page 1of 4

Page 1 of 4

BACS2063 Data Structures and Algorithms

Team Assignment
Deadline: Monday, 30 November 2015 (Week 10) at 9.00am
Introduction
Abstract data types (ADTs) are very important as they serve as programming tools that enable
component reuse and encapsulation. This assignment requires students to specify ADTs,
implement the ADTs and then apply the use of the ADTs in an application.

Learning Outcomes
The learning outcomes being assessed in this assignment are listed below:
1. Analyze the various implementations of data structures and algorithms in terms of their
efficiency (C4, CTPS, A2).
2. Solve programming problems by selecting and applying the use of suitable data structures
and algorithms (C4, P3, A2, CTPS).
3. Create abstract data types (ADTs) to represent new ways of organizing data (C5, P3).

Team Organization
For this assignment, work in a team of 3 students from the same tutorial group. If the number
of students in the tutorial group is not a multiple of 3, then there should be not more than 2
assignment teams with only 2 members.
Even though this is a team assignment, individuals may get different marks depending on
their contribution.

Academic Integrity
You may only work with the students in your team to produce your answer. You may not
show or give any part of your assignment and/or code (in any form whatsoever) to anyone
else except your team members and tutor for this course.
IMPORTANT: Students found to be dishonest are liable to disciplinary action.

Problem Statement
Your team is required to develop a single-player educational race game for students to
improve their knowledge and skills in data structures and algorithms. The objective of this
game is to move from the starting point to the finishing point in the shortest time. Details of
the game are listed below:

There are a number of stations between the starting and finishing points.

At each station, the player must complete a mission.

At minimum, the mission is a quiz that requires the player to answer a set of questions
with no time limit imposed. The set of questions must be randomized.

At the starting point and also upon successful completion of each mission, the player will
roll dice to determine the number of steps and direction to take to the next station he
will visit. The dice roll will generate a random number with one of the following values:
-2, -1, 1, 2, or 3 (a negative number denotes that the player will move backwards to earlier
stations).

Page 2 of 4

There are 3 parts in this assignment. All group members must be actively involved in a
constructive way in all 3 parts of the assignment.
1. Part 1 Abstract Data Type
Specify the abstract data types (ADT) for the race path and the top 10 player list.
2. Part 2 Implementation of the ADT
Implement the ADTs from Part 1. For the race path ADT, you are required to use a
doubly linked list implementation while for the top 10 player list, you are required to use a
linked implementation. There should also be appropriate use of Java constructs such as
interfaces, classes and generic types. For these two ADTs, you are NOT allowed to adapt
any Java API classes.
3. Part 3 Application that uses the ADT
Write the game application which must provide the following functionalities:
(a) Maintain a race path (e.g., create a new race path, change the station sequence in the
race path, remove a station, add a new station, etc).
(b) Maintain station information and mission information. All missions must be related
to knowledge and/or skills on data structures and algorithms.
(c) Play a game.
(d) Keep track of the top 10 players ranking (fastest to slowest times).
(e) Save all information about the game (e.g., race path, mission, top 10 players, etc.).
Notes:
The user interface for this game may be console-based, GUI-based or web-based. No
marks will be given for the type of user interface. Refer to Appendix A for a sample
console-based dialog of the game.
For the race path and top 10 player list, you are required to use the relevant ADTs that
you specified in Part 1 and implemented in Part 2.

What You Should Submit


Late submissions will be capped to 50% of the total marks unless a concrete reason is
provided. The tutor may arrange for a demo in Week 10 or 11 to validate the students work.
1. A hardcopy report which includes the following items:
(a) Cover page (use the template provided).
(b) Declaration page.
(c) Contents page.
(d) Part 1: ADT Specifications
(e) Part 2: ADT Implementations
(i) Source code listings with separate sections for the interfaces and implementation
classes.
Include descriptions of your ADTs implementations within the source code
where necessary, i.e. describe the data fields and how the various operations
are implemented.
(ii) Analysis of the efficiency of various operations in your collection classes.

Page 3 of 4

(f) Part 3: Application Program


(i) Descriptions of the various types of missions as well as any additional creativity
or levels of difficulties included in your game.
(ii) Descriptions of the functionalities provided by your application program with
sample screenshots.
(iii) Source code listings with separate sections for the entity classes and client
application program classes.
Your hardcopy assignment submission should adhere to the following:
Paper size

A4 (Use only one side of the paper)

Line spacing

1 line

Font size

Source code : 8pt or 9pt (print with line numbers using the IDE)
Written description : 11pt

Programming
style

Follow the standard Java naming convention


Proper indentation and spacing. Indent each statement 2 spaces more than
the structure within which it is nested.
Include appropriate comments in your program

2. Softcopy of code in the form of a DVD/CD-ROM to be attached with your report.


Include your NetBeans project and any text files/binary files/database.
Instructions on how to run your project.

Marks
This assignment contributes 40% to the coursework component. The assessment criteria are
provided below (refer to the assignment feedback form for details):
Part
Part 1: ADT Specifications
Part 2: ADT
Implementations
Part 3: Application
Program
Total

Description
Completeness and clarity
Design and efficiency
Note: The implementation must comply with the ADT
specification.
Level of complexity, completeness, creativity and
appropriate use of ADTs - to be verified in demo during
practical class.

Marks
10
10

20

40

Page 4 of 4

Appendix A Sample Dialog for the Educational Race Game


...
Race Path:
Starting Point
Station A
Station B
Station C
Station D
Station E
Station F
Finishing Point
Roll dice result: 3 >> Proceed to Station C.
Current location in Race Path:
Starting Point
Station A
Station B
Station C ***You are here ***
Station D
Station E
Station F
Finishing Point
Station C Mission: Answer the following MCQ Questions
// Some MCQ Questions
// Assuming the player answered all correctly
Roll dice result: -1 >> Go back to Station B.
Current location in Race Path:
Starting Point
Station A
Station B ***You are here ***
Station C
Station D
Station E
Station F
Finishing Point
Station B Mission: Answer the following TRUE/FALSE Questions
// Some TRUE/FALSE Questions
// Assuming the player answered all correctly
Roll dice result: 2 >> Proceed to Station D.
Current location in Race Path:
Starting Point
Station A
Station B
Station C
Station D ***You are here ***
Station E
Station F
Finishing Point
Station D Mission: Answer the following TRUE/FALSE Questions within 30 seconds
// Some TRUE/FALSE Questions
// Assuming the player answered all correctly
Roll dice result: 3 >> Proceed to the Finishing Point.
CONGRATULATIONS Player XYZ! You have completed the DSA Race Game in 5 minutes 20 seconds.
You have also made it to the Top 10 fastest time.
Current Ranking of Players:
1. Player MMM: 2 minutes 10 seconds
2. Player XYZ : 5 minutes 20 seconds
3. Player GGG : 10 minutes 46 seconds
...