SlideShare a Scribd company logo
Object-oriented Concepts TOPIC ONE Object-oriented Software Engineering
Object-oriented Software Engineering Object-oriented Software Engineering is the use of object technologies in building software.
Pressman, 1997 Object technologies is often used to encompass all aspects of an object-oriented view and includes analysis, design, and testing methods; programming languages; tools; databases; and applications that are created using object-oriented approach. Taylor, 1997, Object Technology Object technology is a set of principles guiding software construction together with languages, databases, and other tools that support those principles. Object Technology
It leads to reuse, and reuse (of program components) leads to faster software development and higher-quality programs. It leads to higher maintainability of software modules because its structure is inherently decoupled. It leads to object-oriented system that are easier to adapt and easier to scale, ie, large systems are created by assembling reusable subsystems. Benefits of Object Technology
It is a representation of an entity either physical, conceptual, or software. It allows software developers to represent real-world concepts in their software design. Object
It is an entity with a well-defined boundary and identity that encapsulates state and behavior. Object
It is one of the possible conditions that an object may exists in. It is implemented by a set of properties called  attributes , along with its values and the links it may have on other objects. Object's State
It determines how an object acts and reacts. It is represented by the operations that the object can perform. Object's Behavior
Although two objects may share the same state (attributes and relationships), they are separate, independent objects with their own unique identity. Object's Identity
Abstraction Encapsulation Modularity Hierarchy Four Basic Principles of Object-orientation
Abstraction is a kind of representation that includes only the things that are important or interesting from a particular point of view. It is the process of emphasizing the commonalities while removing distinctions. It allows us to manage complexity systems by concentrating on the essential characteristics that distinguish it from all other kinds of systems. It is domain and perspective dependent. Abstraction
Sample Abstraction An applicant submits a club membership application to the club staff. A club staff schedules an applicant for the mock try-outs. A coach assigns an athlete to a squad. A squad can be a training or competing squad. Teams are formed from a squad.
Encapsulation localizes features of an entity into a single blackbox abstraction, and hides the implementation of these features behind a single interface. It is also known as  information-hiding ; it allows users to use the object without knowing how the implementation fulfils the interface. It offers two kinds of protection: it protects the object's state from being corrupted and client code from changes in the object's implementation. Encapsulation
Encapsulation Illustrated Joel Santos is assigned to the Training Squad. The key is in the  message interface . updateSquad(“Training”)
Modularity is the physical and logical decomposition of large and complex things into smaller and manageable components that achieve the software engineering goals. It is about breaking up a large chunk of a system into small and manageable subsystems.  The subsystems can be independently developed as long as their interactions are well understood. Modularity
Modularity Illustrated Ang Bulilit Liga Squad and Team System Club Membership Maintenance System Coach Information Maintenance System Squad and Team Maintenance System
Any ranking or ordering of abstractions into a tree-like structure. Kinds of Hierarchy Aggregation Class Containment Inheritance Partition Specialization Type Hierarchy
Hierarchy Illustrated Squad Training Squad Competing Squad
It is a form of association wherein one class shares the structure and/or behavior of one or more classes. It defines a hierarchy of abstractions in which a subclass inherits from one or more superclasses. Single Inheritance Multiple Inheritance It is an  is a kind of  relationship. Generalization
It is a mechanism by which more-specific elements incorporate the structure and behavior of more-general elements. A class inherits attributes, operations and relationship. Inheritance Squad Name Coach MemberList listMembers() changeCoach() Training Squad Competing  Squad
Inheritance In Java, all classes, including the classes that make up the Java API, are subclassed from the  Object  superclass.  A sample class hierarchy is shown below.  Superclass Any class above a specific class in the class hierarchy. Subclass Any class below a specific class in the class hierarchy.
Inheritance Superclass Any class above a specific class in the class hierarchy. Subclass Any class below a specific class in the class hierarchy.
Inheritance Benefits of Inheritance in OOP : Reusability Once a behavior (method) is defined in a superclass, that behavior is automatically inherited by all subclasses.  Thus, you can encode a method only once and they can be used by all subclasses.  A subclass only needs to implement the differences between itself and the parent.
Inheritance To derive a class, we use the  extends  keyword.  In order to illustrate this, let's create a sample parent class. Suppose we have a parent class called Person.  public class Person {  protected String name;  protected String address;  /**   * Default constructor    */  public Person(){  System.out.println(“Inside Person:Constructor”);  name = ""; address = "";  } . . . . }
Inheritance Now, we want to create another class named Student.  Since a student is also a person, we decide to just extend the class Person, so that we can inherit all the properties and methods of the existing class Person.  To do this, we write,  public class Student  extends  Person { public Student(){  System.out.println(“Inside Student:Constructor”);  } . . . . }
Inheritance When a Student object is instantiated, the default constructor of its superclass is invoked implicitly to do the necessary initializations. After that, the statements inside the subclass's constructor are executed.
Inheritance: To illustrate this, consider the following code,  In the code, we create an object of class Student. The output of the program is,  public static void main( String[] args ){  Student anna = new Student();  }  I nside Person:Constructor  Inside Student:Constructor
Inheritance The program flow is shown below.
The “super” keyword A subclass can also  explicitly  call a constructor of its immediate superclass.  This is done by using the  super  constructor call.  A  super  constructor call in the constructor of a subclass will result in the execution of relevant constructor from the superclass, based on the arguments passed.
The “super” keyword For example, given our previous example classes Person and Student, we show an example of a super constructor call.  Given the following code for Student,  public Student(){  super( "SomeName", "SomeAddress" ); System.out.println("Inside Student:Constructor"); }
The “super” keyword Few things to remember when using the super constructor call: The super() call MUST OCCUR AS THE FIRST STATEMENT IN A CONSTRUCTOR.  The super() call can only be used in a constructor definition.  This implies that the this() construct and the super() calls CANNOT BOTH OCCUR IN THE SAME CONSTRUCTOR.
The “super” keyword Another use of super is to refer to members of the superclass (just like the this reference ).  For example,  public Student() {  super.name = “somename”;  super.address = “some address”;  }
Overriding methods If for some reason a derived class needs to have a different implementation of a certain method from that of the superclass, overriding methods could prove to be very useful.  A subclass can override a method defined in its superclass by providing a new implementation for that method.
Example Suppose we have the following implementation for the getName method in the Person superclass,  public class Person {  :  :  public String getName(){  System.out.println("Parent: getName");  return name;  }  }
Example To override, the getName method of the superclass Person, we write in the subclass Student, Now, when we invoke the  getName  method of an object of the subclass  Student , the overridden getName method would be called, and the output would be, public class Student extends Person{ :  :  public String getName(){  System.out.println("Student: getName");  return name;  }  :  }  Student: getName
Final Classes Final Classes Classes that cannot be extended To declare final classes, we write, public  final  ClassName{ . . .  } Example: Other examples of final classes are your wrapper classes and Strings. public final class Person {  . . .  }
Final Methods and Classes Final Methods Methods that cannot be overridden To declare final methods, we write, public  final  [returnType] [methodName]([parameters]){ . . . } Static methods are automatically final.
Example public final String getName(){ return name;  }
It is the ability to hide many different implementation behind a single interface. It allows the same message to be handled differently by different objects. Polymorphism <<interface>> Asset getValue(); Stock getValue() ; Bond getValue(); Mutual Fund getValue();
Polymorphism Polymorphism The ability of a reference variable to change behavior according to what object it is holding. This allows multiple objects of different subclasses to be treated as objects of a single superclass, while automatically selecting the proper methods to apply to a particular object based on the subclass it belongs to.  To illustrate polymorphism, let us discuss an example.
Polymorphism Given the parent class Person and the subclass Student of the previous examples, we add another subclass of Person which is Employee.  Below is the class hierarchy for that,
Polymorphism In Java, we can create a reference that is of type superclass to an object of its subclass. For example,  public static main( String[] args ) { Person  ref;  Student studentObject = new Student();  Employee employeeObject = new Employee();  ref = studentObject; //Person reference points to a  // Student object  }
Polymorphism Now suppose we have a  getName  method in our superclass Person, and we override this method in both the subclasses Student and Employee. public class Student {  public String getName(){  System.out.println(“Student Name:” + name);  return name;  } }  public class Employee {  public String getName(){  System.out.println(“Employee Name:” + name);  return name;  }  }
Polymorphism Going back to our main method, when we try to call the getName method of the reference Person ref, the getName method of the Student object will be called.  Now, if we assign ref to an Employee object, the getName method of Employee will be called.
Polymorphism public static main( String[] args ) { Person  ref;  Student studentObject = new Student();  Employee employeeObject = new Employee();  ref = studentObject; //Person ref. points to a  // Student object  //getName of Student class is called  String temp=ref.getName(); System.out.println( temp );  ref = employeeObject; //Person ref. points to an  // Employee object  //getName of Employee class is called  String temp = ref.getName(); System.out.println( temp );  }
Polymorphism Another example that illustrates polymorphism is when we try to pass references to methods. Suppose we have a static method  printInformation  that takes in a Person reference as parameter.  public static  printInformation( Person p ) { . . . . }
Polymorphism We can actually pass a reference of type Employee and type Student to the printInformation method as long as it is a subclass of the class Person. public static main( String[] args ) { Student studentObject = new Student(); Employee employeeObject = new Employee(); printInformation( studentObject ); printInformation( employeeObject ); }
It formalizes polymorphism.  It defines polymorphism in a declarative way, unrelated to implementation. It is the key to the  plug-n-play  ability of an architecture. Interface
It is a special form of association that models a whole-part relationship between an aggregate (whole) and its parts. Aggregation Team Athletes
Summary Object Technologies Objects Object's State Object's Behavior Object's Identity Four Basic Principles of Object-orientation Abstraction Encapsulation Modularity Hierarchy
Ad

More Related Content

What's hot (20)

Chapter2 risk management process
Chapter2  risk management processChapter2  risk management process
Chapter2 risk management process
Dr Riyaz Muhmmad
 
Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)
Luzan Baral
 
C# Unit 2 notes
C# Unit 2 notesC# Unit 2 notes
C# Unit 2 notes
Sudarshan Dhondaley
 
The National Cyber Security Strategy 2016 to 2021 sets out the government's p...
The National Cyber Security Strategy 2016 to 2021 sets out the government's p...The National Cyber Security Strategy 2016 to 2021 sets out the government's p...
The National Cyber Security Strategy 2016 to 2021 sets out the government's p...
at MicroFocus Italy ❖✔
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)
Manoj Reddy
 
Uml class Diagram
Uml class DiagramUml class Diagram
Uml class Diagram
Satyamevjayte Haxor
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
university of education,Lahore
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
bhupendra kumar
 
SAD11 - Sequence Diagrams
SAD11 - Sequence DiagramsSAD11 - Sequence Diagrams
SAD11 - Sequence Diagrams
Michael Heron
 
Spm
Spm Spm
Spm
Suresh Kumar
 
C presentation
C presentationC presentation
C presentation
APSMIND TECHNOLOGY PVT LTD.
 
Java kurs
Java kursJava kurs
Java kurs
RaynaITSTEP
 
Understanding asset management
Understanding asset managementUnderstanding asset management
Understanding asset management
afamcapital
 
C# lecture 1: Introduction to Dot Net Framework
C# lecture 1: Introduction to Dot Net FrameworkC# lecture 1: Introduction to Dot Net Framework
C# lecture 1: Introduction to Dot Net Framework
Dr.Neeraj Kumar Pandey
 
SE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELSSE CHAPTER 2 PROCESS MODELS
SE CHAPTER 2 PROCESS MODELS
Abrar ali
 
Design patterns
Design patternsDesign patterns
Design patterns
abhisheksagi
 
Risk analysis
Risk analysis Risk analysis
Risk analysis
tabirsir
 
Module 3 remote method invocation-2
Module 3   remote method  invocation-2Module 3   remote method  invocation-2
Module 3 remote method invocation-2
Ankit Dubey
 
C# operators
C# operatorsC# operators
C# operators
baabtra.com - No. 1 supplier of quality freshers
 
Capability Maturity Model
Capability Maturity ModelCapability Maturity Model
Capability Maturity Model
Uzair Akram
 

Viewers also liked (20)

Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
Komal Singh
 
Cs690 object oriented_software_engineering_team01_ report
Cs690 object oriented_software_engineering_team01_ reportCs690 object oriented_software_engineering_team01_ report
Cs690 object oriented_software_engineering_team01_ report
Khushboo Wadhwani
 
Object Oriented Concept
Object Oriented ConceptObject Oriented Concept
Object Oriented Concept
smj
 
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
op205
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
Mahesh Bhalerao
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
BG Java EE Course
 
Javaprogbasics
JavaprogbasicsJavaprogbasics
Javaprogbasics
cristiandinca69
 
A project report on libray mgt system
A project report on libray mgt system A project report on libray mgt system
A project report on libray mgt system
ashvan710883
 
Oop principles a good book
Oop principles a good bookOop principles a good book
Oop principles a good book
lahorisher
 
Object-Oriented Concepts
Object-Oriented ConceptsObject-Oriented Concepts
Object-Oriented Concepts
Abdalla Mahmoud
 
Library management system
Library management systemLibrary management system
Library management system
SHARDA SHARAN
 
Jedi course notes intro to programming 1
Jedi course notes intro to programming 1Jedi course notes intro to programming 1
Jedi course notes intro to programming 1
aehj02
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10
Kuwait10
 
Qtp Object Identification
Qtp Object IdentificationQtp Object Identification
Qtp Object Identification
virtualkey
 
Trabalho De Ingles
Trabalho De InglesTrabalho De Ingles
Trabalho De Ingles
guesta66cf0
 
Hands-on Guide to Object Identification
Hands-on Guide to Object IdentificationHands-on Guide to Object Identification
Hands-on Guide to Object Identification
Dharmesh Vaya
 
Object Oriented Concept Static vs. Non Static
Object Oriented Concept Static vs. Non StaticObject Oriented Concept Static vs. Non Static
Object Oriented Concept Static vs. Non Static
Abdul Rahman Sherzad
 
432
432432
432
Sushath SimplytheBest
 
Studentmanagementsystem
StudentmanagementsystemStudentmanagementsystem
Studentmanagementsystem
1amitgupta
 
TD-635-02-PSBO
TD-635-02-PSBOTD-635-02-PSBO
TD-635-02-PSBO
Tino Dwiantoro
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
Komal Singh
 
Cs690 object oriented_software_engineering_team01_ report
Cs690 object oriented_software_engineering_team01_ reportCs690 object oriented_software_engineering_team01_ report
Cs690 object oriented_software_engineering_team01_ report
Khushboo Wadhwani
 
Object Oriented Concept
Object Oriented ConceptObject Oriented Concept
Object Oriented Concept
smj
 
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
op205
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
Mahesh Bhalerao
 
A project report on libray mgt system
A project report on libray mgt system A project report on libray mgt system
A project report on libray mgt system
ashvan710883
 
Oop principles a good book
Oop principles a good bookOop principles a good book
Oop principles a good book
lahorisher
 
Object-Oriented Concepts
Object-Oriented ConceptsObject-Oriented Concepts
Object-Oriented Concepts
Abdalla Mahmoud
 
Library management system
Library management systemLibrary management system
Library management system
SHARDA SHARAN
 
Jedi course notes intro to programming 1
Jedi course notes intro to programming 1Jedi course notes intro to programming 1
Jedi course notes intro to programming 1
aehj02
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10
Kuwait10
 
Qtp Object Identification
Qtp Object IdentificationQtp Object Identification
Qtp Object Identification
virtualkey
 
Trabalho De Ingles
Trabalho De InglesTrabalho De Ingles
Trabalho De Ingles
guesta66cf0
 
Hands-on Guide to Object Identification
Hands-on Guide to Object IdentificationHands-on Guide to Object Identification
Hands-on Guide to Object Identification
Dharmesh Vaya
 
Object Oriented Concept Static vs. Non Static
Object Oriented Concept Static vs. Non StaticObject Oriented Concept Static vs. Non Static
Object Oriented Concept Static vs. Non Static
Abdul Rahman Sherzad
 
Studentmanagementsystem
StudentmanagementsystemStudentmanagementsystem
Studentmanagementsystem
1amitgupta
 
Ad

Similar to Jedi slides 2.1 object-oriented concepts (20)

Oops
OopsOops
Oops
Sankar Balasubramanian
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
talha ijaz
 
My c++
My c++My c++
My c++
snathick
 
Oop features java presentationshow
Oop features java presentationshowOop features java presentationshow
Oop features java presentationshow
ilias ahmed
 
Classes2
Classes2Classes2
Classes2
phanleson
 
Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
Sudip Simkhada
 
JAVA-PPT'S.pdf
JAVA-PPT'S.pdfJAVA-PPT'S.pdf
JAVA-PPT'S.pdf
AnmolVerma363503
 
OOPS IN PHP.pptx
OOPS IN PHP.pptxOOPS IN PHP.pptx
OOPS IN PHP.pptx
rani marri
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
Sangharsh agarwal
 
Introduction to OOP with PHP
Introduction to OOP with PHPIntroduction to OOP with PHP
Introduction to OOP with PHP
Michael Peacock
 
Java: Inheritance
Java: InheritanceJava: Inheritance
Java: Inheritance
Tareq Hasan
 
Learn C# Programming - Classes & Inheritance
Learn C# Programming - Classes & InheritanceLearn C# Programming - Classes & Inheritance
Learn C# Programming - Classes & Inheritance
Eng Teong Cheah
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1
Synapseindiappsdevelopment
 
Review oop and ood
Review oop and oodReview oop and ood
Review oop and ood
than sare
 
C# program structure
C# program structureC# program structure
C# program structure
baabtra.com - No. 1 supplier of quality freshers
 
Object Oriented Javascript part2
Object Oriented Javascript part2Object Oriented Javascript part2
Object Oriented Javascript part2
Usman Mehmood
 
oops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdfoops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdf
ArpitaJana28
 
Fundamentals of oops in .Net
Fundamentals of oops in .NetFundamentals of oops in .Net
Fundamentals of oops in .Net
Harman Bajwa
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
ACCESS Health Digital
 
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
AnkurSingh340457
 
Ad

Recently uploaded (20)

The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
AI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdfAI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdf
Precisely
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
IT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information TechnologyIT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information Technology
SHEHABALYAMANI
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of ExchangesJignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah Innovator
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
AI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdfAI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdf
Precisely
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
IT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information TechnologyIT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information Technology
SHEHABALYAMANI
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of ExchangesJignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah Innovator
 

Jedi slides 2.1 object-oriented concepts

  • 1. Object-oriented Concepts TOPIC ONE Object-oriented Software Engineering
  • 2. Object-oriented Software Engineering Object-oriented Software Engineering is the use of object technologies in building software.
  • 3. Pressman, 1997 Object technologies is often used to encompass all aspects of an object-oriented view and includes analysis, design, and testing methods; programming languages; tools; databases; and applications that are created using object-oriented approach. Taylor, 1997, Object Technology Object technology is a set of principles guiding software construction together with languages, databases, and other tools that support those principles. Object Technology
  • 4. It leads to reuse, and reuse (of program components) leads to faster software development and higher-quality programs. It leads to higher maintainability of software modules because its structure is inherently decoupled. It leads to object-oriented system that are easier to adapt and easier to scale, ie, large systems are created by assembling reusable subsystems. Benefits of Object Technology
  • 5. It is a representation of an entity either physical, conceptual, or software. It allows software developers to represent real-world concepts in their software design. Object
  • 6. It is an entity with a well-defined boundary and identity that encapsulates state and behavior. Object
  • 7. It is one of the possible conditions that an object may exists in. It is implemented by a set of properties called attributes , along with its values and the links it may have on other objects. Object's State
  • 8. It determines how an object acts and reacts. It is represented by the operations that the object can perform. Object's Behavior
  • 9. Although two objects may share the same state (attributes and relationships), they are separate, independent objects with their own unique identity. Object's Identity
  • 10. Abstraction Encapsulation Modularity Hierarchy Four Basic Principles of Object-orientation
  • 11. Abstraction is a kind of representation that includes only the things that are important or interesting from a particular point of view. It is the process of emphasizing the commonalities while removing distinctions. It allows us to manage complexity systems by concentrating on the essential characteristics that distinguish it from all other kinds of systems. It is domain and perspective dependent. Abstraction
  • 12. Sample Abstraction An applicant submits a club membership application to the club staff. A club staff schedules an applicant for the mock try-outs. A coach assigns an athlete to a squad. A squad can be a training or competing squad. Teams are formed from a squad.
  • 13. Encapsulation localizes features of an entity into a single blackbox abstraction, and hides the implementation of these features behind a single interface. It is also known as information-hiding ; it allows users to use the object without knowing how the implementation fulfils the interface. It offers two kinds of protection: it protects the object's state from being corrupted and client code from changes in the object's implementation. Encapsulation
  • 14. Encapsulation Illustrated Joel Santos is assigned to the Training Squad. The key is in the message interface . updateSquad(“Training”)
  • 15. Modularity is the physical and logical decomposition of large and complex things into smaller and manageable components that achieve the software engineering goals. It is about breaking up a large chunk of a system into small and manageable subsystems. The subsystems can be independently developed as long as their interactions are well understood. Modularity
  • 16. Modularity Illustrated Ang Bulilit Liga Squad and Team System Club Membership Maintenance System Coach Information Maintenance System Squad and Team Maintenance System
  • 17. Any ranking or ordering of abstractions into a tree-like structure. Kinds of Hierarchy Aggregation Class Containment Inheritance Partition Specialization Type Hierarchy
  • 18. Hierarchy Illustrated Squad Training Squad Competing Squad
  • 19. It is a form of association wherein one class shares the structure and/or behavior of one or more classes. It defines a hierarchy of abstractions in which a subclass inherits from one or more superclasses. Single Inheritance Multiple Inheritance It is an is a kind of relationship. Generalization
  • 20. It is a mechanism by which more-specific elements incorporate the structure and behavior of more-general elements. A class inherits attributes, operations and relationship. Inheritance Squad Name Coach MemberList listMembers() changeCoach() Training Squad Competing Squad
  • 21. Inheritance In Java, all classes, including the classes that make up the Java API, are subclassed from the Object superclass. A sample class hierarchy is shown below. Superclass Any class above a specific class in the class hierarchy. Subclass Any class below a specific class in the class hierarchy.
  • 22. Inheritance Superclass Any class above a specific class in the class hierarchy. Subclass Any class below a specific class in the class hierarchy.
  • 23. Inheritance Benefits of Inheritance in OOP : Reusability Once a behavior (method) is defined in a superclass, that behavior is automatically inherited by all subclasses. Thus, you can encode a method only once and they can be used by all subclasses. A subclass only needs to implement the differences between itself and the parent.
  • 24. Inheritance To derive a class, we use the extends keyword. In order to illustrate this, let's create a sample parent class. Suppose we have a parent class called Person. public class Person { protected String name; protected String address; /** * Default constructor */ public Person(){ System.out.println(“Inside Person:Constructor”); name = &quot;&quot;; address = &quot;&quot;; } . . . . }
  • 25. Inheritance Now, we want to create another class named Student. Since a student is also a person, we decide to just extend the class Person, so that we can inherit all the properties and methods of the existing class Person. To do this, we write, public class Student extends Person { public Student(){ System.out.println(“Inside Student:Constructor”); } . . . . }
  • 26. Inheritance When a Student object is instantiated, the default constructor of its superclass is invoked implicitly to do the necessary initializations. After that, the statements inside the subclass's constructor are executed.
  • 27. Inheritance: To illustrate this, consider the following code, In the code, we create an object of class Student. The output of the program is, public static void main( String[] args ){ Student anna = new Student(); } I nside Person:Constructor Inside Student:Constructor
  • 28. Inheritance The program flow is shown below.
  • 29. The “super” keyword A subclass can also explicitly call a constructor of its immediate superclass. This is done by using the super constructor call. A super constructor call in the constructor of a subclass will result in the execution of relevant constructor from the superclass, based on the arguments passed.
  • 30. The “super” keyword For example, given our previous example classes Person and Student, we show an example of a super constructor call. Given the following code for Student, public Student(){ super( &quot;SomeName&quot;, &quot;SomeAddress&quot; ); System.out.println(&quot;Inside Student:Constructor&quot;); }
  • 31. The “super” keyword Few things to remember when using the super constructor call: The super() call MUST OCCUR AS THE FIRST STATEMENT IN A CONSTRUCTOR. The super() call can only be used in a constructor definition. This implies that the this() construct and the super() calls CANNOT BOTH OCCUR IN THE SAME CONSTRUCTOR.
  • 32. The “super” keyword Another use of super is to refer to members of the superclass (just like the this reference ). For example, public Student() { super.name = “somename”; super.address = “some address”; }
  • 33. Overriding methods If for some reason a derived class needs to have a different implementation of a certain method from that of the superclass, overriding methods could prove to be very useful. A subclass can override a method defined in its superclass by providing a new implementation for that method.
  • 34. Example Suppose we have the following implementation for the getName method in the Person superclass, public class Person { : : public String getName(){ System.out.println(&quot;Parent: getName&quot;); return name; } }
  • 35. Example To override, the getName method of the superclass Person, we write in the subclass Student, Now, when we invoke the getName method of an object of the subclass Student , the overridden getName method would be called, and the output would be, public class Student extends Person{ : : public String getName(){ System.out.println(&quot;Student: getName&quot;); return name; } : } Student: getName
  • 36. Final Classes Final Classes Classes that cannot be extended To declare final classes, we write, public final ClassName{ . . . } Example: Other examples of final classes are your wrapper classes and Strings. public final class Person { . . . }
  • 37. Final Methods and Classes Final Methods Methods that cannot be overridden To declare final methods, we write, public final [returnType] [methodName]([parameters]){ . . . } Static methods are automatically final.
  • 38. Example public final String getName(){ return name; }
  • 39. It is the ability to hide many different implementation behind a single interface. It allows the same message to be handled differently by different objects. Polymorphism <<interface>> Asset getValue(); Stock getValue() ; Bond getValue(); Mutual Fund getValue();
  • 40. Polymorphism Polymorphism The ability of a reference variable to change behavior according to what object it is holding. This allows multiple objects of different subclasses to be treated as objects of a single superclass, while automatically selecting the proper methods to apply to a particular object based on the subclass it belongs to. To illustrate polymorphism, let us discuss an example.
  • 41. Polymorphism Given the parent class Person and the subclass Student of the previous examples, we add another subclass of Person which is Employee. Below is the class hierarchy for that,
  • 42. Polymorphism In Java, we can create a reference that is of type superclass to an object of its subclass. For example, public static main( String[] args ) { Person ref; Student studentObject = new Student(); Employee employeeObject = new Employee(); ref = studentObject; //Person reference points to a // Student object }
  • 43. Polymorphism Now suppose we have a getName method in our superclass Person, and we override this method in both the subclasses Student and Employee. public class Student { public String getName(){ System.out.println(“Student Name:” + name); return name; } } public class Employee { public String getName(){ System.out.println(“Employee Name:” + name); return name; } }
  • 44. Polymorphism Going back to our main method, when we try to call the getName method of the reference Person ref, the getName method of the Student object will be called. Now, if we assign ref to an Employee object, the getName method of Employee will be called.
  • 45. Polymorphism public static main( String[] args ) { Person ref; Student studentObject = new Student(); Employee employeeObject = new Employee(); ref = studentObject; //Person ref. points to a // Student object //getName of Student class is called String temp=ref.getName(); System.out.println( temp ); ref = employeeObject; //Person ref. points to an // Employee object //getName of Employee class is called String temp = ref.getName(); System.out.println( temp ); }
  • 46. Polymorphism Another example that illustrates polymorphism is when we try to pass references to methods. Suppose we have a static method printInformation that takes in a Person reference as parameter. public static printInformation( Person p ) { . . . . }
  • 47. Polymorphism We can actually pass a reference of type Employee and type Student to the printInformation method as long as it is a subclass of the class Person. public static main( String[] args ) { Student studentObject = new Student(); Employee employeeObject = new Employee(); printInformation( studentObject ); printInformation( employeeObject ); }
  • 48. It formalizes polymorphism. It defines polymorphism in a declarative way, unrelated to implementation. It is the key to the plug-n-play ability of an architecture. Interface
  • 49. It is a special form of association that models a whole-part relationship between an aggregate (whole) and its parts. Aggregation Team Athletes
  • 50. Summary Object Technologies Objects Object's State Object's Behavior Object's Identity Four Basic Principles of Object-orientation Abstraction Encapsulation Modularity Hierarchy
  翻译: