GoConqr has a new look! Let us know what you think.

Quiz

Database Algorithm midterm

Duncan Levings 36 questions

Take the quiz

This quiz has question types that open in the usual player.

Questions in this quiz (36)

  1. 1Data Encapsulation:
    The separation of the representation of data from the applications that use the data at a logical level
    1. ATrue
    2. BFalse
  2. 2Abstract data type (ADT)
    A data type whose properties (domain and operations) are specified independently of any particular implementation
    1. ATrue
    2. BFalse
  3. 3Data structure
    A collection of data elements whose organization is characterized by accessing operations that are used to store and retrieve the individual data elements
    1. ATrue
    2. BFalse
  4. 4[blank_start]ADT[blank_end] is a high-level description: the logical picture of the data and the operations that manipulate them.

    [blank_start]Data Structure[blank_end] is concrete: a collection of data elements and the operations that store and retrieve individual elements.

    ADT is implementation [blank_start]independent[blank_end], whereas a data structure is implementation [blank_start]dependent[blank_end].

    A data structure is how we implement the data in an ADT whose values have component parts. The operations on an ADT are translated into algorithms on the data structure.
    1. AADT
    2. BData Structure
    3. Cindependent
    4. Ddependent
  5. 5Composite data type
    A data type that allows a collection of values to be associated with an object of that type

    Composite data types come in two forms:
    unstructured
    structured.

    An unstructured composite type is a collection of components that are not organized with respect to one another.

    A structured data type is an organized collection of components in which the organization determines the method used to access individual data components.
    1. ATrue
    2. BFalse
  6. 6[blank_start]Encapsulation[blank_end] This is the practice of keeping fields within a class private, then providing access to them via public methods

    [blank_start]Inheritance[blank_end] It lets programmers create new classes that share some of the attributes of existing classes

    [blank_start]Polymorphism[blank_end] This Java OOP concept lets programmers use the same word to mean different things in different contexts

    [blank_start]method overriding[blank_end] when the different meanings are implied by the values of the supplied variables

    1. AEncapsulation
    2. BInheritance
    3. CPolymorphism
    4. Dmethod overriding
  7. 7Stack
    Visualize stack as a deck of cards. The current top card represents the current scope of the program, usually the function that is currently being execute

    Last in First out
    1. ATrue
    2. BFalse
  8. 8Heap/Queue
    The heap is an area of memory that is completely independent of the current function or stack frame
    The heap is less structured than the stack. You can think of it as just a pile of bits. Your program can add new bits to the pile at any time or modify bits that are already in the pi


    First in First out
    1. ATrue
    2. BFalse
  9. 9C++ allows you to mark a class as final, which means trying to inherit from it will result in a compiler error. A class can be marked as final with the final keyword right behind the name of the class
    1. ATrue
    2. BFalse
  10. 10AlgorithmarrayMax(A, n) # operations
    currentMax←A[0] [blank_start]2[blank_end]
    for i ← 1 to n − 1 do [blank_start]1 +n[blank_end]
    if A[i] > currentMax then [blank_start]2(n−1)[blank_end]
    currentMax ← A[i] 2(n−1)
    { increment counter i} 2(n−1)
    return currentMax [blank_start]1[blank_end]
    Total [blank_start]7n−2[blank_end]
    Running time: [blank_start]O(n)[blank_end]
    1. A2
    2. B1 + n
    3. C2(n−1)
    4. D1
    5. E7n−2
    6. FO(n)

Information

Description
Computer Science Quiz on Database Algorithm midterm, created by Duncan Levings on 19/02/2019.
Language
English
Views
2
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?