• Save
Dacj 1-1 b
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Dacj 1-1 b

on

  • 1,253 views

 

Statistics

Views

Total Views
1,253
Views on SlideShare
1,196
Embed Views
57

Actions

Likes
0
Downloads
0
Comments
0

3 Embeds 57

http://niitcourseslides.blogspot.in 55
http://niitcourseslides.blogspot.com 1
http://niitcourseslides.blogspot.sg 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Dacj 1-1 b Presentation Transcript

  • 1. Concept of OOPSPre-Assessment Questions1. Which languages use the procedural programming methodology? a. Pascal, Java b. FORTRAN, C c. C, Java d. Pascal, C2. Which language uses the simple sequential programming methodology? a. C b. Java c. FORTRAN d. Pascal ©NIIT Java Fundamentals Lesson 1B / Slide 1 of 29
  • 2. Concept of OOPSPre-Assessment Questions (Contd.)3. What is the acronym for OOP? a. Object Oriented Programming b. Object Orientation programming c. Object Oriented Program d. Object Oriented Procedure4. The acronym for the procedural language COBOL is -----------------------------. a. Common Object Business Oriented Language b. COmmon Business Oriented Language c. Common Object Business Object Language d. Common Object Business Optimized Language ©NIIT Java Fundamentals Lesson 1B / Slide 2 of 29
  • 3. Concept of OOPSPre-Assessment Questions (Contd.)5. Which language is a Object Oriented Programming language?e. Basicf. COBOLg. Javah. C ©NIIT Java Fundamentals Lesson 1B / Slide 3 of 29
  • 4. Concept of OOPSSolutions to Pre-AssessmentQuestions4. d. Pascal, C5. c. FORTRAN6. a. Object Oriented Programming7. b. COmmon Business Oriented Language8. c. Java ©NIIT Java Fundamentals Lesson 1B / Slide 4 of 29
  • 5. Concept of OOPSObjectives In this lesson, you will learn to: • Identify the features of object-oriented programming • Encapsulation • Abstraction • Inheritance • Polymorphism ©NIIT Java Fundamentals Lesson 1B / Slide 5 of 29
  • 6. Concept of OOPSFeatures of Object-OrientedProgramming • Encapsulation • Grady Booch, defined the encapsulation feature as: “Encapsulation is the process of hiding all of the details of an object that do not contribute to its essential characteristics.” • Encapsulation is the feature that provides security to the data as well as the methods of a class. ©NIIT Java Fundamentals Lesson 1B / Slide 6 of 29
  • 7. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Abstraction • Grady Booch defined the encapsulation feature as: “An Abstraction denotes the essential characteristics of an object that distinguishes it from all other kinds of objects and thus provides crisply defined conceptual boundaries, relative to the perspective of the viewer.” • Abstraction refers to the attributes of an object that clearly demarcates it from other objects. • The concept of abstraction is implemented in object-oriented programming by creating classes. • Encapsulation hides the irrelevant details of an object and abstraction makes only the relevant details of an object visible. ©NIIT Java Fundamentals Lesson 1B / Slide 7 of 29
  • 8. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Inheritance: • Enables you to extend the functionality of an existing class. • Enables you to add new features and functionality to an existing class without modifying the existing class. • Enables you to share data and methods among multiple classes. ©NIIT Java Fundamentals Lesson 1B / Slide 8 of 29
  • 9. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Superclass and Subclass • A superclass or parent class is the one from which another class inherits attributes and behavior. • A subclass or child class is a class that inherits attributes and behavior from a superclass. ©NIIT Java Fundamentals Lesson 1B / Slide 9 of 29
  • 10. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) ©NIIT Java Fundamentals Lesson 1B / Slide 10 of 29
  • 11. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Relationships Between Classes • Kind-of • Is-a • Part-of • Has-a ©NIIT Java Fundamentals Lesson 1B / Slide 11 of 29
  • 12. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Kind-of • A subclass always inherits the attributes of the superclass. Confirmed Ticket Ticket Kind-of ©NIIT Java Fundamentals Lesson 1B / Slide 12 of 29
  • 13. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Kind-of (Contd.) • Washing machine is a kind of household commodity and depicts the kind-of relationship. ©NIIT Java Fundamentals Lesson 1B / Slide 13 of 29
  • 14. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Is-a Relationship • Relationship between objects of superclass and subclass is referred to as an is-a relationship. Confirmed Ticket Is-A Kind of Ticket for Ticket New York Is-A ©NIIT Java Fundamentals Lesson 1B / Slide 14 of 29
  • 15. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Is-a Relationship (Contd.) • The is-a relationship between the Cleanwash class and Washing Machine class. ©NIIT Java Fundamentals Lesson 1B / Slide 15 of 29
  • 16. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Part-of Relationship • When a class is an element of another class, it depicts the part- of relationship. Address Student Part of ©NIIT Java Fundamentals Lesson 1B / Slide 16 of 29
  • 17. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Part-of Relationship (Contd.) • A spinner being a part of washing machine depicts the part-of relationship between the spinner and the washing machine class. ©NIIT Java Fundamentals Lesson 1B / Slide 17 of 29
  • 18. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Has-a Relationship • Is reverse of the part-of relationship. • The has-a relationship is also known as aggregation or composition. Student Has-a Address Detail ©NIIT Java Fundamentals Lesson 1B / Slide 18 of 29
  • 19. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Has-a Relationship (Contd.) • A washing machine has a spinner and depicts the has-a relationship between the Washing Machine and Color class. ©NIIT Java Fundamentals Lesson 1B / Slide 19 of 29
  • 20. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Types of Inheritance ©NIIT Java Fundamentals Lesson 1B / Slide 20 of 29
  • 21. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Types of Inheritance (Contd.) • Single inheritance • Multiple inheritance ©NIIT Java Fundamentals Lesson 1B / Slide 21 of 29
  • 22. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Types of Inheritance(Contd.) • Single inheritance Subclass is derived from only one superclass. ©NIIT Java Fundamentals Lesson 1B / Slide 22 of 29
  • 23. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Types of Inheritance (Contd.) • Single inheritance ©NIIT Java Fundamentals Lesson 1B / Slide 23 of 29
  • 24. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Types of Inheritance(Contd.) • Multiple inheritance A subclass is derived from more than one super class. ©NIIT Java Fundamentals Lesson 1B / Slide 24 of 29
  • 25. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Types of Inheritance (Contd.) • Multiple inheritance ©NIIT Java Fundamentals Lesson 1B / Slide 25 of 29
  • 26. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Types of Inheritance (Contd.) • Multiple inheritance Single Inheritance Multiple Inheritance ©NIIT Java Fundamentals Lesson 1B / Slide 26 of 29
  • 27. Concept of OOPSFeatures of Object-OrientedProgramming(Contd.) • Polymorphism • Derived from two Latin words-Poly, which means many, and morph, which means forms. ©NIIT Java Fundamentals Lesson 1B / Slide 27 of 29
  • 28. Concept of OOPSSummary • In this lesson, you learned: • Encapsulation- Hides the implementation details of an object and therefore hides its complexity. • Abstraction- Focuses on the essential features of an object. • Inheritance- Creates a hierarchy of classes and helps in reuse of attributes and methods of a class. • The relationship among the classes can be classified as: • Kind-of • Is-a • Part-of • Has-a • A superclass shares its attributes and behavior with its child classes. • A subclass inherits its attributes and behavior from parent classes. ©NIIT Java Fundamentals Lesson 1B / Slide 28 of 29
  • 29. Concept of OOPSSummary(Contd.) • There are two types of inheritance: • Single inheritance- A class inherits attributes from only one superclass. • Multiple inheritance- A class inherits attributes from two or more superclasses. • Polymorphism- Assigns a different meaning or usage to an entity in different contexts. ©NIIT Java Fundamentals Lesson 1B / Slide 29 of 29