🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

OOPSE questions 11-20
10 Questions
8 Views

OOPSE questions 11-20

Created by
@SnazzyOnyx7314

Podcast Beta

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Select one:

  • Unknown exception
  • No exception
  • Exception(int) with value: 10 (correct)
  • Exception(double) with value: 1.1
  • The following code snippet:

    template T& min(T& l, T& r) { return l <= r ? l : r; }

    represents:

  • a function template that can always be instantiated
  • a part of class template that can be instantiated if the &lt;= operator is defined for type T
  • a function template that can be instantiated if the &lt;= operator is defined for type T (correct)
  • a class template
  • Inheritance in C++ has the following properties:

  • it is not allowed to inherit from many classes at once
  • it's impossible to call the method which is defined in a base class inside a method that overrides it
  • is a mechanism of reusing and extending existing classes without modifying them (correct)
  • the same method may have different meanings in derived classes (correct)
  • Inheritance in C++ is possible when:

    <p>both declarations and the object code of base class(es) are available</p> Signup and view all the answers

    When we apply the object-oriented paradigm, we in general:

    <p>manage the state of an object with the use of methods that belong to the object's class</p> Signup and view all the answers

    Qt's signals/slots mechanism has the properties:

    <p>signal and slots are loosely coupled: a class which emits a signal neither knows nor cares which slots receive the signal</p> Signup and view all the answers

    To declare an operator function in C++:

    <p>use an existing operator symbol, prefixing it with the operator keyword</p> Signup and view all the answers

    The vector class in the C++ Standard Library has the properties:

    <p>Provides a constant time insertion and removal of elements at the end and beginning</p> Signup and view all the answers

    The following C++ code snippet:

    int a; double d; ofstream os("Data.csv"); os << a << "," << d;

    will:

    <p>save the values of the a and d variables in the file</p> Signup and view all the answers

    In order to test the indexing operator with the use of equivalence partitioning and boundary values analysis methods, one needs to prepare a test suite with:

    <p>at least 5 values of 'i' parameter</p> Signup and view all the answers

    More Quizzes Like This

    Java OOPs Concepts Quiz
    5 questions
    OOPS using C++
    11 questions

    OOPS using C++

    RewardingCherryTree avatar
    RewardingCherryTree
    OOPSE questions 1-10
    10 questions

    OOPSE questions 1-10

    SnazzyOnyx7314 avatar
    SnazzyOnyx7314
    Use Quizgecko on...
    Browser
    Browser