DCO20105  Data Structures and Algorithms

Semester A, 2002-3

 

Lab 6 -- C++ programming on function object

Objectives:

 

Pre-Class activities

Laboratory Exercise

  1. (5 minutes) Q & A.

  2. (10 minutes) Hand in the hard copy and demonstrate the program assignment in last lab: Roster.h, Roster.cp, and the driver program for running the class Roster.
    1. Hand in a hard copy of your program. Write your name and group number in case this information is not provided in your hard copy.
    2. Execute the program once and show the result screen to your tutor.

  3. (20 minutes) Write up the program counter.cp for "Constructing a Function Object" in practice problems of Exercise 3.  Use the codes there as your main() and create the function object Counter as specified. 

  4. Report the progress of your group work on Assignment 1, learn the form/venue to submit your assignment, and ask questions if any.


Marking

2 for the program set of Roster.
2 for the program of function object Counter.cp.
Marks are awarded according to the completeness and quality of a program/answer.
0 -- absent (without extenuating circumstance) or no participation at all.


Last modified: October 04, 2002