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

Flashcards

OOP Phase Test

b3014292 English 23 cards

Cards in this deck (23)

  1. 1What is a const qualifier?The qualifier const can be applied to the declaration of any variable to indicate that its value will not be changed
    e.g. const MOUSE = 'M';
  2. 2What type of constructor is Cat cat(); ?Default Constructor
  3. 3A pointer contains......a memory address of their value!
    e.g. int *aPointerVar;
  4. 4What type of code is this? &someCode;A memory address.
    These can be used in pointers to point to a memory address.
  5. 5What kind of relationship would the following be: Player* player = p_player;Direct Association
  6. 6What type of relationship would this be: private Score score_ = new Score();Composition
  7. 7If a object needs to know another object (but not to modify it), what type of relationship would it be?Association
  8. 8Can private member functions be assigned to other classes directly?No
  9. 9What are dice1_ and dice2_ the instance of shown below? class Game { private Dice dice1_, dice2_; public: Player getPlayer() const; };Dice
  10. 10Does a class member always has to be const?No
  11. 11What is cohesive?It is the code and how it all works together
  12. 12What is Coupled?The interaction between two classes
  13. 13To be easy to maintain, reuse and test a software module should be......Highly cohesive and loosely coupled
  14. 14Can ANKsvn solve problems in code?No, ANKsvn identifies the conflict but cannot solve it.
  15. 15Operator overloading is......a form of function overloading.
    (Overload operators can work in private function)
  16. 16In OOP, what cant you do when calculating values from a object?You cannot put direct values into it.
    (e.g. t = t + ct; //Correct
    t = 12 + t; //Incorrect)
  17. 17Can you return a value that is private?No, you will get a error if that happened!
  18. 18What does the class name and operation name in C++ look like?ClassName operationName
  19. 19When writing a class, what structure should it look like?class Mouse{
    public:
    int getX();
    int getY();
    private:
    int x_, y_;
    }
  20. 20What is a function member?A function member is all the classes that can be accessed for both public and private operations.
    class TIme{
    public:
    //function member
    private
    //function member
    }
  21. 21What does this operator represent? x_, mouseY_, etc.Accesses the member of the instance.
  22. 22What is :: and when is it used?Scope Resolution Operator
    These are placed before a member function name.
    int Time::getHours() const {
    return hours_;
    }
  23. 23Define what an association relationship between two classes in an OO system is and explain what it is used for.Try it yourself!!!

Information

Description
Flashcards on OOP Phase Test, created by b3014292 on 08/02/2015.
Created by
b3014292
Views
10
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?