AD3251 UNIT1 FLASHCARDS

27 flashcards · Computer Science · by Er.R. Sathish

  1. A mathematical-model with a collection of operations defined on that model is called Abstract Data Type

    Representation of data structure in memory

  2. A stack is an ordered collection of items that follows the LIFO principle.

  3. A queue is an ordered collection of items that follows the FIFO principle.

  4. Linked list stores ordered collection of elements

  5. Data structure is used for implementing recursion called Stack

  6. A class is an abstract plan for creating more particular, specialised items.

  7. Encapsulation - containing information in an object, exposing only selected information

  8. Abstraction - only exposing high level public methods for accessing an object

  9. Objects - Collections of data and procedures that are grouped into single, reusable entities.

  10. Polymorphism - objects can adopt more than one form, depending on their context

  11. Define Datatype:

    A data type is a classification of data that tells the compiler or interpreter how the programmer intends to use the data.

  12. List the data types in python

  13. Which inbuilt function in python can be used to identify the data type of the value or variable?

    type() Eg: >>>val1=10 >>>print(type(val1)) <class int>

  14. Abbreviate ADT

    Abstract Data Type

  15. Define Abstract Data Type

    An abstract data type is a set of operations. ADTs are mathematical abstractions; nowhere in an ADT’s definition is there any mention of how the set of operations is implemented. Objects such as lists, sets and graphs, along with their operations can be viewed as abstract data types.

  16. Categorize the different Programming Languages.

    Procedural Programming Functional Programming Object-Oriented Programming Scripting Programming Logic Programming

  17. What are the major features of OOP?

    Class Object Abstraction Encapsulation polymorphism Inheritance

  18. What is an object?

    An Object is an identifiable entity with some characteristics and behaviour. An Object is an instance of a Class. Objects can correspond to real-world objects or an abstract entity.

  19. What is a class?

    Classes are user-defined data types that act as the blueprint for individual objects, attributes, and methods.

  20. What are the benefits of OOP?

    Modularity Reusability Productivity Easily upgradable and scalable Interface description Security Flexibility

  21. What is abstraction?

    Abstraction is selecting data from a larger pool to show only relevant details of the object to the user.

  22. Define Encapsulation.

    Encapsulation is a concept of bundling data-related variables, properties, and methods in one class.

  23. What is inheritance?

    Inheritance describes is a kind of relationship between two or more classes, abstracting common details into super class and storing specific ones in the subclass.

  24. List the types of inheritance.

    Single Inheritance Multilevel Inheritance Hierarchical Inheritance Multiple Inheritance Hybrid Inheritance

  25. Which among the following best defines single level inheritance? a) A class inheriting a derived class b) A class inheriting a base class c) A class inheriting a nested class d) A class which gets inherited by 2 classes

    d) A class which gets inherited by 2 classes

  26. Members which are not intended to be inherited are declared as ________________ a) Public members b) Protected members c) Private members d) Private or Protected members

    c) Private members

  27. If a derived class object is created, which constructor is called first? a) Base class constructor b) Derived class constructor c) Depends on how we call the object d) Not possible

    a) Base class constructor