ANNOUNCEMENTS

PIC 10B, Summer 2002


08/12/2002
Please do not forget that we will have a Final Exam on Thursday, August 15, in class. There will be a final review session conducted by the TA on Wednesday, August 14, 10:30am - 11:20am (during the discussion).
08/12/2002
Please take a look at new Example #14 - Sorting methods.
08/08/2002
Please take a look at new Example #13 - AvlTree (work in progress).
08/06/2002
The Homework Project #6 (the last in this course) is posted on the class web page. The assignment is due on Thursday, August 15, by 4:30 pm. Please do not forget to take a look at new reading assignment as well.
07/31/2002
Dear Ladies and Gentlemen,
THE DUE DATE FOR HOMEWORK #5 IS EXTENDED TILL
MONDAY, AUGUST 5, 4:30 PM.
Thanks to care of our excellent reader, Mr. C. Amor, it was brought to my attention that in some of the code samples for PIC 10B I had a misfortune to use a feature not supported by ANSI C++ standard (and therefore not supported by the majority of compilers).
Namely, although calling one constructor from another constructor of the same class does not produce compile-time error, but it does not do anything useful either - such a call does not initialize an object as I intended.
Luckily it is really trivial to fix this issue. In all cases where this error appeared, instead of two constructors (one general and the other default "noargs"), one can use a single constructor with default argument. I will illustrate this on example of ListElmt class and List class defined in files list.h and list.cpp.

--- OLD VERSION OF ListElmt CLASS: ------

class ListElmt {
    public:
	ListElmt(const void *data) {
	    this->data = (void *) data;
	    next = NULL;
	} 

	ListElmt() {
	    ListElmt(NULL);
	}

	...
};

--- CORRECTED VERSION OF ListElmt CLASS: ---

class ListElmt {
    public:
	ListElmt(const void *data = NULL) {
	    this->data = (void *) data;
	    next = NULL;
	} 

	...
};

---------------------------------------------
---------------------------------------------


--- OLD VERSION OF List CLASS: -----

class List {
    public:
	List(void (*destroy)(void *data));
	List();
	...
};

...

List::List(void (*destroy)(void *data)) {
    size = 0;
    head = NULL;
    tail = NULL;
    this->destroy = destroy;
}

List::List() {
    List(NULL);
}

...


--- CORRECTED VERSION OF List CLASS: ---

class List {
    public:
	List(void (*destroy)(void *data) = NULL);
	...
};

...

List::List(void (*destroy)(void *data)) {
    size = 0;
    head = NULL;
    tail = NULL;
    this->destroy = destroy;
}

...
--------------------------------------------------
--------------------------------------------------

As you can see, in each case a pair of constructors is replaced with a single constructor with default argument value. In addition to ListElmt and List, analogous changes are done to the following classes: Stack, Queue, CHTbl, BiTreeNode, BiTree. I am terribly sorry for any inconvenience.
This mistake should not have affected your solution to homework #4, but it might have affected homework #5. Because of this,
THE DUE DATE FOR HOMEWORK #5 IS EXTENDED TILL
MONDAY, AUGUST 5, 4:30 PM.

I hope that this will give you enough time to incorporate required small changes in your source files.
07/26/2002
The Homework Project #5 is posted on the class web page. The assignment is due on Thursday, August 1, by 4:30 pm. Please do not forget to take a look at new reading assignment as well.
07/25/2002
Please take a look at sample solution list.cpp for homework #4.
07/16/2002
Please take a look at new Examples #6, #7 and #8.
07/15/2002
The Homework Project #4 is posted on the class web page. The assignment is due on Thursday, July 25, by 4:30 pm. Please do not forget to take a look at new reading assignment as well.
07/15/2002
There will be no homework this week. But please do not forget that we will have a Midterm on Thursday, July 18, in class. There will be a midterm review session conducted by the TA on Wednesday, July 17, 10:30am - 11:20am (during the discussion).
07/10/2002
Please take a look at new reading assignment, as well as at new examples #4 and # 5.
07/03/2002
The Homework Project #3 is posted on the class web page. The assignment is due on Thursday, July 11, by 4:30 pm. Please do not forget to take a look at new reading assignment as well.
07/02/2002
Please take a look at new reading assignment, as well as at a new Example #3.
06/27/2002
The Homework Project #2 is posted on the class web page. The assignment is due on Wednesday, July 3, by 4:30 pm. Please do not forget to take a look at new reading assignment as well.
06/24/2002
The Homework Project #1 is posted on the class web page. The assignment is due on Thursday, June 27, by 4:30 pm.
06/24/2002
Welcome and Good Luck!


Last modified on by fedandr@math.ucla.edu.