Labexer1 Ccs0015l Module1 Week1
Labexer1 Ccs0015l Module1 Week1
EXERCISE
1
INTRODUCTION TO DATA STRUCTURES
Student Name:
Section:
Professor:
In C++ language Different types of data structures are; Array, Stack, Queue, Linked List, Tree.
Array: is collection of similar data type, you can insert and deleted element form array without follow
any order.
Stack: works based on Last-In-First-Out (LIFO). Last entered element removed first.
Queue: works based on First-In-First-Out (FIFO). First entered element removed first.
Linked List: is a collection of nodes. Here you can insert and delete data in any order.
Tree: Stores data in a non-linear form with one root node and sub nodes.
Requirements:
Define a class called SHELF. Follow the provided CLASS DEFINITION.
Create and code OPERATIONS listed above for the data structure SHELF.
Use authentic book titles to store in your SHELF.
Snip and paste your source codes here. Snip it directly from the IDE so that colors of the codes are
preserved for readability. Include additional pages if necessary.
Briefly answer the questions below. Avoid erasures. Do not forget to include the sources for all NON-
ORIGINAL IDEAS.
2. What are the factors that you will consider in choosing a data structure to use?
3. Provide your own user-defined data structure. Give a name, its purpose and at least 3 operations
that it can do.