SlideShare une entreprise Scribd logo
1  sur  10
Software
Development Best
Practices
    Object Oriented Technology
    Class/Modules
    General
    Questions
Object Oriented
Technology
   Encapsulation
   Inheritance
   Abstraction
   Polymorphism
Encapsulation
 Public – Visible to all, Shared
  members
 Protected – Visible only through

  inheritance
 Default – Package level access

 Private – Visible only within the

  component
Rule: Protect variables by methods,
  Limit and Control code access
Inheritance




   Apply “IS A” rule
Abstraction
   A way to segregate implementation
    from interface.
   Achieved by using interface and
    abstract class.
   Use abstract class if you know the
    common behaviour.
   User interface when
    implementation varies.
Polymorphism
Behaviour vary by type
 Overloading – Object at compile

  time
 Overriding – Object at runtime

 Super type Method Argument

 Super type Variable

 Return Super type
Class/Module
   Loose Coupling – Interaction
    through Simple Interface
   High Cohesion – Reliability,
    Reusability, Reduced maintenance
    and modification costs.
   Name – NOUN
   Package – Should not contain
    irrelevant classes
                               -cont.
Class/Modules
   Use appropriate access levels.
   Method – Self Explanatory. Use of
    Java bean standards.
General
   Use source control system.
   Use coding standards – Variable,
    Class, Method name, tabs,
    brackets.
   Delete unused code.
   Catch specific exception.
   Use understandable comments.
Questions

Thank You.

Contenu connexe

Similaire à Software development best practices

Chapter 03 enscapsulation
Chapter 03 enscapsulationChapter 03 enscapsulation
Chapter 03 enscapsulationNurhanna Aziz
 
Core java interview questions
Core java interview questionsCore java interview questions
Core java interview questionsVinay Kumar
 
116824015 java-j2 ee
116824015 java-j2 ee116824015 java-j2 ee
116824015 java-j2 eehomeworkping9
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming languageMd.Al-imran Roton
 
Object Oriented Programming - Polymorphism and Interfaces
Object Oriented Programming - Polymorphism and InterfacesObject Oriented Programming - Polymorphism and Interfaces
Object Oriented Programming - Polymorphism and InterfacesHabtamu Wolde
 
Core Java Introduction | Basics
Core Java Introduction  | BasicsCore Java Introduction  | Basics
Core Java Introduction | BasicsHùng Nguyễn Huy
 
Java questions for interview
Java questions for interviewJava questions for interview
Java questions for interviewKuntal Bhowmick
 
Corejavainterviewquestions.doc
Corejavainterviewquestions.docCorejavainterviewquestions.doc
Corejavainterviewquestions.docJoyce Thomas
 
Java Access Specifier
Java Access SpecifierJava Access Specifier
Java Access SpecifierDeeptiJava
 
Object oriented programming 3 object oriented concepts
Object oriented programming 3 object oriented conceptsObject oriented programming 3 object oriented concepts
Object oriented programming 3 object oriented conceptsVaibhav Khanna
 
9 crucial Java Design Principles you cannot miss
9 crucial Java Design Principles you cannot miss9 crucial Java Design Principles you cannot miss
9 crucial Java Design Principles you cannot missMark Papis
 

Similaire à Software development best practices (20)

Core java questions
Core java questionsCore java questions
Core java questions
 
Suga java training_with_footer
Suga java training_with_footerSuga java training_with_footer
Suga java training_with_footer
 
Chapter 03 enscapsulation
Chapter 03 enscapsulationChapter 03 enscapsulation
Chapter 03 enscapsulation
 
Oops (inheritance&interface)
Oops (inheritance&interface)Oops (inheritance&interface)
Oops (inheritance&interface)
 
Core java interview questions
Core java interview questionsCore java interview questions
Core java interview questions
 
Pocket java
Pocket javaPocket java
Pocket java
 
Oop concepts
Oop conceptsOop concepts
Oop concepts
 
116824015 java-j2 ee
116824015 java-j2 ee116824015 java-j2 ee
116824015 java-j2 ee
 
Java session2
Java session2Java session2
Java session2
 
Design patterns
Design patternsDesign patterns
Design patterns
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
 
Ch09
Ch09Ch09
Ch09
 
Object Oriented Programming - Polymorphism and Interfaces
Object Oriented Programming - Polymorphism and InterfacesObject Oriented Programming - Polymorphism and Interfaces
Object Oriented Programming - Polymorphism and Interfaces
 
Core Java Introduction | Basics
Core Java Introduction  | BasicsCore Java Introduction  | Basics
Core Java Introduction | Basics
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
Java questions for interview
Java questions for interviewJava questions for interview
Java questions for interview
 
Corejavainterviewquestions.doc
Corejavainterviewquestions.docCorejavainterviewquestions.doc
Corejavainterviewquestions.doc
 
Java Access Specifier
Java Access SpecifierJava Access Specifier
Java Access Specifier
 
Object oriented programming 3 object oriented concepts
Object oriented programming 3 object oriented conceptsObject oriented programming 3 object oriented concepts
Object oriented programming 3 object oriented concepts
 
9 crucial Java Design Principles you cannot miss
9 crucial Java Design Principles you cannot miss9 crucial Java Design Principles you cannot miss
9 crucial Java Design Principles you cannot miss
 

Software development best practices

  • 1. Software Development Best Practices Object Oriented Technology Class/Modules General Questions
  • 2. Object Oriented Technology  Encapsulation  Inheritance  Abstraction  Polymorphism
  • 3. Encapsulation  Public – Visible to all, Shared members  Protected – Visible only through inheritance  Default – Package level access  Private – Visible only within the component Rule: Protect variables by methods, Limit and Control code access
  • 4. Inheritance  Apply “IS A” rule
  • 5. Abstraction  A way to segregate implementation from interface.  Achieved by using interface and abstract class.  Use abstract class if you know the common behaviour.  User interface when implementation varies.
  • 6. Polymorphism Behaviour vary by type  Overloading – Object at compile time  Overriding – Object at runtime  Super type Method Argument  Super type Variable  Return Super type
  • 7. Class/Module  Loose Coupling – Interaction through Simple Interface  High Cohesion – Reliability, Reusability, Reduced maintenance and modification costs.  Name – NOUN  Package – Should not contain irrelevant classes -cont.
  • 8. Class/Modules  Use appropriate access levels.  Method – Self Explanatory. Use of Java bean standards.
  • 9. General  Use source control system.  Use coding standards – Variable, Class, Method name, tabs, brackets.  Delete unused code.  Catch specific exception.  Use understandable comments.

Notes de l'éditeur

  1. Coupling increases between two classes  A  and  B  if: A  has an attribute that refers to (is of type)  B . A  calls on services of an object  B . A  has a method that references  B  (via return type or parameter). A  is a subclass of (or implements) class  B .