We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11
BASIC CHARACTERISTICS
OF OBJECT-ORIENTED SYSTEMS DR. AHMED ALSHAMERI
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 1
Object-oriented systems • Focus on capturing the structure and behavior of information systems in little modules that encompass both data and process. - Modules are known as objects. - A class is the general template we use to define and create specific instances, or objects. - Every object is associated with a class.
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 2
Example: Class and Objects Clas s:
Objects:
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 3
Objects • Each object has attributes that describe information about the object. - Example: ◦ patient’s name, birth date, address, and phone number. - Attributes are also used to represent relationships between objects. ◦ Example: department attribute in an employee object with a value of a department object. - The state of an object is defined by the value of its attributes and its relationships with other objects at a particular point in time. ◦ a patient might have a state of new or current or former.
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 4
Objects … • Each object also has behaviors. • The behaviors specify what the object can do. - Example, ◦ an appointment object can probably schedule a new appointment, delete an appointment, and locate the next available appointment. - In object-oriented programming, behaviors are implemented as methods.
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 5
Methods and Messages • Methods implement an object’s behavior. • A method is nothing more than an action that an object can perform. • Messages are information sent to objects to trigger methods. • A message is essentially a function or procedure call from one object to another object. - Example: ◦ patient is new to the doctor’s office, the receptionist sends a create message to the application. ◦ The patient class receives the create message and executes its create() method which then creates a new object: aPatient
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 6
Methods and Messages …
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 7
Encapsulation and Information Hiding • Encapsulation - The combination of process and data into a single entity. - a user cannot ask for data directly. - Private attributes and public set ang get methods. • Information hiding - the information required to be passed to the module and the information returned from the module are published to the user. -
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 8
Inheritance • Classes are arranged in a hierarchy whereby the superclasses, or general classes, are at the top and the subclasses, or specific classes, are at the bottom. • Common sets of attributes and methods can be organized into superclasses. • The relationship between the class and its superclass is known as the a-kind-of relationship. • Each subclass contains attributes and methods from its parent superclass.
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 9
Inheritance … • Concrete class - Any class that has instances. • Abstract classes - Do not produce instances because they are used merely as templates for other, more- specific classes.
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 10
Polymorphism • The same message can be interpreted differently by different classes of objects. • Polymorphism is tightly coupled to inheritance.
03/20/2021 INFORMATION SYSTEM ANALYSIS & DESIGN | DR. AHMED ALSHAMERI 11