Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
OOP LectureNotes

OOP LectureNotes

Ratings: (0)|Views: 43 |Likes:
Published by Sylvia Grace

More info:

Published by: Sylvia Grace on Jun 28, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/17/2013

pdf

text

original

 
Object Oriented Programming - Lecture Notes
Mehmet Gen¸cerIstanbul Bilgi UniversityDepartment of Computer Science
 
Contents
1.1 Functional/declarative vs imperative programming. . . . . . 11.2 Strictly typed languages. . . . . . . . . . . . . . . . . . . . . 21.3 Object orientation. . . . . . . . . . . . . . . . . . . . . . . . 31.4 Compiled vs interpreted languages. . . . . . . . . . . . . . . 41.5 Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.6 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Iteration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 A note about data types. . . . . . . . . . . . . . . . . . . . . 82.3 Variable scopes. . . . . . . . . . . . . . . . . . . . . . . . . . 82.4 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.5 Creating animations with Processing. . . . . . . . . . . . . . 92.6 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1 Data types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Operators, expressions, and arithmetic. . . . . . . . . . . . . 123.3 Arrays and iteration. . . . . . . . . . . . . . . . . . . . . . . 133.4 Variables and reference types. . . . . . . . . . . . . . . . . . 153.5 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
 
CONTENTS 
ii4.1.3 Using instance methods. . . . . . . . . . . . . . . . . 224.1.4 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . 234.2 Using class diagrams in class design. . . . . . . . . . . . . . . 234.3 Using DrScheme/ProfessorJ for non-graphical exercises. . . . 244.4 Garbage collection and object destructors. . . . . . . . . . . . 254.5 Creating three dimensional animations in Processing. . . . . 25
5.1 Class members versus object members. . . . . . . . . . . . . 295.1.1 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . 305.2 Reflection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.0.1 Why the ‘static main()’ method?. . . . . . . . . . . . 346.1 Using Java libraries. . . . . . . . . . . . . . . . . . . . . . . . 356.2 Everpresent objects in JVM. . . . . . . . . . . . . . . . . . . 366.3 Interacting with the user. . . . . . . . . . . . . . . . . . . . . 366.4 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376.5 Handling errors in Java programs. . . . . . . . . . . . . . . . 376.6 Self documenting programs. . . . . . . . . . . . . . . . . . . . 396.6.1 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . 396.7 Profiling Java processes. . . . . . . . . . . . . . . . . . . . . . 39
7.0.1 A note about the types. . . . . . . . . . . . . . . . . . 437.1 Scopes, disambiguation, and overloading. . . . . . . . . . . . 447.1.1 Overloading and overriding methods, method signatures457.2 Abstract classes and methods. . . . . . . . . . . . . . . . . . 467.2.1 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . 477.3 An example of extending JDK classes: Graphical user interfaces477.3.1 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . 49
8.1 Multiple interfaces (or why interfaces are better than abstractclasses). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538.2 Mixing the mechanisms. . . . . . . . . . . . . . . . . . . . . . 538.2.1 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . 548.3 Example: Responsive GUI application. . . . . . . . . . . . . 54

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->