

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A series of class notes from a spring 2002 computer science 403 class. The notes cover topics related to object-oriented programming (oop), including classes, inheritance, polymorphism, data abstraction, and object initialization. The notes also discuss concepts such as constructors, destructors, and deep copy and comparison. The document also mentions java interfaces and their role in oop.
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Spring 2002 CS 403 Class Notes Page 1
Spring 2002 CS 403 Class Notes (^) Page 2
Spring 2002 CS 403 Class Notes (^) Page 3
Spring 2002 CS 403 Class Notes Page 4
void main(void){ foo f; f.c(); f.a = 3; //illegal }
Spring 2002 CS 403 Class Notes (^) Page 5
class foo2: public foo{ public: int d(); //this method can reference a and b }
Spring 2002 CS 403 Class Notes (^) Page 6
Spring 2002 CS 403 Class Notes Page 7
triangle *t = new triangle; rectangle *r = new rectangle; if user_click = “rectangle”{ r->draw(); r->shade(); r->rotate();} else{ t->draw(); t->shade(); t->rotate();}
Spring 2002 CS 403 Class Notes (^) Page 8
shape *s; rectangle *r = new rectangle; triangle *t = new triangle; if user_click = “rectangle” s = r; else s = t; s->draw(); s->shade(); s->rotate();
Spring 2002 CS 403 Class Notes (^) Page 9
Spring 2002 CS 403 Class Notes Page 10
Spring 2002 CS 403 Class Notes (^) Page 11
Spring 2002 CS 403 Class Notes (^) Page 12