Form your own groups of size three. If you can't form a group of this size, contact a demonstrator and you will be assigned a group.
The lab has three questions, each with three parts. A question describes an Abstract Data Type (ADT) in English.
Each person in the group should do just one part from one question. It is the responsibility of the person writing the implementation to hand up the completed assignment. It should be clearly documented who did what on each question.
For ease of coding, the ADT's can be constructed as collections of integer values. This allows you to hard code the types in the system. Your solution should scale to generic types (e.g. ADT of int, ADT of String, ADT of Object)
A Bounded Stack is an ADT that stores a collection of elements according to the last-in-first-out principle (i.e. only the last inserted element can be accessed or removed) that has an upper limit on the number of elements that can be inserted. Operations on the stack include:
A Set is an ADT that stores a collection of elements (possibly infinite) without repetition of elements. Order in a set is irrelevant. Operations on the set include:
A Sorted list is an ADT that keeps an order sorted list of items.
| Home |