OOP – Learn Object Oriented Thinking and Programming
RUP
OOP – Learn Object Oriented Thinking and Programming
Free
Description
Contents
Reviews
Language
English
ISBN
978-80-904661-8-0
Reaction of Readers
Brief Content
Detailed Content
Acknowledgement
Preface
Author’s Foreword
Part 1: Interactive mode
1 The Prologue
Methodology Used
The Presentation Concept
The Accompanying Animations
What You Will Need
File Manager
JDK and JRE
BlueJ Environment
Working with BlueJ
Review
2 The OOP – Get Acquainted
The Object Oriented World
The Objects
The Classes
The Messages
The Structured vs. Object Oriented Program
The First Project
The Graphic Language UML
Classes in the Project
The Compilation
Review
3 We Are Sending First Messages
The Instances and References to Them
Creating a New Instance
The Object Bench
The Messages Sent to Instances
The Virtual Machine
Review
4 The Test Class
The Test Fixture
Creating the New Class
Creating the Test Fixture
Creating the Test
Methods and Constructors
Review
5 The Messages Requiring a Value
Return Type
Obtaining the Return Value
Primitive and Object Types
References to Objects
Record of Method Calling
The getXxx and setXxx Messages/Methods
Review
6 The Messages Requiring an Object
The Rules for Creating the Identifiers
Getting the Reference to the Returned Object
The Instance of String Type
How to Write the Strings
Memory Management – Garbage Collector
Using Methods Returning the Value in Tests
Review
7 The Messages with Parameters
The Meaning of Parameters
The Object Construction Using Parameters
The Dialog Structure for Sending Messages with Parameters
The Example Continued
Once More the Object vs. the Reference
The Parameters of String Type
The Animation
Exercise
Review
8 The Object Type Parameters
The Significance of Quotation Marks when Entering the Strings
The Class Object
The Object Type Parameters
Direct Passing of the Message Return Value
Briefer Record of Messages
Exercise
Review
9 The Expedition into the Interior of Instances
Fields of Instances and of Classes
Working with the Fields
The Messages Requesting a Field Value
Field Accessibility
Test Fixture Extending
Monitoring of Field Values
Static Fields – Class Fields
Exercise
Review
10 The Interface
Motivation
Interface vs. Implementation
Interface as a Data Type
Interface versus interface
Practical Usage
Preparation of a New Project
Importing the Class from Another Project
Implementation of an interface by the Class
Exercise
Review
11 The Interface Continued
Readiness for the Future Extension
The Example: Multishape
Test Class of the Class
Variable Number of Parameters
The Design Pattern Prototype
Verifying of the Multishape Functioning
Exercise
Review
12 The Introduction into Design Patterns
Design Patterns
Examples of Design Patterns
The Implementation of More Interface Types
Exercise
Review
13 The Inheritance of Interface Types
Hierarchy of the Types
Three Types of Inheriting
One interface Missing
Signature versus Contract
Definition of a New Interface Type
New Hierarchy of the Interface Types
Inheriting of the Interface Types
Documentation of the Project
Exercise
Review
14 Mediator and Listener
Observer – Listener – Subscriber
How to Prevent Mutual Cancelling of Shapes
The Canvas Manager and Its Project
Recursion
Other New Features
Exercise
Review
Part 2: Basics of Creating OO Programs
15 The First Code
The New Empty Class
Files in BlueJ Projects
The Source Code of the Empty Class
Constructor
Adjustment of Presets
Exercise
Review
16 The First Constructor
Definition of the Constructor
Name of the Constructor
The Working Constructor
Source Code Formatting
More Complex Example
Exercise
Review
17 Parameters
Parameters and Arguments
Renaming the Class
The Test Class of the Light Class
Exercise
Review
18 The Fields and the Methods
The Light Has to Learn
Introducing Fields
Encapsulation and Implementation Hiding
The Assignment of the Value to the Field
Method Definitions
The Qualification
The Conflict of Names of a Field and of a Parameter
Exercise
Review
19 Implementation of an interface
Interconnecting the Source Code with the Class Diagram
The Abstract Methods and Classes
Implementation of a Method Declared by an Implemented Interface
The @Override Annotation
The Interface and the Class File
Test Class
Exercise
Review
20 Comments
Commenting Parts of a Code
Comments in Java
Documentation Comments
Documentation of the Classes and the Whole Project
The Standard Class Template
Formatting of the Documentation Comments
Javadoc Tags
Comments Marking Sections of the Source Code
Empty Method’s Pattern
Exercise
Review
21 Using of this
The Hidden Parameter this
Unsuitable Copying of the Code
The Details of the Constructor’s Work
Adjustment of the Constructors Using this
Exercise
Review
22 Overloading
Further Constructors
Overloading of the Methods
The Identifiers of Parameters
The Identification of the Called Method
The Basic Arithmetic Operators
Exercise
Review
23 The Local Variables
The Auxiliary Methods
The Local Variables
Fields × Parameters × Local Variables
The Applicability (The Range of Validity)
The Initialization (Assigning the Initial Value)
The Lifetime
Position and Module Setting
The Constants and the Magic Values
Exercise
Review
24 Methods Returning a Value
Fields versus Properties
The Accessory methods
The Properties Saved in the Fields
Returning of the Values Obtained by Calculation
Object Equality Testing
Test of Returning the Proper Value
Exercise
Review
25 The Crate
The Fields Representing a Set of Values
Passing Parameters by Value and by Reference
Crate / Transport Object
The Constants
Methods Working with the Crate
Exercise
1. Put the project 125b_Crate_Start into operation
2. Import the classes Light, Arrow, TrafficLight and Car and put them into operation
3. Supplement and Test these Classes
Review
26 Strings and How to Work with Them
Problems with Comparing the Objects
Concatenation of the Text Strings
Text Representation (Text Signature)
Line Ending
The Escape Sequence
The Standard Output
Terminal Window
The Standard Error Output
Exercise
Review
27 A Bit of Logic
Problems with Objects Comparing
The Cast Operator (Type)
Numerical Comparison Operators < <= == >= > !=
Operators and their Arity
Comparison of Objects
Logical Complement Operator !
Conjunction (ConditionalAnd) Operators && and &
Disjunction (ConditionalOr) Operators || and |
Type Comparison Operator instanceof
Contract of the equals(Object) Method
Value Types and Reference Types
Reference Types
Value Types
Exercise
Review
28 Class Methods and Fields
Counted Objects
Static Fields
Order of Modifiers
Program Modifications
Innovation of the toString() Method
Town
Entering
An Analysis
Exercise
Review
29 Refactoring of the Code
What is Refactoring
How to Solve Our Problem
The IModular Interface
A Servant Class
The Method auxSwapPositionsWithCheck
Generalization of a Method
Adjustment for Arrows
Adaptation of Test Classes
The testPositionSize Test Method
Generalization of a Copied Method
Adapting the Method to Different Requirements
Exercise
Review
30 Static Constructor – Class Constructor
Class Constructor – Static Constructor
The Call class
Loading and Initializing of a Class
Details of Class Initializing
What Should Be Remembered
Procedure of Instance Creating
Details on Constructing an Object Once Again
Instance Instruction
Exercise
Review
31 Debugger
The Importance of Debugger
Activating of the Debugger
Debugger’s Window
Stepping through / Tracing the Program
The Call Sequence Panel
Return Stack
Local Variables
Stepping through Test Methods
Exercise
Review
32 Creating of an Standalone Application
Assignment
The Dispatcher Class
The IUFOFactory Interface
Design Pattern Factory Method
The IUFO Interface
The move(int) Method
A Constructor
Controlling by Direct Message Sending
Controlling from a Keyboard
Creating a Standalone Application
The Main Class of an Application
Creating Executable Archives
Exercise
Review
Part 3: Advanced Creating of OO Programs
33 Packages
Packages and Folders
Big Programs and Their Problems
Conventions for Project Names
Creating Packages in BlueJ
The package statement
Tree of Packages
Simple and Full Names
Package java.lang
The import Statement
Package Name Convention
Change in Package Dividing
Why the Star Notation is Unsuitable
Exercise
Review
34 Linking of Instances
Conditions, the Future Objects Have to Meet
The RoadField Class
The Ring Class
The Design Pattern Builder
The RingBuilder Class
Creating of Rings
Static Import
The RingTest Class
Exercise
Review
35 Decorator
Recursion
Analysis of Error Message
Multimover Class and IMultimovable Interface
Ambitions of Objects
Design Pattern Decorator
The Circular Class
Test Completing
Exercise
Review
36 Teaching Cars to Turn
Reference Area and Relative Coordinates
Creating of Objects Turned to Entered Direction
Effective Re-drawing of Modified Objects
Block
The IDirectable Interface
Decorator DirectableCircular
Exercise
Review
37 Controlling from Keyboard
The Controller
Preparation of the Race
Conditional Statement – the if Statement
Using a Block
The IRacer Interface
Premature return
Embedded Conditional Statement
Time Measurement
Automatic and Explicit Casting
Finishing the Race Class
Exercise
Review
38 Containers and Maps
Containers and a Library of Collections
Dictionaries and Maps
Member Classes
The Map<K,V> Interface and the HashMap<K,V> Class
Generic Types and Type Parameters
Interface vs. Implementation
Initialization
The Registration
The Check of Transits
The End of the Race
The IRace Interface
Exercise
Review
39 Further Programming Constructions
Collections that Can Be Received from a Map
Collection Library
The for(:) Loop
Race for Several Rings
Increment and Decrement Operators
Exceptions and Their Throwing
Further Corrections in Older Classes
Exercise
Review
40 The Factory Method Second Time
Problems with Variant Rings
The IRingFactory Interface
More Complex Factory
Complete Conditional Statement
Methods with a Variable Number of Parameters
The Classic for Loop
Exercise
Review
41 The Loops
Size of a Roadfield
The Lazy Initialization
Determining of Lower and Upper Limits
Leaving the Loop from Inside of Its Body
The Sequence of if … else if
Side Effects of Methods
Loops Taxonomy
The while Loop – the Loop with a Condition at the Beginning
The do … while Loop – the Loop with a Condition at the End
The switch Statement
Change of the Module for Ring
The ParallelRace Class
Exercise
Review
42 Lists and Their Ordering
Enum Types
Enum Type Using
The State Diagram
The Lists
Modifications of the ParallelRace Class
Sorting the List Content
Native (Natural) Sorting
Alternative Sorting and the Design Pattern Command
Exercise
Review
43 The Array
Declaration of an Array Variable
Creating and Initializing an Array
Methods with a Variable Number of Parameters
How to Use the Array
Sorting of the Array Content
How to Express Numbers with Words
Exercise
Review
44 The Finale
Index
The book hasn't received reviews yet.
You May Also Like