KATHOLIEKE UNIVERSITEIT LEUVEN DEPT OF COMPUTER SCIENCE ESC

  • Slides: 7
Download presentation
KATHOLIEKE UNIVERSITEIT LEUVEN DEPT. OF COMPUTER SCIENCE ESC Europe 1999 report Fundamentals of Class

KATHOLIEKE UNIVERSITEIT LEUVEN DEPT. OF COMPUTER SCIENCE ESC Europe 1999 report Fundamentals of Class Design by Michel de Champlain 1

In general KATHOLIEKE UNIVERSITEIT LEUVEN DEPT. OF COMPUTER SCIENCE u Speaker w Michel de

In general KATHOLIEKE UNIVERSITEIT LEUVEN DEPT. OF COMPUTER SCIENCE u Speaker w Michel de Champlain w Professor DECE Concordia University, Canada w Software Architect at Deep. Object. Knowledge ESC Europe 1999 report u Presentation w Basic w Focused on move from non-OO tot OO programming 2

Presentation Overview KATHOLIEKE UNIVERSITEIT LEUVEN DEPT. OF COMPUTER SCIENCE u explanation of principles of

Presentation Overview KATHOLIEKE UNIVERSITEIT LEUVEN DEPT. OF COMPUTER SCIENCE u explanation of principles of abstraction w evolution w pros/contras ESC Europe 1999 report u use of classes as abstraction mechanisms u guidelines/suggestions on using classes 3

Abstractions KATHOLIEKE UNIVERSITEIT LEUVEN ESC Europe 1999 report DEPT. OF COMPUTER SCIENCE u explanation

Abstractions KATHOLIEKE UNIVERSITEIT LEUVEN ESC Europe 1999 report DEPT. OF COMPUTER SCIENCE u explanation of principles of abstractions w definition of abstraction w procedural abstraction vs data abstraction w definition of module S interface S implementation w CDS, ADS and ADT w ADS: if one instance is enough (mouse, keyboard) w ADT: if multiple instances exists (stack, window) 4

Classes and Objects KATHOLIEKE UNIVERSITEIT LEUVEN DEPT. OF COMPUTER SCIENCE u Classes as abstraction

Classes and Objects KATHOLIEKE UNIVERSITEIT LEUVEN DEPT. OF COMPUTER SCIENCE u Classes as abstraction mechanisms ESC Europe 1999 report w definition of a class w definition of an object 5

Rules of Thumb KATHOLIEKE UNIVERSITEIT LEUVEN ESC Europe 1999 report DEPT. OF COMPUTER SCIENCE

Rules of Thumb KATHOLIEKE UNIVERSITEIT LEUVEN ESC Europe 1999 report DEPT. OF COMPUTER SCIENCE u Guidelines/suggestions on using classes w do not make fat classes w keep interfaces simple w only use a method when needed S not `by default` a getter/setter pair w methods should be S complete S minimal S foundational 6

Rules of Thumb KATHOLIEKE UNIVERSITEIT LEUVEN ESC Europe 1999 report DEPT. OF COMPUTER SCIENCE

Rules of Thumb KATHOLIEKE UNIVERSITEIT LEUVEN ESC Europe 1999 report DEPT. OF COMPUTER SCIENCE u Guidelines/suggestions on using classes w do not use large interfaces w `Special` methods S constructor S copy constructor S assignment S description (debugging) S equality S hash S print 7