Chủ Nhật, 20 tháng 4, 2014

Introduction to Java

Object-Oriented programming (OOP):
- OOP allows for analysis and design of an application in terms of entities or objects.
-  Process replicates the human thought process as closely as possible.
- Code and data are merged into a single indivisible thing – an object.
- Close match between objects in the programming sense and objects in the real world.
Discuss basic Object-Oriented concepts such as:
- Objects
- Classes
- Properties
- Methods
- Abstraction
- Inheritance
- Encapsulation
- Polymorphism

1.Objects
- Represent an entity in the real world.
- A concept or thing with defined boundaries that is relevant to the problem we are dealing with.
Objects serve two purposes:
- They help to understand the real world.
- They provide a practical basis for a computer application.
Each object has its own properties or characteristics that describe what it is or does.
2. Class
-Grouping of objects that have the same properties, common behaviour and common relationships.   
- The term class is an abbreviation of “class of objects”.
Example:
A class of persons.
A class of animals.
A class of processes. 
- Each object is said to be an instance of its class.
Objects and Classes