(Latest Revision: 03/21/2002)
Week 06 Notes for CS 2500, Section 001 -- Spring 2002
CS 2500, Section 001, Tuesday, March 19, 2001
- Look at Upcoming Schedule
- Class starts at 09:40. I take roll at 09:50
- Announcement(s)
- Grades on Program #1 and Quiz #1 have been posted
- Program #2 is due today.
- Discuss Data Structures, Classes, and The Array List Class
-
CS 2500, Section 001,Thursday, March 21, 2001
- Look at Upcoming Schedule
- Class starts at 09:40. I take roll at 09:50
- Announcement(s)
- I posted the program #3 assignment
-
- Finish discussion of the Array List Class
- Briefly re-cap virtues of abstract data typing and modular
code:
- Easier to design correctly
- Easier to change implementations
- protects integrity of data from users
- Easier to re-use code
- Documentor's thought for the day. The "boss" gives a copy of a
function header plus function prototype to a programmer, and also gives
the same information to one who will call the function -- the client.
After that the programmer never has any contact with the client. The
programmer writes the function according to the specifications in the
header and the pattern of the prototype. Later the client makes many
calls to the function without ever seeing the code for the function.
Everything goes perfectly. The client knows just what to expect each
function call to do, and each function call does what the client
expects. If a header is written properly, then the scenario described
above should be do-able. If the scenario is not possible, then there
is something wrong with the header comment -- something is missing.
- Discuss the upper levels of the design of program #3. First
due date coming up in a week -- try to have level three
started before spring break begins.
- If time allows, begin 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.