Submitted by: Submitted by doox
Views: 21
Words: 605
Pages: 3
Category: Science and Technology
Date Submitted: 04/10/2015 03:29 AM
INFS2605 Study Notes
Chapter 10 – Thinking in Objects
* Immutable object = an object whose contents cannot be changed once the object has been created
* Immutable class has all private data fields and no public set methods
* A variable defined inside a method = local variable
* If a local variable has the same name as a class variable the LV takes precedence and the CV is hidden
* Method that is not depending on a specific instance should be defined as a static method
* The THIS keyword is the name of a reference that an object can use to refer to itself [used mainly in the constructor]
* Class abstraction is the separation of class implementation from the use of the class
* The details of implementation are encapsulated and hidden from the user = encapsulation
Chapter 11 – Inheritance and Polymorphism
* OO programming allows you to define new classes from existing classes = INHERITANCE by extended a class (subclass) from another class (superclass) then using a super constructor
* Methods can be overridden only if it is accessible (private method can be overridden)
* POLYMORPHISM = a variable of a supertype (from a super class) can refer to a subtype (from a sub class) object
Chapter 12 – GUI Basics
Chapter 15 – Abstract Classes and Interfaces
* Abstract methods are implemented in concrete subclasses (using the abstract modifier in the header)
* Abstract classes are like regular classes but you can not create instances of abstract classes
* A subclass can be abstract if its super class is not
* You cant create new instances of an AC but you can use the AC as data type (Employee[ ] employees = new Employee[ 10 ])
* An interface is a class-like construct that contains only constants and abstract methods
* Class names are NOUNS where as interface names may be adjectives (edible) or nouns
* Interface can extend one or more interfaces
Chapter 14 – Exception Handling and Text I/O...