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 or section
Like this
9Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
Comp200 Notes 2008

Comp200 Notes 2008

Ratings: (0)|Views: 837|Likes:
Published by Grant
OOP in Java, UKZN, South Africa
OOP in Java, UKZN, South Africa

More info:

Published by: Grant on Jul 14, 2009
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

02/09/2012

pdf

text

original

 
More Java
School of Computer ScienceUniversity of KwaZulu-NatalFebruary 10, 2008
1
 
C
ONTENTS
Contents 11 Introduction to Objects 7
1.1 What is Object Oriented Programming? . . . . . . . . . . . . . . . . . . . . . . . . . 7Object Orientation as a New Paradigm: The Big Picture . . . . . . . . . . . . . . . . 81.2 Fundamentals of Objects and Classes . . . . . . . . . . . . . . . . . . . . . . . . . . 9Objects and Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Class Members and Instance Members . . . . . . . . . . . . . . . . . . . . . . . . . . 12Access Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Creating and Destroying Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Garbage Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Everything is NOT an object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241.3 Introduction to Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261.4 Javadoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291.5 Creating Jar Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31APIs and Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321.6 Mixing Static and Non-static . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Static Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2 Object Oriented Analysis and Design 39
2.1 Introduction to Software Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . 39Software Engineering Life-Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Object-oriented Analysis and Design . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Documenting Designs: The Unified Modelling Language . . . . . . . . . . . . . . . 432.2 A Case Study: Card Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502.3 Creating Abstractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Designing the classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Black Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Preconditions and Postconditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532.4 Example: A Simple Card Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3 Nested Classes 63
3.1 Nested Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633.2 Example of Inner Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653.3 Anonymous Inner Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4 Inheritance 715 Abstract Classes and Polymorphism 81
1

Activity (9)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
syriluit liked this
Rajesh Jha liked this
poweredgeus liked this
poweredgeus liked this
zd_ayi liked this
jrpalispissr6299 liked this

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)//-->