Learning Center
Plans & pricing Sign in
Sign Out

Department of Computer Science_


									                          Department of Computer Science,
                             Data Structures (CSC212),
                                1st Semester 2010-11
                                      Project 1

Due Date: Phase I of Part 1 & 2 – Week starting 6/11/2010 Phase II of Part 1 & 2 –
Week starting 27/11/2010

                                        Part 1

Student Record System (SRS) that manipulates students data is required. Student is
represented as <Student ID, Student Name, {list of scores}>. There can be up to 15
scores for each student.
SRS represents student data as two parts, which are: (1) student basic data (Student ID,
Student Name) and (2) student scores. You are asked to write a program that represents
SRS. Your program is supposed to handle the following operations:
     (i) Adding a new student (Only basic data).
     (ii) Adding a new student score.
     (iii) Display student data (Basic data and scores).
     (iv) Display student data for the student that has maximum scores..

Phase I
Describe the data structures (ADTs) you will use in this program as follows:
   (a) Give the graphical representation of the ADTs showing the data structures in your
       program. Label the diagram clearly.
   (b) Give a specification of the operations needed for the structure described in (a).
       Note that if you use a standard ADT (e.g. a Linked List), you DO NOT need to
       give the operations of that ADT. You just need to describe the operations of your
       global structure.

Phase II
Implement your program assuming that the SRS operator enters the events through a
menu in your program. The menu may look like this:
   1. Adding a new student.
   2. Adding a new student score.
   3. Display a student data.
   4. Display a student data for student that has maximum scores.

   Enter your choice:

                                        Part 2

In this part of the project you are required to propose a suitable ADT for an arithmetic
expression calculator and implement it as a Java class. This calculator should take
expressions such as 3 * (4 + 5), as input and evaluate them and display the answer. This
will require an interaction loop in which a user is asked to type in an expression and an
answer is returned. The user should type in the expression in infix notation. There are
five operators that can be used in the expressions: + (addition), - (subtraction), *
(multiplication), / (division) and ^ (exponentiation). The operators have the usual
precedence and operators of the same precedence are evaluated from left to right. The
operands can be floating point numbers.

Phase I
   (a) Describe the operations of the ADT Experssion by giving the specification of the
   (b) How will you represent the expressions in your program after they have been read

Phase II
Implement the ADT Expression as a Java class.

To top