SlideShare a Scribd company logo
Object-Oriented
Techniques




     Learn More @ http://www.learnnowonline.com
        Copyright © by Application Developers Training Company
Objectives




        Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Objectives
• Understand how derived classes inherit from
  base classes




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Objectives
• Understand how derived classes inherit from
  base classes
• Explore how to add and modify members in
  derived classes




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Objectives
• Understand how derived classes inherit from
  base classes
• Explore how to add and modify members in
  derived classes
• Learn to control how derived classes inherit
  from base classes




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Objectives
• Understand how derived classes inherit from
  base classes
• Explore how to add and modify members in
  derived classes
• Learn to control how derived classes inherit
  from base classes
• Understand how to create and use interfaces



            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Objectives
• Understand how derived classes inherit from
  base classes
• Explore how to add and modify members in
  derived classes
• Learn to control how derived classes inherit
  from base classes
• Understand how to create and use interfaces
• Explore techniques for organizing your classes


            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Agenda




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Agenda
• Inheritance




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Agenda
• Inheritance
• Interfaces




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Agenda
• Inheritance
• Interfaces
• Organizing Classes




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Inheritance




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Inheritance
• Inefficient to have similar classes with the same
  members




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Inheritance
• Inefficient to have similar classes with the same
  members
• Create a more generic (base) class and then
  inherit (derive) from the generic class




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Inheritance
• Inefficient to have similar classes with the same
  members
• Create a more generic (base) class and then
  inherit (derive) from the generic class
• Derived classes inherit the members of the base
  class




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Inheritance
• Inefficient to have similar classes with the same
  members
• Create a more generic (base) class and then
  inherit (derive) from the generic class
• Derived classes inherit the members of the base
  class
• Inheritance defines an “is-a” relationship



            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Inheritance
• Inefficient to have similar classes with the same
  members
• Create a more generic (base) class and then
  inherit (derive) from the generic class
• Derived classes inherit the members of the base
  class
• Inheritance defines an “is-a” relationship
   A corporation is a customer



            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Inheritance
• Inefficient to have similar classes with the same
  members
• Create a more generic (base) class and then
  inherit (derive) from the generic class
• Derived classes inherit the members of the base
  class
• Inheritance defines an “is-a” relationship
   A corporation is a customer
   An individual is a customer

            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Inheritance Hierarchy




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Inheritance Hierarchy
• Customer is the base class and is the most
  generic representation of a customer




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Inheritance Hierarchy
• Customer is the base class and is the most
  generic representation of a customer
• Corporation and Individual are derived classes,
  inheriting from the base class




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
The “is-a” Relationship




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
The “is-a” Relationship
• Be thorough when defining the “is-a” relationships
  among objects in your code




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
The “is-a” Relationship
• Be thorough when defining the “is-a” relationships
  among objects in your code
• If differences between two types of customers (like
  Corporation and Individual) are significant, it may
  warrant making separate classes such as Domestic and
  Foreign




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Adding Members to Derived Classes




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Adding Members to Derived Classes
 • Common properties and methods can go in the
   base class




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Adding Members to Derived Classes
 • Common properties and methods can go in the
   base class
 • Unique properties and methods can be added to
   derived classes




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Overriding Derived Members




       Learn More @ http://www.learnnowonline.com
          Copyright © by Application Developers Training Company
Overriding Derived Members
• Override a property or method in a derived class
  to change its behavior




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Overriding Derived Members
• Override a property or method in a derived class
  to change its behavior
• You are replacing the base class member with
  the derived class member




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Overloading Derived Members




       Learn More @ http://www.learnnowonline.com
          Copyright © by Application Developers Training Company
Overloading Derived Members
• Overload a property or method of a base class
  to create a specialized version in a derived class




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Overloading Derived Members
• Overload a property or method of a base class
  to create a specialized version in a derived class
• The base class member still exists and can be
  used in addition to a derived class member




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Calling Base Class Members




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Calling Base Class Members
• Members of a derived class can call members of
  the base class




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Abstract Classes and Members




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Abstract Classes and Members
• An abstract class is designed to be generic and
  is incomplete




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Abstract Classes and Members
• An abstract class is designed to be generic and
  is incomplete
• You cannot create an instance of it and can only
  derive from it




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Abstract Classes and Members
• An abstract class is designed to be generic and
  is incomplete
• You cannot create an instance of it and can only
  derive from it
• Abstract class can contain abstract properties
  and members




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Abstract Classes and Members
• An abstract class is designed to be generic and
  is incomplete
• You cannot create an instance of it and can only
  derive from it
• Abstract class can contain abstract properties
  and members
   Derived classes cannot call these properties from the
    abstract class



             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Abstract Classes and Members
• An abstract class is designed to be generic and
  is incomplete
• You cannot create an instance of it and can only
  derive from it
• Abstract class can contain abstract properties
  and members
   Derived classes cannot call these properties from the
    abstract class
   They must implement them on their own


             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Sealed Classes and Members




       Learn More @ http://www.learnnowonline.com
          Copyright © by Application Developers Training Company
Sealed Classes and Members
• Seal a class to prevent inheriting from it




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Sealed Classes and Members
• Seal a class to prevent inheriting from it
• Seal a member in a derived class to prevent
  further derived classes from overriding it




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Interfaces




        Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Interfaces
• Define a set of properties and methods that a
  class will implement




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Interfaces
• Define a set of properties and methods that a
  class will implement
• Contain no implementation code




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Interfaces
• Define a set of properties and methods that a
  class will implement
• Contain no implementation code
• A class must implement all members defined in
  an interface




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Interfaces
• Define a set of properties and methods that a
  class will implement
• Contain no implementation code
• A class must implement all members defined in
  an interface
   Visual Studio adds member declarations
    automatically, you add code to implement members




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Interfaces
• Define a set of properties and methods that a
  class will implement
• Contain no implementation code
• A class must implement all members defined in
  an interface
   Visual Studio adds member declarations
    automatically, you add code to implement members
   You can override and overload interface members



            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Implementing an Interface




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Implementing an Interface
• A class must implement all members defined in
  an interface




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Implementing an Interface
• A class must implement all members defined in
  an interface
   Visual Studio adds member declarations
    automatically, you add code to implement members




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Implementing an Interface
• A class must implement all members defined in
  an interface
   Visual Studio adds member declarations
    automatically, you add code to implement members
   You can override and overload interface members




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Implementing an Interface
• A class must implement all members defined in
  an interface
   Visual Studio adds member declarations
    automatically, you add code to implement members
   You can override and overload interface members
• Class can implement multiple interfaces but can
  only derive from one class




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Implementing an Interface
• A class must implement all members defined in
  an interface
   Visual Studio adds member declarations
    automatically, you add code to implement members
   You can override and overload interface members
• Class can implement multiple interfaces but can
  only derive from one class
• Use interfaces to implement smaller sets of
  members and to enable classes to implement
  only interfaces they need
            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Interfaces in the .NET Framework




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Interfaces in the .NET Framework
• The .NET Framework contains many interfaces
  you can use




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Interfaces in the .NET Framework
• The .NET Framework contains many interfaces
  you can use
• IComparable provides a general way of
  comparing value types or classes




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Interfaces in the .NET Framework
• The .NET Framework contains many interfaces
  you can use
• IComparable provides a general way of
  comparing value types or classes
   Call CompareTo as a method of one type




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Interfaces in the .NET Framework
• The .NET Framework contains many interfaces
  you can use
• IComparable provides a general way of
  comparing value types or classes
   Call CompareTo as a method of one type
   Pass as argument the type you are comparing the
    first type with




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Organizing Classes




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Organizing Classes
• Classes are a good way to organize your code




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Organizing Classes
• Classes are a good way to organize your code
• You can also organize your classes




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Partial Classes




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Partial Classes
• Helpful on teams where you are writing some
  class methods and other developers are writing
  the rest




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Partial Classes
• Helpful on teams where you are writing some
  class methods and other developers are writing
  the rest
• Split the class definition across multiple files




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Partial Classes
• Helpful on teams where you are writing some
  class methods and other developers are writing
  the rest
• Split the class definition across multiple files
• Compiler combines the partial classes into one
  class




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Partial Classes
• Helpful on teams where you are writing some
  class methods and other developers are writing
  the rest
• Split the class definition across multiple files
• Compiler combines the partial classes into one
  class
• Calling class uses class the same whether it is
  made up of partial classes or not


            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Nested Classes




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Nested Classes
• Class defined within another class




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Nested Classes
• Class defined within another class
• Organize class members so they are easier to
  use at runtime




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Nested Classes
• Class defined within another class
• Organize class members so they are easier to
  use at runtime
• Group members of Customer class




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Nested Classes
• Class defined within another class
• Organize class members so they are easier to
  use at runtime
• Group members of Customer class
   Customer.Information




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Nested Classes
• Class defined within another class
• Organize class members so they are easier to
  use at runtime
• Group members of Customer class
   Customer.Information
     o   CustomerName, City, Region, etc




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Nested Classes
• Class defined within another class
• Organize class members so they are easier to
  use at runtime
• Group members of Customer class
   Customer.Information
     o   CustomerName, City, Region, etc
   Customer.Financial




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Nested Classes
• Class defined within another class
• Organize class members so they are easier to
  use at runtime
• Group members of Customer class
   Customer.Information
     o   CustomerName, City, Region, etc
   Customer.Financial
     o   CreditLimit, ChangeCreditLimit




                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Nested Classes
• Class defined within another class
• Organize class members so they are easier to
  use at runtime
• Group members of Customer class
   Customer.Information
     o   CustomerName, City, Region, etc
   Customer.Financial
     o   CreditLimit, ChangeCreditLimit
   Customer.Sales


                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Nested Classes
• Class defined within another class
• Organize class members so they are easier to
  use at runtime
• Group members of Customer class
   Customer.Information
     o   CustomerName, City, Region, etc
   Customer.Financial
     o   CreditLimit, ChangeCreditLimit
   Customer.Sales
     o   RecordSales

                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Namespaces




      Learn More @ http://www.learnnowonline.com
         Copyright © by Application Developers Training Company
Namespaces
• A way to organize related classes into groups




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Namespaces
• A way to organize related classes into groups
   System.Data contains classes to work with data
    once you have retrieved it from a data source




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Namespaces
• A way to organize related classes into groups
   System.Data contains classes to work with data
    once you have retrieved it from a data source
• Namespaces can be nested




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Namespaces
• A way to organize related classes into groups
   System.Data contains classes to work with data
    once you have retrieved it from a data source
• Namespaces can be nested
   System.Data.SqlClient contains classes to retrieve
    data from SQL Server




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Namespaces
• A way to organize related classes into groups
   System.Data contains classes to work with data
    once you have retrieved it from a data source
• Namespaces can be nested
   System.Data.SqlClient contains classes to retrieve
    data from SQL Server
   System.Data.OracleClient contains classes to
    retrieve data from Oracle




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Namespaces




      Learn More @ http://www.learnnowonline.com
         Copyright © by Application Developers Training Company
Namespaces
• By default, the application namespace is the
  name of the project




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Namespaces
• By default, the application namespace is the
  name of the project
• You can change this in Project Designer




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Namespaces
• By default, the application namespace is the
  name of the project
• You can change this in Project Designer
• Create your own namespaces to organize
  classes in class libraries




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Learn More!




       Learn More @ http://www.learnnowonline.com
          Copyright © by Application Developers Training Company
Learn More!
• This is an excerpt from a larger course. Visit
  www.learnnowonline.com for the full details!




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Learn More!
• This is an excerpt from a larger course. Visit
  www.learnnowonline.com for the full details!




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Learn More!
• This is an excerpt from a larger course. Visit
  www.learnnowonline.com for the full details!


• Learn more on SlideShare




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Learn More!
• This is an excerpt from a larger course. Visit
  www.learnnowonline.com for the full details!


• Learn more on SlideShare
   Object-Oriented JavaScript




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company

More Related Content

Viewers also liked

Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
Tushar B Kute
 
Lecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operatorsLecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operators
eShikshak
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologies
naina-rani
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
Umesh Nikam
 
JAVA Tutorial- Do's and Don'ts of Java programming
JAVA Tutorial- Do's and Don'ts of Java programmingJAVA Tutorial- Do's and Don'ts of Java programming
JAVA Tutorial- Do's and Don'ts of Java programming
Keshav Kumar
 
Lecture01 object oriented-programming
Lecture01 object oriented-programmingLecture01 object oriented-programming
Lecture01 object oriented-programming
Hariz Mustafa
 
Data Flow Modeling
Data Flow ModelingData Flow Modeling
Data Flow Modeling
Padmanaban Kalyanaraman
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
Nikhil Pandit
 
Module 3 Object Oriented Data Models Object Oriented notations
Module 3  Object Oriented Data Models Object Oriented notationsModule 3  Object Oriented Data Models Object Oriented notations
Module 3 Object Oriented Data Models Object Oriented notations
Taher Barodawala
 
Counter Urbanisation Part 2
Counter Urbanisation Part 2Counter Urbanisation Part 2
Counter Urbanisation Part 2
year12blanchgeography
 
A Psicologia da Aprendizagem
A Psicologia da AprendizagemA Psicologia da Aprendizagem
A Psicologia da Aprendizagem
O Blog do Pedagogo
 
Structured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignStructured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and Design
Motaz Saad
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
Neil Mathew
 
Hierarchical Object Oriented Design
Hierarchical Object Oriented DesignHierarchical Object Oriented Design
Hierarchical Object Oriented Design
sahibsahib
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
Javaria Chiragh
 
Object Modeling Techniques
Object Modeling TechniquesObject Modeling Techniques
Object Modeling Techniques
Shilpa Wadhwani
 
Object oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle pptObject oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle ppt
Kunal Kishor Nirala
 
Nano computing
Nano computingNano computing
Nano computing
manpreetgrewal
 
85 business analyst interview questions and answers
85 business analyst interview questions and answers85 business analyst interview questions and answers
85 business analyst interview questions and answers
BusinessAnalyst247
 
Artificial Intelligence Presentation
Artificial Intelligence PresentationArtificial Intelligence Presentation
Artificial Intelligence Presentation
lpaviglianiti
 

Viewers also liked (20)

Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
 
Lecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operatorsLecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operators
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologies
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
 
JAVA Tutorial- Do's and Don'ts of Java programming
JAVA Tutorial- Do's and Don'ts of Java programmingJAVA Tutorial- Do's and Don'ts of Java programming
JAVA Tutorial- Do's and Don'ts of Java programming
 
Lecture01 object oriented-programming
Lecture01 object oriented-programmingLecture01 object oriented-programming
Lecture01 object oriented-programming
 
Data Flow Modeling
Data Flow ModelingData Flow Modeling
Data Flow Modeling
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
 
Module 3 Object Oriented Data Models Object Oriented notations
Module 3  Object Oriented Data Models Object Oriented notationsModule 3  Object Oriented Data Models Object Oriented notations
Module 3 Object Oriented Data Models Object Oriented notations
 
Counter Urbanisation Part 2
Counter Urbanisation Part 2Counter Urbanisation Part 2
Counter Urbanisation Part 2
 
A Psicologia da Aprendizagem
A Psicologia da AprendizagemA Psicologia da Aprendizagem
A Psicologia da Aprendizagem
 
Structured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignStructured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and Design
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Hierarchical Object Oriented Design
Hierarchical Object Oriented DesignHierarchical Object Oriented Design
Hierarchical Object Oriented Design
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Object Modeling Techniques
Object Modeling TechniquesObject Modeling Techniques
Object Modeling Techniques
 
Object oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle pptObject oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle ppt
 
Nano computing
Nano computingNano computing
Nano computing
 
85 business analyst interview questions and answers
85 business analyst interview questions and answers85 business analyst interview questions and answers
85 business analyst interview questions and answers
 
Artificial Intelligence Presentation
Artificial Intelligence PresentationArtificial Intelligence Presentation
Artificial Intelligence Presentation
 

Similar to Object oriented techniques

Bring a Web Page Alive with jQuery
Bring a Web Page Alive with jQueryBring a Web Page Alive with jQuery
Bring a Web Page Alive with jQuery
LearnNowOnline
 
Generics
GenericsGenerics
Generics
LearnNowOnline
 
What's new in Silverlight 5
What's new in Silverlight 5What's new in Silverlight 5
What's new in Silverlight 5
LearnNowOnline
 
WPF Binding
WPF BindingWPF Binding
WPF Binding
LearnNowOnline
 
Managing site collections
Managing site collectionsManaging site collections
Managing site collections
LearnNowOnline
 
SharePoint Document Management
SharePoint Document ManagementSharePoint Document Management
SharePoint Document Management
LearnNowOnline
 
.Net branching and flow control
.Net branching and flow control.Net branching and flow control
.Net branching and flow control
LearnNowOnline
 
The Entity Data Model
The Entity Data ModelThe Entity Data Model
The Entity Data Model
LearnNowOnline
 
SQL Server: Security
SQL Server: SecuritySQL Server: Security
SQL Server: Security
LearnNowOnline
 
JavaScript: Operators and Expressions
JavaScript: Operators and ExpressionsJavaScript: Operators and Expressions
JavaScript: Operators and Expressions
LearnNowOnline
 
KnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVCKnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVC
LearnNowOnline
 
Using The .NET Framework
Using The .NET FrameworkUsing The .NET Framework
Using The .NET Framework
LearnNowOnline
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScript
LearnNowOnline
 
Expression Blend Motion & Interaction Design
Expression Blend Motion & Interaction DesignExpression Blend Motion & Interaction Design
Expression Blend Motion & Interaction Design
LearnNowOnline
 
Web API HTTP Pipeline
Web API HTTP PipelineWeb API HTTP Pipeline
Web API HTTP Pipeline
LearnNowOnline
 
Web API Basics
Web API BasicsWeb API Basics
Web API Basics
LearnNowOnline
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
LearnNowOnline
 
Creating a User Interface
Creating a User InterfaceCreating a User Interface
Creating a User Interface
LearnNowOnline
 
Asynchronous Programming
Asynchronous ProgrammingAsynchronous Programming
Asynchronous Programming
LearnNowOnline
 
Web technologies 2014
Web technologies 2014Web technologies 2014
Web technologies 2014
Raghav Rao
 

Similar to Object oriented techniques (20)

Bring a Web Page Alive with jQuery
Bring a Web Page Alive with jQueryBring a Web Page Alive with jQuery
Bring a Web Page Alive with jQuery
 
Generics
GenericsGenerics
Generics
 
What's new in Silverlight 5
What's new in Silverlight 5What's new in Silverlight 5
What's new in Silverlight 5
 
WPF Binding
WPF BindingWPF Binding
WPF Binding
 
Managing site collections
Managing site collectionsManaging site collections
Managing site collections
 
SharePoint Document Management
SharePoint Document ManagementSharePoint Document Management
SharePoint Document Management
 
.Net branching and flow control
.Net branching and flow control.Net branching and flow control
.Net branching and flow control
 
The Entity Data Model
The Entity Data ModelThe Entity Data Model
The Entity Data Model
 
SQL Server: Security
SQL Server: SecuritySQL Server: Security
SQL Server: Security
 
JavaScript: Operators and Expressions
JavaScript: Operators and ExpressionsJavaScript: Operators and Expressions
JavaScript: Operators and Expressions
 
KnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVCKnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVC
 
Using The .NET Framework
Using The .NET FrameworkUsing The .NET Framework
Using The .NET Framework
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScript
 
Expression Blend Motion & Interaction Design
Expression Blend Motion & Interaction DesignExpression Blend Motion & Interaction Design
Expression Blend Motion & Interaction Design
 
Web API HTTP Pipeline
Web API HTTP PipelineWeb API HTTP Pipeline
Web API HTTP Pipeline
 
Web API Basics
Web API BasicsWeb API Basics
Web API Basics
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Creating a User Interface
Creating a User InterfaceCreating a User Interface
Creating a User Interface
 
Asynchronous Programming
Asynchronous ProgrammingAsynchronous Programming
Asynchronous Programming
 
Web technologies 2014
Web technologies 2014Web technologies 2014
Web technologies 2014
 

More from LearnNowOnline

Windows 8: Shapes and Geometries
Windows 8: Shapes and GeometriesWindows 8: Shapes and Geometries
Windows 8: Shapes and Geometries
LearnNowOnline
 
SQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionSQL: Permissions and Data Protection
SQL: Permissions and Data Protection
LearnNowOnline
 
New in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDENew in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDE
LearnNowOnline
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programming
LearnNowOnline
 
WPF: Working with Data
WPF: Working with DataWPF: Working with Data
WPF: Working with Data
LearnNowOnline
 
A tour of SQL Server
A tour of SQL ServerA tour of SQL Server
A tour of SQL Server
LearnNowOnline
 
Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
LearnNowOnline
 
SharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPathSharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPath
LearnNowOnline
 
Sql 2012 development and programming
Sql 2012  development and programmingSql 2012  development and programming
Sql 2012 development and programming
LearnNowOnline
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity Framework
LearnNowOnline
 
Working with Controllers and Actions in MVC
Working with Controllers and Actions in MVCWorking with Controllers and Actions in MVC
Working with Controllers and Actions in MVC
LearnNowOnline
 

More from LearnNowOnline (11)

Windows 8: Shapes and Geometries
Windows 8: Shapes and GeometriesWindows 8: Shapes and Geometries
Windows 8: Shapes and Geometries
 
SQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionSQL: Permissions and Data Protection
SQL: Permissions and Data Protection
 
New in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDENew in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDE
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programming
 
WPF: Working with Data
WPF: Working with DataWPF: Working with Data
WPF: Working with Data
 
A tour of SQL Server
A tour of SQL ServerA tour of SQL Server
A tour of SQL Server
 
Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
 
SharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPathSharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPath
 
Sql 2012 development and programming
Sql 2012  development and programmingSql 2012  development and programming
Sql 2012 development and programming
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity Framework
 
Working with Controllers and Actions in MVC
Working with Controllers and Actions in MVCWorking with Controllers and Actions in MVC
Working with Controllers and Actions in MVC
 

Recently uploaded

Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 

Recently uploaded (20)

Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 

Object oriented techniques

  • 1. Object-Oriented Techniques Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 2. Objectives Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 3. Objectives • Understand how derived classes inherit from base classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 4. Objectives • Understand how derived classes inherit from base classes • Explore how to add and modify members in derived classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 5. Objectives • Understand how derived classes inherit from base classes • Explore how to add and modify members in derived classes • Learn to control how derived classes inherit from base classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 6. Objectives • Understand how derived classes inherit from base classes • Explore how to add and modify members in derived classes • Learn to control how derived classes inherit from base classes • Understand how to create and use interfaces Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 7. Objectives • Understand how derived classes inherit from base classes • Explore how to add and modify members in derived classes • Learn to control how derived classes inherit from base classes • Understand how to create and use interfaces • Explore techniques for organizing your classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 8. Agenda Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 9. Agenda • Inheritance Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 10. Agenda • Inheritance • Interfaces Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 11. Agenda • Inheritance • Interfaces • Organizing Classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 12. Inheritance Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 13. Inheritance • Inefficient to have similar classes with the same members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 14. Inheritance • Inefficient to have similar classes with the same members • Create a more generic (base) class and then inherit (derive) from the generic class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 15. Inheritance • Inefficient to have similar classes with the same members • Create a more generic (base) class and then inherit (derive) from the generic class • Derived classes inherit the members of the base class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 16. Inheritance • Inefficient to have similar classes with the same members • Create a more generic (base) class and then inherit (derive) from the generic class • Derived classes inherit the members of the base class • Inheritance defines an “is-a” relationship Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 17. Inheritance • Inefficient to have similar classes with the same members • Create a more generic (base) class and then inherit (derive) from the generic class • Derived classes inherit the members of the base class • Inheritance defines an “is-a” relationship  A corporation is a customer Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 18. Inheritance • Inefficient to have similar classes with the same members • Create a more generic (base) class and then inherit (derive) from the generic class • Derived classes inherit the members of the base class • Inheritance defines an “is-a” relationship  A corporation is a customer  An individual is a customer Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 19. Inheritance Hierarchy Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 20. Inheritance Hierarchy • Customer is the base class and is the most generic representation of a customer Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 21. Inheritance Hierarchy • Customer is the base class and is the most generic representation of a customer • Corporation and Individual are derived classes, inheriting from the base class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 22. The “is-a” Relationship Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 23. The “is-a” Relationship • Be thorough when defining the “is-a” relationships among objects in your code Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 24. The “is-a” Relationship • Be thorough when defining the “is-a” relationships among objects in your code • If differences between two types of customers (like Corporation and Individual) are significant, it may warrant making separate classes such as Domestic and Foreign Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 25. Adding Members to Derived Classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 26. Adding Members to Derived Classes • Common properties and methods can go in the base class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 27. Adding Members to Derived Classes • Common properties and methods can go in the base class • Unique properties and methods can be added to derived classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 28. Overriding Derived Members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 29. Overriding Derived Members • Override a property or method in a derived class to change its behavior Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 30. Overriding Derived Members • Override a property or method in a derived class to change its behavior • You are replacing the base class member with the derived class member Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 31. Overloading Derived Members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 32. Overloading Derived Members • Overload a property or method of a base class to create a specialized version in a derived class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 33. Overloading Derived Members • Overload a property or method of a base class to create a specialized version in a derived class • The base class member still exists and can be used in addition to a derived class member Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 34. Calling Base Class Members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 35. Calling Base Class Members • Members of a derived class can call members of the base class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 36. Abstract Classes and Members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 37. Abstract Classes and Members • An abstract class is designed to be generic and is incomplete Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 38. Abstract Classes and Members • An abstract class is designed to be generic and is incomplete • You cannot create an instance of it and can only derive from it Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 39. Abstract Classes and Members • An abstract class is designed to be generic and is incomplete • You cannot create an instance of it and can only derive from it • Abstract class can contain abstract properties and members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 40. Abstract Classes and Members • An abstract class is designed to be generic and is incomplete • You cannot create an instance of it and can only derive from it • Abstract class can contain abstract properties and members  Derived classes cannot call these properties from the abstract class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 41. Abstract Classes and Members • An abstract class is designed to be generic and is incomplete • You cannot create an instance of it and can only derive from it • Abstract class can contain abstract properties and members  Derived classes cannot call these properties from the abstract class  They must implement them on their own Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 42. Sealed Classes and Members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 43. Sealed Classes and Members • Seal a class to prevent inheriting from it Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 44. Sealed Classes and Members • Seal a class to prevent inheriting from it • Seal a member in a derived class to prevent further derived classes from overriding it Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 45. Interfaces Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 46. Interfaces • Define a set of properties and methods that a class will implement Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 47. Interfaces • Define a set of properties and methods that a class will implement • Contain no implementation code Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 48. Interfaces • Define a set of properties and methods that a class will implement • Contain no implementation code • A class must implement all members defined in an interface Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 49. Interfaces • Define a set of properties and methods that a class will implement • Contain no implementation code • A class must implement all members defined in an interface  Visual Studio adds member declarations automatically, you add code to implement members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 50. Interfaces • Define a set of properties and methods that a class will implement • Contain no implementation code • A class must implement all members defined in an interface  Visual Studio adds member declarations automatically, you add code to implement members  You can override and overload interface members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 51. Implementing an Interface Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 52. Implementing an Interface • A class must implement all members defined in an interface Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 53. Implementing an Interface • A class must implement all members defined in an interface  Visual Studio adds member declarations automatically, you add code to implement members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 54. Implementing an Interface • A class must implement all members defined in an interface  Visual Studio adds member declarations automatically, you add code to implement members  You can override and overload interface members Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 55. Implementing an Interface • A class must implement all members defined in an interface  Visual Studio adds member declarations automatically, you add code to implement members  You can override and overload interface members • Class can implement multiple interfaces but can only derive from one class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 56. Implementing an Interface • A class must implement all members defined in an interface  Visual Studio adds member declarations automatically, you add code to implement members  You can override and overload interface members • Class can implement multiple interfaces but can only derive from one class • Use interfaces to implement smaller sets of members and to enable classes to implement only interfaces they need Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 57. Interfaces in the .NET Framework Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 58. Interfaces in the .NET Framework • The .NET Framework contains many interfaces you can use Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 59. Interfaces in the .NET Framework • The .NET Framework contains many interfaces you can use • IComparable provides a general way of comparing value types or classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 60. Interfaces in the .NET Framework • The .NET Framework contains many interfaces you can use • IComparable provides a general way of comparing value types or classes  Call CompareTo as a method of one type Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 61. Interfaces in the .NET Framework • The .NET Framework contains many interfaces you can use • IComparable provides a general way of comparing value types or classes  Call CompareTo as a method of one type  Pass as argument the type you are comparing the first type with Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 62. Organizing Classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 63. Organizing Classes • Classes are a good way to organize your code Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 64. Organizing Classes • Classes are a good way to organize your code • You can also organize your classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 65. Partial Classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 66. Partial Classes • Helpful on teams where you are writing some class methods and other developers are writing the rest Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 67. Partial Classes • Helpful on teams where you are writing some class methods and other developers are writing the rest • Split the class definition across multiple files Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 68. Partial Classes • Helpful on teams where you are writing some class methods and other developers are writing the rest • Split the class definition across multiple files • Compiler combines the partial classes into one class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 69. Partial Classes • Helpful on teams where you are writing some class methods and other developers are writing the rest • Split the class definition across multiple files • Compiler combines the partial classes into one class • Calling class uses class the same whether it is made up of partial classes or not Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 70. Nested Classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 71. Nested Classes • Class defined within another class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 72. Nested Classes • Class defined within another class • Organize class members so they are easier to use at runtime Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 73. Nested Classes • Class defined within another class • Organize class members so they are easier to use at runtime • Group members of Customer class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 74. Nested Classes • Class defined within another class • Organize class members so they are easier to use at runtime • Group members of Customer class  Customer.Information Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 75. Nested Classes • Class defined within another class • Organize class members so they are easier to use at runtime • Group members of Customer class  Customer.Information o CustomerName, City, Region, etc Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 76. Nested Classes • Class defined within another class • Organize class members so they are easier to use at runtime • Group members of Customer class  Customer.Information o CustomerName, City, Region, etc  Customer.Financial Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 77. Nested Classes • Class defined within another class • Organize class members so they are easier to use at runtime • Group members of Customer class  Customer.Information o CustomerName, City, Region, etc  Customer.Financial o CreditLimit, ChangeCreditLimit Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 78. Nested Classes • Class defined within another class • Organize class members so they are easier to use at runtime • Group members of Customer class  Customer.Information o CustomerName, City, Region, etc  Customer.Financial o CreditLimit, ChangeCreditLimit  Customer.Sales Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 79. Nested Classes • Class defined within another class • Organize class members so they are easier to use at runtime • Group members of Customer class  Customer.Information o CustomerName, City, Region, etc  Customer.Financial o CreditLimit, ChangeCreditLimit  Customer.Sales o RecordSales Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 80. Namespaces Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 81. Namespaces • A way to organize related classes into groups Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 82. Namespaces • A way to organize related classes into groups  System.Data contains classes to work with data once you have retrieved it from a data source Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 83. Namespaces • A way to organize related classes into groups  System.Data contains classes to work with data once you have retrieved it from a data source • Namespaces can be nested Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 84. Namespaces • A way to organize related classes into groups  System.Data contains classes to work with data once you have retrieved it from a data source • Namespaces can be nested  System.Data.SqlClient contains classes to retrieve data from SQL Server Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 85. Namespaces • A way to organize related classes into groups  System.Data contains classes to work with data once you have retrieved it from a data source • Namespaces can be nested  System.Data.SqlClient contains classes to retrieve data from SQL Server  System.Data.OracleClient contains classes to retrieve data from Oracle Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 86. Namespaces Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 87. Namespaces • By default, the application namespace is the name of the project Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 88. Namespaces • By default, the application namespace is the name of the project • You can change this in Project Designer Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 89. Namespaces • By default, the application namespace is the name of the project • You can change this in Project Designer • Create your own namespaces to organize classes in class libraries Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 90. Learn More! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 91. Learn More! • This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 92. Learn More! • This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 93. Learn More! • This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! • Learn more on SlideShare Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 94. Learn More! • This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! • Learn more on SlideShare  Object-Oriented JavaScript Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. DEMO: rest of section\n
  78. DEMO: rest of section\n
  79. DEMO: rest of section\n
  80. DEMO: rest of section\n