General OOP Terms

The flashcards below were created by user senator77 on FreezingBlue Flashcards.

  1. Object-oriented programming features:
    • -data abstraction
    • -encapsulation
    • -modularity
    • -polymorphism
    • -inheritance
  2. What is an object?
    An independent 'machine' with a distinct role or responsibility.
  3. Class
    A Class is a user defined datatype which contains the variables, properties and methods in it.
  4. Instance
    An occurrence or a copy of an object.
  5. Object State
    The set of values of the attributes of a particular object.
  6. Method
    Method is a set of procedural statements for achieving the desired result.
  7. Message Passing
    The process by which an object sends data to another object or asks the other object to invoke a method.
  8. Inheritance
    A class inherits all the state and behaviour of another class.

    • "Subclasses" are more specialized
    • versions of a class.
  9. Encapsulation
    Encapsulation conceals the functional details of a class from objects that send messages to it.
  10. Polymorphism
    The ability of objects belonging to different data types to respond to calls of methods of the same name, each one according to an appropriate type-specific behavior.
  11. What is meant by Object Oriented Programming?
    OOP is a method of programming in which programs are organised as cooperative collections of objects. Each object is an instance of a class and each class belong to a hierarchy.
  12. What is a Class?
    Class is a template for a set of objects that share a common structure and a common behaviour.
  13. What is an Object?
    Object is an instance of a class. It has state, behaviour and identity. It is also called as an instance of a class.
  14. What is an Instance?
    An instance has state, behaviour and identity. The structure and behaviour of similar classes are defined in their common class. An instance is also called as an object.
  15. What are the core OOP’s concepts?
    • Abstraction,
    • Encapsulation,
    • Inheritance and
    • Polymorphism are the core OOP’s concepts.
  16. What is meant by abstraction?
    Abstraction defines the essential characteristics of an object that distinguish it from all other kinds of objects. Abstraction provides crisply-defined conceptual boundaries relative to the perspective of the viewer. It’s the process of focusing on the essential characteristics of an object. Abstraction is one of the fundamental elements of the object model.
  17. What is meant by Encapsulation?
    Encapsulation is the process of compartmentalizing the elements of an abstraction that defines the structure and behaviour. Encapsulation helps to separate the contractual interface of an abstraction and implementation.
  18. What is meant by Inheritance?
    Inheritance is a relationship among classes, wherein one class shares the structure or behaviour defined in another class. This is called Single Inheritance. If a class shares the structure or behaviour from multiple classes, then it is called Multiple Inheritance. Inheritance defines “is-a” hierarchy among classes in which one subclass inherits from one or more generalized super classes.
  19. What is meant by Polymorphism?
    Polymorphism literally means taking more than one form. Polymorphism is a characteristic of being able to assign a different behavior or value in a subclass, to something that was declared in a parent class.
  20. What is an Abstract Class?
    Abstract class is a class that has no instances. An abstract class is written with the expectation that its concrete subclasses will add to its structure and behaviour, typically by implementing its abstract operations.
  21. What is an Interface?
    Interface is an outside view of a class or object which emphasizes its abstraction while hiding its structure and secrets of its behaviour.
  22. What is a Base Class?
    Base class is the most generalized class in a class structure. Most applications have such root classes. In Java, Object is the base class for all classes.
  23. What is a Subclass?
    • Subclass is a class that inherits from one or
    • more classes.
  24. What is a Superclass?
    Superclass is a class from which another class inherits.
  25. What is a Constructor?
    Constructor is an operation that creates an object and/or initializes its state.
  26. What is a Destructor?
    Destructor is an operation that frees the state of an object and/or destroys the object itself. In Java, there is no concept of destructors. Its taken care by the JVM.
  27. What is meant by Binding?
    Binding denotes association of a name with a class.
  28. What is meant by Static Binding?
    Static binding is a binding in which the class association is made during compile time. This is also called as Early Binding.
  29. What is meant by Dynamic Binding?
    Dynamic binding is a binding in which the class association is not made until the object is created at execution time. It is also called as Late Binding.
  30. Define Modularity?
    Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.
  31. What is meant by Persistence?
    Persistence is the property of an object by which its existence transcends space and time.
  32. What is Collaboration?
    Collaboration is a process whereby several objects cooperate to provide some higher level behaviour.
  33. In Java, How to make an object completely encapsulated?
    All the instance variables should be declared as private and public getter and setter methods should be provided for accessing the instance variables.
  34. How is polymorphism achieved in Java?
    Inheritance, Overloading and Overriding are used to achieve Polymorphism in Java.
  35. What is an abstraction and why is it important?
    Representing essential features by hiding the background process / details. In other words, it is specifying what to do but not how to do.
  36. Abstraction importance
    Abstraction is important at the conceptual level of an application. It helps in understanding clearly, what the process and the flow of an application. The abstraction allows the complete flow and development of an application into a structured action. The conceptual level of project execution is derived from abstraction which the gateway for the entire application development.
  37. Polymorphism
    Polymorphism means the ability to take more than one form. An operation may exhibit different behaviors in different instances. The behavior depends on the data types used in the operation.
Card Set
General OOP Terms
Object Oriented Programming Terms
Show Answers