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

KEY
.NET Variables and Data Types
LearnNowOnline
 
KEY
Building Windows 8 Metro Style Applications Using JavaScript and HTML5
LearnNowOnline
 
PPTX
Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1
Clayton Boessen
 
PDF
Adobe's Creative Cloud pricing strategy and freelancers by 199 insights
199 Insights
 
PDF
Adobe Connect Pricing
Communique Conferencing, Inc.
 
PPTX
Adobe Connect Pro
la11459
 
ZIP
Writing resources_controller: Discovering REST Patterns in Rails
guest234ec21
 
PDF
DreamSpark for Educators
Lee Stott
 
.NET Variables and Data Types
LearnNowOnline
 
Building Windows 8 Metro Style Applications Using JavaScript and HTML5
LearnNowOnline
 
Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1
Clayton Boessen
 
Adobe's Creative Cloud pricing strategy and freelancers by 199 insights
199 Insights
 
Adobe Connect Pricing
Communique Conferencing, Inc.
 
Adobe Connect Pro
la11459
 
Writing resources_controller: Discovering REST Patterns in Rails
guest234ec21
 
DreamSpark for Educators
Lee Stott
 

Viewers also liked (20)

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

Similar to Object oriented techniques (20)

KEY
Bring a Web Page Alive with jQuery
LearnNowOnline
 
KEY
Generics
LearnNowOnline
 
KEY
What's new in Silverlight 5
LearnNowOnline
 
KEY
WPF Binding
LearnNowOnline
 
KEY
Managing site collections
LearnNowOnline
 
KEY
SharePoint Document Management
LearnNowOnline
 
KEY
.Net branching and flow control
LearnNowOnline
 
KEY
The Entity Data Model
LearnNowOnline
 
KEY
SQL Server: Security
LearnNowOnline
 
KEY
JavaScript: Operators and Expressions
LearnNowOnline
 
KEY
KnockOutJS with ASP.NET MVC
LearnNowOnline
 
KEY
Using The .NET Framework
LearnNowOnline
 
KEY
Object-Oriented JavaScript
LearnNowOnline
 
KEY
Expression Blend Motion & Interaction Design
LearnNowOnline
 
KEY
Web API HTTP Pipeline
LearnNowOnline
 
KEY
Web API Basics
LearnNowOnline
 
KEY
Introduction to ASP.NET MVC
LearnNowOnline
 
KEY
Creating a User Interface
LearnNowOnline
 
KEY
Asynchronous Programming
LearnNowOnline
 
PPT
Web technologies 2014
Raghav Rao
 
Bring a Web Page Alive with jQuery
LearnNowOnline
 
Generics
LearnNowOnline
 
What's new in Silverlight 5
LearnNowOnline
 
WPF Binding
LearnNowOnline
 
Managing site collections
LearnNowOnline
 
SharePoint Document Management
LearnNowOnline
 
.Net branching and flow control
LearnNowOnline
 
The Entity Data Model
LearnNowOnline
 
SQL Server: Security
LearnNowOnline
 
JavaScript: Operators and Expressions
LearnNowOnline
 
KnockOutJS with ASP.NET MVC
LearnNowOnline
 
Using The .NET Framework
LearnNowOnline
 
Object-Oriented JavaScript
LearnNowOnline
 
Expression Blend Motion & Interaction Design
LearnNowOnline
 
Web API HTTP Pipeline
LearnNowOnline
 
Web API Basics
LearnNowOnline
 
Introduction to ASP.NET MVC
LearnNowOnline
 
Creating a User Interface
LearnNowOnline
 
Asynchronous Programming
LearnNowOnline
 
Web technologies 2014
Raghav Rao
 
Ad

More from LearnNowOnline (11)

PPT
Windows 8: Shapes and Geometries
LearnNowOnline
 
PPT
SQL: Permissions and Data Protection
LearnNowOnline
 
PPT
New in the Visual Studio 2012 IDE
LearnNowOnline
 
KEY
Attributes, reflection, and dynamic programming
LearnNowOnline
 
KEY
WPF: Working with Data
LearnNowOnline
 
KEY
A tour of SQL Server
LearnNowOnline
 
KEY
Introducing LINQ
LearnNowOnline
 
KEY
SharePoint: Introduction to InfoPath
LearnNowOnline
 
KEY
Sql 2012 development and programming
LearnNowOnline
 
KEY
Introducing the Entity Framework
LearnNowOnline
 
KEY
Working with Controllers and Actions in MVC
LearnNowOnline
 
Windows 8: Shapes and Geometries
LearnNowOnline
 
SQL: Permissions and Data Protection
LearnNowOnline
 
New in the Visual Studio 2012 IDE
LearnNowOnline
 
Attributes, reflection, and dynamic programming
LearnNowOnline
 
WPF: Working with Data
LearnNowOnline
 
A tour of SQL Server
LearnNowOnline
 
Introducing LINQ
LearnNowOnline
 
SharePoint: Introduction to InfoPath
LearnNowOnline
 
Sql 2012 development and programming
LearnNowOnline
 
Introducing the Entity Framework
LearnNowOnline
 
Working with Controllers and Actions in MVC
LearnNowOnline
 

Recently uploaded (20)

PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
AVTRON Technologies LLC
 
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
AbdullahSani29
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PPTX
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
Doc9.....................................
SofiaCollazos
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
AVTRON Technologies LLC
 
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
AbdullahSani29
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 

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