(Latest Revision: 03/27/2001)
Week 07 Notes for CS 2500, Section 002 -- Spring 2001
CS 2500, Section 002, Tuesday, March 27, 2001
- Look at Upcoming Schedule
- Class starts at 09:40. I take roll at 09:50
- Announcement(s)
- Any questions on level two problems?
- Check out new file "prototypes.lev3" in the assignment directory for an
outline of an almost entire solution to the problem.
- I advise CS 2500 students to finish a little more of the program by
April 02 than is actually due: the work to finish out from
"doCommands" down is considerable -- so get to work on it. In my
soluton to this problem, I have about 20 functions. Eleven of these
functions are in the part of the program that is not due until
the final date.
- Discuss what is expected for the version of the program to be turned in
next Monday.
- Working on level #3, I found I wanted "gender" to be an additional
parameter of getNextClient and putClientInList. (Gender is not
stored in my version of the client record)
- What do we need to do to "glue" the list code to the main program
file?
- Define the client record type in the listA.h file, or via
a #include.
- plug in "values" for MAX_LIST constant and listItemType.
- In main program, equate "clientList" to "listClass" -- or
whatever is required by the terminology used by the
programmer.
-
- In "putClientInList," when we want to insert an item at the end of
a list, how do we know what position to give to function
"ListInsert(int NewPosition, listItemType NewItem, bool& Success)?"
-
CS 2500, Section 002,Thursday, March 29, 2001
- Look at Upcoming Schedule
- Class starts at 09:40. I take roll at 09:50
- Announcement(s)
- Sample calls to a list operation in program #3:
- clientData[0].ListInsert(4, item, success) ;
- clientData[genderID].ListInsert(place, item, success) ;
- Continue discussing linked lists.
- The interface to our linked list is the same
as the interface to our array list. This is
a case where the ADT remains the same. It is
only the implementation that differs.
- Note what is different in ListP.h from ListA.h
- In the ListP.cpp implementation file we see
the use of pointers, linking, dynamic memory
allocation/deallocation using the "new
dataType"/"delete pointerToData"
functions/syntax.
- Look at various samples of insertion code.
Get help from example *.jpg files.
- Look at a couple of cases of retrieval.
- Consider deletion
- Review the pro's/con's and performance
differences between pointer-based and
array-based implementations.
-