SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Introduction to Object-Oriented Approach

Objectives
In this lesson, you will learn to:
 State the reasons for the complexity involved in the
  development of software
 Define the following terms
     Objects
     Classes
     Messages
     Methods
 Explain benefits of the object-oriented approach

©NIIT                                OOPS/Lesson 1/Slide 1 of 35
Introduction to Object-Oriented Approach

Objectives (Contd.)
 State the significance of the activities involved in
  object-oriented analysis and design
 Create classes in C++




©NIIT                                  OOPS/Lesson 1/Slide 2 of 35
Introduction to Object-Oriented Approach

Complexity of the Software System
 Internal Complexity
     Arises from the composition of a system itself
 External Complexity
     Arises from the fact that users themselves have
      only a vague idea of how their system works and
      have difficulty in expressing their requirements




©NIIT                                 OOPS/Lesson 1/Slide 3 of 35
Introduction to Object-Oriented Approach

Reasons for the Complexity Involved in the
Development of Software
 Difficulty in managing the software development
  process
 Lack of standards for developing software
 Difficulty in predicting software behavior




©NIIT                                  OOPS/Lesson 1/Slide 4 of 35
Introduction to Object-Oriented Approach

Simplifying Complexity
 Is done by breaking the system into its component
  parts and arranging them in a hierarchy




©NIIT                               OOPS/Lesson 1/Slide 5 of 35
Introduction to Object-Oriented Approach

Just a Minute…
Jane has called a technician to repair her television. How
would the technician deal with the complexity of the
television?




©NIIT                                 OOPS/Lesson 1/Slide 6 of 35
Introduction to Object-Oriented Approach

Object
 Is an instance of a class that exhibits some well-
  defined behavior




©NIIT                                 OOPS/Lesson 1/Slide 7 of 35
Introduction to Object-Oriented Approach

Characteristics of Objects
 State
     Is indicated by a set of attributes and the values of
      these attributes
 Behavior
     Is indicated by how an object acts and reacts
 Identity
     Distinguishes the object from all other objects




©NIIT                                  OOPS/Lesson 1/Slide 8 of 35
Introduction to Object-Oriented Approach

Just a Minute…
Identify the possible attributes to define the state of the
following objects:
      Tea cup
     Stereo tape-recorder




©NIIT                                   OOPS/Lesson 1/Slide 9 of 35
Introduction to Object-Oriented Approach

Classes
 Define the attributes and behaviors of an object
 Example:



                        B IR D S


  PEACO CK           SPARRO W            K IN G F IS H E R




©NIIT                               OOPS/Lesson 1/Slide 10 of 35
Introduction to Object-Oriented Approach

Messages and Methods
Messages:
 Are transmitted by one object to another
 Are transmitted as requests for an action to be taken
 Are accompanied by additional information needed to
  carry out the request




©NIIT                               OOPS/Lesson 1/Slide 11 of 35
Introduction to Object-Oriented Approach

Messages and Methods (Contd.)
Methods:
 Are a set of actions taken by the receiver object in
  response to the request




©NIIT                                OOPS/Lesson 1/Slide 12 of 35
Introduction to Object-Oriented Approach

Just a Minute…
Dr. James and Mr. Hyde went to the railway station to
book two tickets in the Flying express for 3rd December
by AC 1st class. Identify the following:
a.The possible receiver of the message in this situation
b.The possible method that the receiver can use




©NIIT                                OOPS/Lesson 1/Slide 13 of 35
Introduction to Object-Oriented Approach

Benefits of the Object-Oriented Approach
 Realistic modeling
     Easy to use
 Reusability
     Saves time and cost




©NIIT                         OOPS/Lesson 1/Slide 14 of 35
Introduction to Object-Oriented Approach

Just a Minute…
State whether the following situations demonstrate
reusability:
a. Recycling paper
b. Pump reusability (same pump is used in a well and in
   a fuel station)




©NIIT                               OOPS/Lesson 1/Slide 15 of 35
Introduction to Object-Oriented Approach

Benefits of Object-Oriented Approach (Contd.)
 Resilience to change
     Easy to maintain
     Parts of the system can be refined without any
      major change in other parts




©NIIT                               OOPS/Lesson 1/Slide 16 of 35
Introduction to Object-Oriented Approach

Object-Oriented Analysis (OOA)
Analysis:
 Is a phase where users and developers get together
  and arrive at a common understanding of the system
 Requires the developer to concentrate on obtaining
  maximum possible information about the problem
  domain
 Results in one of the end products as specification of
  the function of the system




©NIIT                                OOPS/Lesson 1/Slide 17 of 35
Introduction to Object-Oriented Approach

Object-Oriented Design (OOD)
Design:
 Generates the blueprint of the system that has to be
  implemented
 Involves identifying classes using
     Abbott’s technique




©NIIT                                  OOPS/Lesson 1/Slide 18 of 35
Introduction to Object-Oriented Approach

Object-Oriented Design (OOD) (Contd.)
 Abbott’s technique follows the listed steps:
     Write English description of the problem
     Underline nouns (nouns represent candidate
      classes)




©NIIT                                OOPS/Lesson 1/Slide 19 of 35
Introduction to Object-Oriented Approach

Object-Oriented Programming (OOP)
 Is a way of writing programs
 Some applications built using OOP techniques are:
     Computer-Aided Design (CAD)
     Computer-Aided Manufacturing (CAM)
     Artificial Intelligence (AI) and Expert Systems
     Object-Oriented Databases




©NIIT                                 OOPS/Lesson 1/Slide 20 of 35
Introduction to Object-Oriented Approach

Just a Minute…
As a member of a team that is developing the billing
system software for Diaz Telecommunications Inc., you
have been assigned the task of creating a software
module that accepts and displays customer details.
Identify the class that you will create and the methods of
the class.




©NIIT                                 OOPS/Lesson 1/Slide 21 of 35
Introduction to Object-Oriented Approach

Generations of Computer Languages
 First generation
 Second generation
 Third generation




©NIIT                         OOPS/Lesson 1/Slide 22 of 35
Introduction to Object-Oriented Approach

Evolution of C++ as an Object Oriented
Programming Language
 In the early 1980s, Bjarne Stroustrup developed the
  C++ language
 C++ was originally known as 'C with classes'




©NIIT                               OOPS/Lesson 1/Slide 23 of 35
Introduction to Object-Oriented Approach

Creating Classes in C++
Sample:
  class Car
  {
    public:
    void honk()
    {
      coutBEEP BEEP!;
    }
  };




©NIIT                         OOPS/Lesson 1/Slide 24 of 35
Introduction to Object-Oriented Approach

Creating Classes in C++ (Contd.)
 The class keyword
     Is used to declare a class
        Example:
        class Car
        {
        ...

        };




©NIIT                              OOPS/Lesson 1/Slide 25 of 35
Introduction to Object-Oriented Approach

Creating Classes in C++ (Contd.)
 Conventions for naming classes
     Should be meaningful
     Should ideally be a noun
     First letter of every word should be in upper case
 Rules for naming classes
     Must not contain any embedded space or symbol
     Must begin with a letter, which may be followed by
      a sequence of letters or digits
     Cannot be a keyword

©NIIT                                OOPS/Lesson 1/Slide 26 of 35
Introduction to Object-Oriented Approach

Creating Classes in C++ (Contd.)
 Member functions
     Are means of passing messages and responding
      to them
     Are declared inside the class body
        Example:
        class Car
        {
        void honk()
          {
          coutBEEP BEEP!;
          }
        };
©NIIT                               OOPS/Lesson 1/Slide 27 of 35
Introduction to Object-Oriented Approach

Creating Classes in C++ (Contd.)
 The cout object
     Is an instance of the pre-defined class, ostream
 The endl manipulator
     Is a command that takes the cursor to the new line




©NIIT                               OOPS/Lesson 1/Slide 28 of 35
Introduction to Object-Oriented Approach

Problem Statement 1.D.1
As a member of a team that is developing the billing
system software for Diaz Telecommunications Inc., you
have been assigned the task of creating a software
module that accepts and displays customer details.
Declare the Customer class and the member functions.
The member function to accept customer details should
display the message “Accepting Customer Details”.
Similarly, the member function to display customer
details on the screen should display the message
“Displaying Customer Details.”




©NIIT                             OOPS/Lesson 1/Slide 29 of 35
Introduction to Object-Oriented Approach

Problem Statement 1.D.1 (Contd.)
Solution:
    class Customer
    {
       void accept()
       {
       cout  “Accepting Customer Details” 
       endl;
       }
       void display()
       {
       cout  “Displaying Customer Details” 
       endl;
       }
    };

©NIIT                              OOPS/Lesson 1/Slide 30 of 35
Introduction to Object-Oriented Approach

Problem Statement 1.P.1
As a member of a team that is developing an automated
booking system for the Railways, you have been
assigned the task of creating a module that accepts the
details of a passenger and checks whether the ticket has
been confirmed or is in the waiting list. The module then
prints the list of confirmed passengers. Declare a class
Ticket, which consists of three member functions,
booking(), status(), and print().




©NIIT                                OOPS/Lesson 1/Slide 31 of 35
Introduction to Object-Oriented Approach

Summary
In this lesson, you learned that:
 Complexity of software arises mainly due to four
  reasons:
     Difficulty in understanding the intricacies and
      complexity of the system and its needs
     Communication problems during development
     Lack of standards for developing software
     Difficulty in predicting software behavior
 One way of dealing with the complexity of software is
  to break down an application into its components and
  deal with each component separately

©NIIT                                 OOPS/Lesson 1/Slide 32 of 35
Introduction to Object-Oriented Approach

Summary (Contd.)
 The object-oriented approach views the systems as
  consisting of component objects and looks at the
  interactions between them
 An object is an entity that may have a physical
  boundary and is also characterized by the following:
     State
     Behavior
     Identity
 A class consists of a set of objects that share a
  common structure and behavior
 If one object desires an action from another object, it
  sends a message to the second object
©NIIT                                 OOPS/Lesson 1/Slide 33 of 35
Introduction to Object-Oriented Approach

Summary (Contd.)
 The object that receives the message is called the
  receiver; the set of actions taken by the receiver
  constitutes the method
 The benefits of the object-oriented approach are:
     Realistic modelling, hence it is easier to use
     Reusability of code, hence it saves time and cost
     Resilience to change, hence systems are easier to
      maintain
 In the stages of analysis and design, a model of the
  system is built


©NIIT                                 OOPS/Lesson 1/Slide 34 of 35
Introduction to Object-Oriented Approach

Summary (Contd.)
 The purpose of the model built during analysis and
  design is to help developers understand the reality
  that they are trying to imitate
 Bjarne Stroustrup developed the C++ language in the
  early 1980s
 The cout object is an instance of the class, ostream
 The class ostream is associated with the standard
  output device (screen)
 The output operator '' is used to direct a value to
  the standard output device


©NIIT                                OOPS/Lesson 1/Slide 35 of 35

Weitere ähnliche Inhalte

Was ist angesagt?

08 iec t1_s1_oo_ps_session_11
08 iec t1_s1_oo_ps_session_1108 iec t1_s1_oo_ps_session_11
08 iec t1_s1_oo_ps_session_11Niit Care
 
Python-oop
Python-oopPython-oop
Python-oopRTS Tech
 
Sem1 plt xp_02
Sem1 plt xp_02Sem1 plt xp_02
Sem1 plt xp_02Niit Care
 
C# Summer course - Lecture 1
C# Summer course - Lecture 1C# Summer course - Lecture 1
C# Summer course - Lecture 1mohamedsamyali
 
Fundamentals of c programming
Fundamentals of c programmingFundamentals of c programming
Fundamentals of c programmingNYversity
 
04 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_0504 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_05Niit Care
 
10 iec t1_s1_oo_ps_session_14
10 iec t1_s1_oo_ps_session_1410 iec t1_s1_oo_ps_session_14
10 iec t1_s1_oo_ps_session_14Niit Care
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmeticIIUI
 
Bca 2nd sem u-2 classes & objects
Bca 2nd sem u-2 classes & objectsBca 2nd sem u-2 classes & objects
Bca 2nd sem u-2 classes & objectsRai University
 
06 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_0806 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_08Niit Care
 
Pinkle Makhijani ,BCA 2nd Year
Pinkle  Makhijani ,BCA 2nd YearPinkle  Makhijani ,BCA 2nd Year
Pinkle Makhijani ,BCA 2nd Yeardezyneecole
 
11 iec t1_s1_oo_ps_session_16
11 iec t1_s1_oo_ps_session_1611 iec t1_s1_oo_ps_session_16
11 iec t1_s1_oo_ps_session_16Niit Care
 

Was ist angesagt? (19)

08 iec t1_s1_oo_ps_session_11
08 iec t1_s1_oo_ps_session_1108 iec t1_s1_oo_ps_session_11
08 iec t1_s1_oo_ps_session_11
 
Python-oop
Python-oopPython-oop
Python-oop
 
Sem1 plt xp_02
Sem1 plt xp_02Sem1 plt xp_02
Sem1 plt xp_02
 
C# Summer course - Lecture 1
C# Summer course - Lecture 1C# Summer course - Lecture 1
C# Summer course - Lecture 1
 
Oops Quiz
Oops QuizOops Quiz
Oops Quiz
 
Fundamentals of c programming
Fundamentals of c programmingFundamentals of c programming
Fundamentals of c programming
 
04 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_0504 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_05
 
Unit i
Unit iUnit i
Unit i
 
10 iec t1_s1_oo_ps_session_14
10 iec t1_s1_oo_ps_session_1410 iec t1_s1_oo_ps_session_14
10 iec t1_s1_oo_ps_session_14
 
Constructor and destructor in C++
Constructor and destructor in C++Constructor and destructor in C++
Constructor and destructor in C++
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmetic
 
Problem solving methodology
Problem solving methodologyProblem solving methodology
Problem solving methodology
 
Bca 2nd sem u-2 classes & objects
Bca 2nd sem u-2 classes & objectsBca 2nd sem u-2 classes & objects
Bca 2nd sem u-2 classes & objects
 
06 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_0806 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_08
 
Pinkle Makhijani ,BCA 2nd Year
Pinkle  Makhijani ,BCA 2nd YearPinkle  Makhijani ,BCA 2nd Year
Pinkle Makhijani ,BCA 2nd Year
 
Computer programming questions
Computer programming questionsComputer programming questions
Computer programming questions
 
11 iec t1_s1_oo_ps_session_16
11 iec t1_s1_oo_ps_session_1611 iec t1_s1_oo_ps_session_16
11 iec t1_s1_oo_ps_session_16
 
How To Code in C#
How To Code in C#How To Code in C#
How To Code in C#
 
Daa chapter 1
Daa chapter 1Daa chapter 1
Daa chapter 1
 

Ähnlich wie Here is the class declaration and member functions to solve the problem:class Passenger { public: void acceptDetails() { cout << "Accepting passenger details" << endl; } void checkStatus() { cout << "Checking ticket status" << endl

Oose unit 3 ppt
Oose unit 3 pptOose unit 3 ppt
Oose unit 3 pptDr VISU P
 
Oer fc activity_constructor1
Oer fc activity_constructor1Oer fc activity_constructor1
Oer fc activity_constructor1ruikarsachin
 
Aae oop xp_03
Aae oop xp_03Aae oop xp_03
Aae oop xp_03Niit Care
 
OOSE Unit 3 PPT.ppt
OOSE Unit 3 PPT.pptOOSE Unit 3 PPT.ppt
OOSE Unit 3 PPT.pptitadmin33
 
Vb net xp_03
Vb net xp_03Vb net xp_03
Vb net xp_03Niit Care
 
Vb net xp_01
Vb net xp_01Vb net xp_01
Vb net xp_01Niit Care
 
A MDA-Compliant Environment for Developing User Interfaces of Information Sys...
A MDA-Compliant Environment for Developing User Interfaces of Information Sys...A MDA-Compliant Environment for Developing User Interfaces of Information Sys...
A MDA-Compliant Environment for Developing User Interfaces of Information Sys...Jean Vanderdonckt
 
Project1integrationmarch2015 150813165645-lva1-app6892
Project1integrationmarch2015 150813165645-lva1-app6892Project1integrationmarch2015 150813165645-lva1-app6892
Project1integrationmarch2015 150813165645-lva1-app6892gjj97
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT Ipkaviya
 
Project 1 integration march 2015
Project 1 integration march 2015Project 1 integration march 2015
Project 1 integration march 2015IAMLETTY
 
Project 1 integration march 2015
Project 1 integration march 2015Project 1 integration march 2015
Project 1 integration march 2015温 庄壁
 
ICI PROJECT 1 BRIEF
ICI PROJECT 1 BRIEFICI PROJECT 1 BRIEF
ICI PROJECT 1 BRIEFSheng Zhe
 
Project 1 integration march 2015
Project 1 integration march 2015Project 1 integration march 2015
Project 1 integration march 2015Pui Chun Shian
 
ICI Project 1 Brief
ICI Project 1 BriefICI Project 1 Brief
ICI Project 1 BriefCrystal Chia
 
Project 1 integration march 2015 (1)
Project 1 integration march 2015 (1)Project 1 integration march 2015 (1)
Project 1 integration march 2015 (1)howcyong1011
 
Project 1 integration march 2015 (2)
Project 1 integration march 2015 (2)Project 1 integration march 2015 (2)
Project 1 integration march 2015 (2)温 庄壁
 
Project 1 integration march 2015 (2)
Project 1 integration march 2015 (2)Project 1 integration march 2015 (2)
Project 1 integration march 2015 (2)brandonliaw97
 

Ähnlich wie Here is the class declaration and member functions to solve the problem:class Passenger { public: void acceptDetails() { cout << "Accepting passenger details" << endl; } void checkStatus() { cout << "Checking ticket status" << endl (20)

C++ Unit_01
C++ Unit_01C++ Unit_01
C++ Unit_01
 
Oose unit 3 ppt
Oose unit 3 pptOose unit 3 ppt
Oose unit 3 ppt
 
Dacj 1-1 c
Dacj 1-1 cDacj 1-1 c
Dacj 1-1 c
 
Oer fc activity_constructor1
Oer fc activity_constructor1Oer fc activity_constructor1
Oer fc activity_constructor1
 
Aae oop xp_03
Aae oop xp_03Aae oop xp_03
Aae oop xp_03
 
OOSE Unit 3 PPT.ppt
OOSE Unit 3 PPT.pptOOSE Unit 3 PPT.ppt
OOSE Unit 3 PPT.ppt
 
Vb net xp_03
Vb net xp_03Vb net xp_03
Vb net xp_03
 
Vb net xp_01
Vb net xp_01Vb net xp_01
Vb net xp_01
 
A MDA-Compliant Environment for Developing User Interfaces of Information Sys...
A MDA-Compliant Environment for Developing User Interfaces of Information Sys...A MDA-Compliant Environment for Developing User Interfaces of Information Sys...
A MDA-Compliant Environment for Developing User Interfaces of Information Sys...
 
Project1integrationmarch2015 150813165645-lva1-app6892
Project1integrationmarch2015 150813165645-lva1-app6892Project1integrationmarch2015 150813165645-lva1-app6892
Project1integrationmarch2015 150813165645-lva1-app6892
 
Assignment 1A
Assignment 1AAssignment 1A
Assignment 1A
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
 
Project 1 integration march 2015
Project 1 integration march 2015Project 1 integration march 2015
Project 1 integration march 2015
 
Project 1 integration march 2015
Project 1 integration march 2015Project 1 integration march 2015
Project 1 integration march 2015
 
ICI PROJECT 1 BRIEF
ICI PROJECT 1 BRIEFICI PROJECT 1 BRIEF
ICI PROJECT 1 BRIEF
 
Project 1 integration march 2015
Project 1 integration march 2015Project 1 integration march 2015
Project 1 integration march 2015
 
ICI Project 1 Brief
ICI Project 1 BriefICI Project 1 Brief
ICI Project 1 Brief
 
Project 1 integration march 2015 (1)
Project 1 integration march 2015 (1)Project 1 integration march 2015 (1)
Project 1 integration march 2015 (1)
 
Project 1 integration march 2015 (2)
Project 1 integration march 2015 (2)Project 1 integration march 2015 (2)
Project 1 integration march 2015 (2)
 
Project 1 integration march 2015 (2)
Project 1 integration march 2015 (2)Project 1 integration march 2015 (2)
Project 1 integration march 2015 (2)
 

Mehr von Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Kürzlich hochgeladen

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Here is the class declaration and member functions to solve the problem:class Passenger { public: void acceptDetails() { cout << "Accepting passenger details" << endl; } void checkStatus() { cout << "Checking ticket status" << endl

  • 1. Introduction to Object-Oriented Approach Objectives In this lesson, you will learn to: State the reasons for the complexity involved in the development of software Define the following terms Objects Classes Messages Methods Explain benefits of the object-oriented approach ©NIIT OOPS/Lesson 1/Slide 1 of 35
  • 2. Introduction to Object-Oriented Approach Objectives (Contd.) State the significance of the activities involved in object-oriented analysis and design Create classes in C++ ©NIIT OOPS/Lesson 1/Slide 2 of 35
  • 3. Introduction to Object-Oriented Approach Complexity of the Software System Internal Complexity Arises from the composition of a system itself External Complexity Arises from the fact that users themselves have only a vague idea of how their system works and have difficulty in expressing their requirements ©NIIT OOPS/Lesson 1/Slide 3 of 35
  • 4. Introduction to Object-Oriented Approach Reasons for the Complexity Involved in the Development of Software Difficulty in managing the software development process Lack of standards for developing software Difficulty in predicting software behavior ©NIIT OOPS/Lesson 1/Slide 4 of 35
  • 5. Introduction to Object-Oriented Approach Simplifying Complexity Is done by breaking the system into its component parts and arranging them in a hierarchy ©NIIT OOPS/Lesson 1/Slide 5 of 35
  • 6. Introduction to Object-Oriented Approach Just a Minute… Jane has called a technician to repair her television. How would the technician deal with the complexity of the television? ©NIIT OOPS/Lesson 1/Slide 6 of 35
  • 7. Introduction to Object-Oriented Approach Object Is an instance of a class that exhibits some well- defined behavior ©NIIT OOPS/Lesson 1/Slide 7 of 35
  • 8. Introduction to Object-Oriented Approach Characteristics of Objects State Is indicated by a set of attributes and the values of these attributes Behavior Is indicated by how an object acts and reacts Identity Distinguishes the object from all other objects ©NIIT OOPS/Lesson 1/Slide 8 of 35
  • 9. Introduction to Object-Oriented Approach Just a Minute… Identify the possible attributes to define the state of the following objects: Tea cup Stereo tape-recorder ©NIIT OOPS/Lesson 1/Slide 9 of 35
  • 10. Introduction to Object-Oriented Approach Classes Define the attributes and behaviors of an object Example: B IR D S PEACO CK SPARRO W K IN G F IS H E R ©NIIT OOPS/Lesson 1/Slide 10 of 35
  • 11. Introduction to Object-Oriented Approach Messages and Methods Messages: Are transmitted by one object to another Are transmitted as requests for an action to be taken Are accompanied by additional information needed to carry out the request ©NIIT OOPS/Lesson 1/Slide 11 of 35
  • 12. Introduction to Object-Oriented Approach Messages and Methods (Contd.) Methods: Are a set of actions taken by the receiver object in response to the request ©NIIT OOPS/Lesson 1/Slide 12 of 35
  • 13. Introduction to Object-Oriented Approach Just a Minute… Dr. James and Mr. Hyde went to the railway station to book two tickets in the Flying express for 3rd December by AC 1st class. Identify the following: a.The possible receiver of the message in this situation b.The possible method that the receiver can use ©NIIT OOPS/Lesson 1/Slide 13 of 35
  • 14. Introduction to Object-Oriented Approach Benefits of the Object-Oriented Approach Realistic modeling Easy to use Reusability Saves time and cost ©NIIT OOPS/Lesson 1/Slide 14 of 35
  • 15. Introduction to Object-Oriented Approach Just a Minute… State whether the following situations demonstrate reusability: a. Recycling paper b. Pump reusability (same pump is used in a well and in a fuel station) ©NIIT OOPS/Lesson 1/Slide 15 of 35
  • 16. Introduction to Object-Oriented Approach Benefits of Object-Oriented Approach (Contd.) Resilience to change Easy to maintain Parts of the system can be refined without any major change in other parts ©NIIT OOPS/Lesson 1/Slide 16 of 35
  • 17. Introduction to Object-Oriented Approach Object-Oriented Analysis (OOA) Analysis: Is a phase where users and developers get together and arrive at a common understanding of the system Requires the developer to concentrate on obtaining maximum possible information about the problem domain Results in one of the end products as specification of the function of the system ©NIIT OOPS/Lesson 1/Slide 17 of 35
  • 18. Introduction to Object-Oriented Approach Object-Oriented Design (OOD) Design: Generates the blueprint of the system that has to be implemented Involves identifying classes using Abbott’s technique ©NIIT OOPS/Lesson 1/Slide 18 of 35
  • 19. Introduction to Object-Oriented Approach Object-Oriented Design (OOD) (Contd.) Abbott’s technique follows the listed steps: Write English description of the problem Underline nouns (nouns represent candidate classes) ©NIIT OOPS/Lesson 1/Slide 19 of 35
  • 20. Introduction to Object-Oriented Approach Object-Oriented Programming (OOP) Is a way of writing programs Some applications built using OOP techniques are: Computer-Aided Design (CAD) Computer-Aided Manufacturing (CAM) Artificial Intelligence (AI) and Expert Systems Object-Oriented Databases ©NIIT OOPS/Lesson 1/Slide 20 of 35
  • 21. Introduction to Object-Oriented Approach Just a Minute… As a member of a team that is developing the billing system software for Diaz Telecommunications Inc., you have been assigned the task of creating a software module that accepts and displays customer details. Identify the class that you will create and the methods of the class. ©NIIT OOPS/Lesson 1/Slide 21 of 35
  • 22. Introduction to Object-Oriented Approach Generations of Computer Languages First generation Second generation Third generation ©NIIT OOPS/Lesson 1/Slide 22 of 35
  • 23. Introduction to Object-Oriented Approach Evolution of C++ as an Object Oriented Programming Language In the early 1980s, Bjarne Stroustrup developed the C++ language C++ was originally known as 'C with classes' ©NIIT OOPS/Lesson 1/Slide 23 of 35
  • 24. Introduction to Object-Oriented Approach Creating Classes in C++ Sample: class Car { public: void honk() { coutBEEP BEEP!; } }; ©NIIT OOPS/Lesson 1/Slide 24 of 35
  • 25. Introduction to Object-Oriented Approach Creating Classes in C++ (Contd.) The class keyword Is used to declare a class Example: class Car { ... }; ©NIIT OOPS/Lesson 1/Slide 25 of 35
  • 26. Introduction to Object-Oriented Approach Creating Classes in C++ (Contd.) Conventions for naming classes Should be meaningful Should ideally be a noun First letter of every word should be in upper case Rules for naming classes Must not contain any embedded space or symbol Must begin with a letter, which may be followed by a sequence of letters or digits Cannot be a keyword ©NIIT OOPS/Lesson 1/Slide 26 of 35
  • 27. Introduction to Object-Oriented Approach Creating Classes in C++ (Contd.) Member functions Are means of passing messages and responding to them Are declared inside the class body Example: class Car { void honk() { coutBEEP BEEP!; } }; ©NIIT OOPS/Lesson 1/Slide 27 of 35
  • 28. Introduction to Object-Oriented Approach Creating Classes in C++ (Contd.) The cout object Is an instance of the pre-defined class, ostream The endl manipulator Is a command that takes the cursor to the new line ©NIIT OOPS/Lesson 1/Slide 28 of 35
  • 29. Introduction to Object-Oriented Approach Problem Statement 1.D.1 As a member of a team that is developing the billing system software for Diaz Telecommunications Inc., you have been assigned the task of creating a software module that accepts and displays customer details. Declare the Customer class and the member functions. The member function to accept customer details should display the message “Accepting Customer Details”. Similarly, the member function to display customer details on the screen should display the message “Displaying Customer Details.” ©NIIT OOPS/Lesson 1/Slide 29 of 35
  • 30. Introduction to Object-Oriented Approach Problem Statement 1.D.1 (Contd.) Solution: class Customer { void accept() { cout “Accepting Customer Details” endl; } void display() { cout “Displaying Customer Details” endl; } }; ©NIIT OOPS/Lesson 1/Slide 30 of 35
  • 31. Introduction to Object-Oriented Approach Problem Statement 1.P.1 As a member of a team that is developing an automated booking system for the Railways, you have been assigned the task of creating a module that accepts the details of a passenger and checks whether the ticket has been confirmed or is in the waiting list. The module then prints the list of confirmed passengers. Declare a class Ticket, which consists of three member functions, booking(), status(), and print(). ©NIIT OOPS/Lesson 1/Slide 31 of 35
  • 32. Introduction to Object-Oriented Approach Summary In this lesson, you learned that: Complexity of software arises mainly due to four reasons: Difficulty in understanding the intricacies and complexity of the system and its needs Communication problems during development Lack of standards for developing software Difficulty in predicting software behavior One way of dealing with the complexity of software is to break down an application into its components and deal with each component separately ©NIIT OOPS/Lesson 1/Slide 32 of 35
  • 33. Introduction to Object-Oriented Approach Summary (Contd.) The object-oriented approach views the systems as consisting of component objects and looks at the interactions between them An object is an entity that may have a physical boundary and is also characterized by the following: State Behavior Identity A class consists of a set of objects that share a common structure and behavior If one object desires an action from another object, it sends a message to the second object ©NIIT OOPS/Lesson 1/Slide 33 of 35
  • 34. Introduction to Object-Oriented Approach Summary (Contd.) The object that receives the message is called the receiver; the set of actions taken by the receiver constitutes the method The benefits of the object-oriented approach are: Realistic modelling, hence it is easier to use Reusability of code, hence it saves time and cost Resilience to change, hence systems are easier to maintain In the stages of analysis and design, a model of the system is built ©NIIT OOPS/Lesson 1/Slide 34 of 35
  • 35. Introduction to Object-Oriented Approach Summary (Contd.) The purpose of the model built during analysis and design is to help developers understand the reality that they are trying to imitate Bjarne Stroustrup developed the C++ language in the early 1980s The cout object is an instance of the class, ostream The class ostream is associated with the standard output device (screen) The output operator '' is used to direct a value to the standard output device ©NIIT OOPS/Lesson 1/Slide 35 of 35