CSC2232 SYLLABUS

SPR O2

TEXT: C++ Data Structures/ Dale & Teague
SOFTWARE: Visual C++ 6.0; Windows NT
GRADES: Based on quizzes,mid-term, labs & a final exam or project.

     WEEK 1 (week beginning )

     LECTURE:  dynamic arrays; pointers; linked lists; templates.
     READING ASSIGNMENT: Ch 3, pp 103-153
     HIGHLIGHTS: List ADT (usorted & sorted).
     LAB:  LAB #1
 

WEEK 2 (week beginning )

     LECTURE: Review Classes & pointers
     READING ASSIGNMENT:
     HIGHLIGHTS:
     LAB  LAB 2:;
 

WEEK 3 (week beginning )

     LECTURE:  Stacks; templates
     READING ASSIGNMENT: Ch 4: pp 175-197
     HIGHLIGHTS:
     LAB

 

WEEK 4 (2/10/02)

LECTURE:  stacks
READING ASSIGNMENT:
HIGHLIGHTS:

LAB lab3
 

WEEK 5 (2/17/02)

LECTURE: NO CLASS
READING ASSIGNMENT:
HIGHLIGHTS:
LAB  continue lab 3

WEEK6 (2/24/02 )

LECTURE:  lab 4 notes; QUEUES
READING ASSIGNMENT:
HIGHLIGHTS: SIMULATION CASE
LAB: LAB4; lab3 due
 

  WEEK 7 (week beginning )

LECTURE: 
READING ASSIGNMENT: Ch 5
HIGHLIGHTS: Linked Lists
LAB:  lab 4 due; lab5
 

 

WEEK 8 (3/10/02 )

SPRING RECESS

WEEK 9 (3/17/02 )

LECTURE:  linked lists
READING ASSIGNMENT:
HIGHLIGHTS:
 LAB: lab6
 

WEEK 10 (week beginning )

LECTURE: 
READING ASSIGNMENT:
HIGHLIGHTS: 
LAB:

WEEK 11 (week beginning )

LECTURE:
READING ASSIGNMENT:
HIGHLIGHTS:
LAB:
 

WEEK 12 (week beginning )

LECTURE: 
READING ASSIGNMENT:
HIGHLIGHTS:
 

WEEK 13 (week beginning )

LECTURE: 
READING ASSIGNMENT:
HIGHLIGHTS:
 

WEEK 14 (week beginning )

LECTURE: 
READING ASSIGNMENT:
HIGHLIGHTS:

WEEK 15(week beginning )

LECTURE: 
READING ASSIGNMENT:
HIGHLIGHTS:

WEEK 16 (week beginning )

 LECTURE: 
READING ASSIGNMENT:
HIGHLIGHTS:
 
<return to top>

LABS

LAB #1 

          Directions:

1.     Develop a class  for an unsorted list of integers.

2.     The list will be implemented as a dynamic array.
The client will supply the size of the array.

3.     The class will have the following core methods:
a. constructor.
The constructor will receive the size of the array from the client.
b. add an item to the list
c. delete an item from the list
The method will receive the element number from the client.
d. display the list

4.     Items are added to the end of the list.

5.     When items are deleted, the empty element must be closed.
For example: if the 3rd element is deleted, then all the elements to the right of the 3rd element must be shifted one position to the left.

6.     Develop a client program to test the class.

7.     Store the client and the class  in one file.


 
LAB #2 

Same as LAB1, except use templates so that items on the list can be any data type – not just integers..

LAB #3

Input: any number with a hyphen, such as ss# 123-45-789
output: 123456789
directions: Use stack (stack.cpp)) to achieve output.

 

LAB #4

Use the STACKTYPE class to evaluate a postfix expression.
1. INPUT: postfix string of characters; use one digit integers for numbers
2. OUTPUT: the evaluation of the postfix expression

LAB #5
Use the STACKTYPE class to convert INFIX to RPN.

INPUT: infix expression; ASSUME: 1 digit numbers; no parentheses.
PROCESS: convert infix to RPN expression

INFIX TO RPN CONVERSION RULES:
1. Traverse infix expression one character at a time from left to right (assume 1 digit numbers)
2. If the character is a digit, then ADD (concatenate) to RPN expression.
3. If the character is an operator and has a HIGHER  PRIORITY than the operator at the TOP of the stack, then   PUSH onto stack; otherwise, keep POPPING  operators and adding them to the RPN expression UNTIL a lower priority operator is at the top of the stack OR the stack is empty - at that time PUSH the current operator onto the stack.
 4. Once all the characters in the infix expression have been processed, then
do the following: pop the remaining operators from the stack, adding each one to the rpn expression after it is popped.  This operation can be called FLUSHING THE STACK.

OUTPUT:  infix expression, RPN expression

(infix)          (RPN)
5+6              56+
5+6*2            562*+
5+6*2+3          562*+3+
8/2*3+4          82/3*4+
 
DIRECTIONS
1. Develop a hierarchy chart for the client program.
2. Write an IPO chart for each module (function) in the hierarchy chart.
    NOTE: an IPO chart states the following for each module:
             INPUT: parameters coming in.
             PROCESS: WHAT the module is doing.
             OUTPUT: parameters going out.
3. Perform stub testing . For example: create and test the priority function by itself, using a test driver .
   

LAB #6

Write a simulation of a  drive-up bank teller  operation.

DIRECTIONS

1.     Use the QUEUE2  class (see shared folder).

2.     Use the logic discussed in class.(see below)
- add 1 minute to clock.
- decrement server timmes by 1 minute
- If customer arrives
      enqueue customer
  endif
- If server free
    dequeue customer
    add wait-time to tot-wait-time
    add 1 to tot-cust
    set server timer
- endif

3.     List of data elements
- clock
- queue of customers
- array of servers (use 3 servers)
- tot-wait-time accumulator
- tot-cust accumulator
- time-of-simulation parameter (use 1000 miinutes)
- avg_server-time parameter (use 2 minutes))
-avg inter-arrival-time parameter (use 3 miinutes)

4.     OUTPUT: the average wait time in the queue.

 

 

LAB #7

LAB #8

LAB #9

 LAB #10
 

LAB #11
 

LAB #12

 
 <return to top>
 

HANDOUTS

 

HANDOUT #1:



HANDOUT #3

HANDOUT #4

HANDOUT #5

<return to top>
 

NOTES

 
 

<return to top>
 

 

1