Topical Information

Here are a few questions to help you clarify your understanding of object-oriented programming terminology and basic syntax.

Question Set Information

Questions

  1.  
    TRUE FALSE  Object-oriented (OO) programmers often use the term object rather than things like "variable" or "memory location".
    TRUE FALSE  OO programmers focus more on the actions their objects undergo than on the data making up the objects.
    TRUE FALSE  The C++ object that represents the console screen or display is cin.
    TRUE FALSE  To call a function with respect to an object, the object is placed on the left side of a period — the dot operator, in fact — and the function call on the right.
  2. The term "calling object" refers to the object to the left of the dot operation used when calling a function with respect to an object. (The function call is actually quite normal and goes on the right of the afore-mentioned operation.)

  3. Show how you would specify that one character should be thrown out of cin's buffer.

    
            cin.ignore();
    
    

    What if you wanted to throw up to 10 characters out but not past a colon (':') symbol?

    
            cin.ignore(10, ':');
    
    

    And what if you wanted to throw out as many characters as it takes to reach (and also throw out) a newline?

    
            cin.ignore(numeric_limits<streamsize>::max(), '\n');