Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

LogiPro101

@LogiPro101
About
Posts
4
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Abstract Classes
    L LogiPro101

    Difference between Abstract classes and Interface Little background: A real world entity is represented in an OOP world as object. Objects are defined as classes any language. A class defines objects in two aspects Object's characteristics - Data Members Object's functionality - Member functions So, when the classes that are forced to provide implementations of the functions prototypes that are defined in either ‘interfaces’ or a ‘abstract class’ are not belonging to the same family (having some inherited parental characteristics from same parent directly or indirectly) but are rather related through some functionalities then 100% we will go with interface and if above said classes are belonging to same family then we should go with abstract class inheritance. Also in case of inheritance as everything is a specialization of base parent object so there is allowance of providing some default definitions of the functions that are needed to be implemented further by specialized classes. This is not any way allowed in interfaces because implementing classes are not belonging to same family and are not any way related by characteristics. An Example: We have four real world objects: • Airplane • Bird • Sparrow • Eagle We have one method that is a functionality of all above objects • Fly Now all objects share common functionality flying in air but differ in the mechanism they use to fly. Also by close look we see that in general there is some common characteristics (as well as some common functionalities) between Sparrow and Eagle that can be a part of common class Bird (that has to be abstract because there is no real thing like bird!). But any way Airplane can't be related to Bird or its specialized classes Sparrow and Eagle. So if want to expose fly functionality to outer world and want their implementations in Airplane and Sparrow (or any bird), so I will 100% go for Interface and Abstract classes will be a big NO! But if we exclude Airplane want that fly functionality is exposed to outer world and its implementing classes are Bird, Sparrow and Eagle then 'Abstract Classes' is the best of best choice. Happy programming! Please feel free in writing to me for further clarifications on other OOP concepts (im.himanshu2006@gmail.com) Himanshu

    C# question learning

  • Abstract Base classes vs Interfaces
    L LogiPro101

    Difference between Abstract classes and Interface Little background: A real world entity is represented in an OOP world as object. Objects are defined as classes any language. A class defines objects in two aspects Object's characteristics - Data Members Object's functionality - Member functions So, when the classes that are forced to provide implementations of the functions prototypes that are defined in either ‘interfaces’ or a ‘abstract class’ are not belonging to the same family (having some inherited parental characteristics from same parent directly or indirectly) but are rather related through some functionalities then 100% we will go with interface and if above said classes are belonging to same family then we should go with abstract class inheritance. Also in case of inheritance as everything is a specialization of base parent object so there is allowance of providing some default definitions of the functions that are needed to be implemented further by specialized classes. This is not any way allowed in interfaces because implementing classes are not belonging to same family and are not any way related by characteristics. An Example: We have four real world objects: • Airplane • Bird • Sparrow • Eagle We have one method that is a functionality of all above objects • Fly Now all objects share common functionality flying in air but differ in the mechanism they use to fly. Also by close look we see that in general there is some common characteristics (as well as some common functionalities) between Sparrow and Eagle that can be a part of common class Bird (that has to be abstract because there is no real thing like bird!). But any way Airplane can't be related to Bird or its specialized classes Sparrow and Eagle. So if want to expose fly functionality to outer world and want their implementations in Airplane and Sparrow (or any bird), so I will 100% go for Interface and Abstract classes will be a big NO! But if we exclude Airplane want that fly functionality is exposed to outer world and its implementing classes are Bird, Sparrow and Eagle then 'Abstract Classes' is the best of best choice. Happy programming! Please feel free in writing to me for further clarifications on other OOP concepts (im.himanshu2006@gmail.com) Himanshu :)

    C / C++ / MFC visual-studio question

  • "interface and abstract"
    L LogiPro101

    Difference between Abstract classes and Interface Little background: A real world entity is represented in an OOP world as object. Objects are defined as classes any language. A class defines objects in two aspects Object's characteristics - Data Members Object's functionality - Member functions So, when the classes that are forced to provide implementations of the functions prototypes that are defined in either ‘interfaces’ or a ‘abstract class’ are not belonging to the same family (having some inherited parental characteristics from same parent directly or indirectly) but are rather related through some functionalities then 100% we will go with interface and if above said classes are belonging to same family then we should go with abstract class inheritance. Also in case of inheritance as everything is a specialization of base parent object so there is allowance of providing some default definitions of the functions that are needed to be implemented further by specialized classes. This is not any way allowed in interfaces because implementing classes are not belonging to same family and are not any way related by characteristics. An Example: We have four real world objects: • Airplane • Bird • Sparrow • Eagle We have one method that is a functionality of all above objects • Fly Now all objects share common functionality flying in air but differ in the mechanism they use to fly. Also by close look we see that in general there is some common characteristics (as well as some common functionalities) between Sparrow and Eagle that can be a part of common class Bird (that has to be abstract because there is no real thing like bird!). But any way Airplane can't be related to Bird or its specialized classes Sparrow and Eagle. So if want to expose fly functionality to outer world and want their implementations in Airplane and Sparrow (or any bird), so I will 100% go for Interface and Abstract classes will be a big NO! But if we exclude Airplane want that fly functionality is exposed to outer world and its implementing classes are Bird, Sparrow and Eagle then 'Abstract Classes' is the best of best choice. Happy programming! Please feel free in writing to me for further clarifications on other OOP concepts (im.himanshu2006@gmail.com) Himanshu

    C#

  • Abstract Classes
    L LogiPro101

    Difference between Abstract classes and Interface Little background: A real world entity is represented in an OOP world as object. Objects are defined as classes any language. A class defines objects in two aspects Object's characteristics - Data Members Object's functionality - Member functions So, when the classes that are forced to provide implementations of the functions prototypes that are defined in either ‘interfaces’ or a ‘abstract class’ are not belonging to the same family (having some inherited parental characteristics from same parent directly or indirectly) but are rather related through some functionalities then 100% we will go with interface and if above said classes are belonging to same family then we should go with abstract class inheritance. Also in case of inheritance as everything is a specialization of base parent object so there is allowance of providing some default definitions of the functions that are needed to be implemented further by specialized classes. This is not any way allowed in interfaces because implementing classes are not belonging to same family and are not any way related by characteristics. An Example: We have four real world objects: • Airplane • Bird • Sparrow • Eagle We have one method that is a functionality of all above objects • Fly Now all objects share common functionality flying in air but differ in the mechanism they use to fly. Also by close look we see that in general there is some common characteristics (as well as some common functionalities) between Sparrow and Eagle that can be a part of common class Bird (that has to be abstract because there is no real thing like bird!). But any way Airplane can't be related to Bird or its specialized classes Sparrow and Eagle. So if want to expose fly functionality to outer world and want their implementations in Airplane and Sparrow (or any bird), so I will 100% go for Interface and Abstract classes will be a big NO! But if we exclude Airplane want that fly functionality is exposed to outer world and its implementing classes are Bird, Sparrow and Eagle then 'Abstract Classes' is the best of best choice. Happy programming! Please feel free in writing to me for further clarifications on other OOP concepts (im.himanshu2006@gmail.com) Himanshu

    C# question learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups