Chapter 1 Introduction To OOP .
Chapter 1 Introduction To OOP .
In the context of programming models are used to understand the problem before
starting developing it.
We make Object Oriented models showing several interacting objects to
understand a system given to us for implementation.
An object is,
1.Something tangible (Ali, School, House, Car).
2.Something conceptual (that can be understand intellectually for example time, date
and so on…).
An object has,
1.State (attributes)
2.Well-defined behavior (operations)
3.Unique identity
We will assign our own generated unique ID in the model for Time object
Date is also an intangible (conceptual) object
We will assign our own generated unique ID in the model for Date object
1.12 Copyright © 2017 Pearson Education Ltd.
Object Oriented Programming in C#
Most programming languages provide the following basic building blocks to build
object-oriented applications:
Classes: A Class define the structure using methods and properties/fields that look
like real-world entity.
Methods: A method represents a particular behavior. It performs some action and
might return information about an object, or update an object’s data.
Properties: Properties hold the data temporarily during the execution of an
application.
Objects: Objects are instances of the class that holds different data in
properties/fields and can interact with other objects.
Interfaces: An interface is a contract that defines the set of rules for a particular
functionality. They are used effectively with classes using OOP principles like
inheritance and polymorphism to make applications more flexible.
1.13 Copyright © 2017 Pearson Education Ltd.
Object-oriented Design Principles
There are various object-oriented principles and techniques using which you can
develop applications that are maintainable and extendable.
The followings are four main principles of object-oriented programming:
1.Abstraction
2.Encapsulation
3.Inheritance
4.Polymorphism
You will learn the above principles in detail in the next few chapters.
CHAPTER One
END!!!