SSL Certificate
  • Which of the following statements is are true

1. (TCO 2) Which of the following statements is/are true? (Points : 2)
        Object names are listed in the middle section of a UML diagram.
        Attribute names are listed in the middle section of a UML diagram.
        Method names are listed in the middle section of a UML diagram.
        Class names are listed in the middle section of a UML diagram.
        None of the above

2. (TCO 2) Java, C#, and C++ all allow for the use of comments. Which of the following represent(s) valid comments in these three languages? (Points : 2)
        */ Comment */
        / Comment /
        -- Comment --
        <! Comment !>
        All of the above
        None of the above

3. (TCO 2) The _____ keyword means that only one copy of an attribute exists and it is shared by ALL objects instantiated by the associated class. (Points : 2)

4. (TCO 2) _____ are methods that have the same name as the class they are declared in and are used to initialize attributes. (Points : 2)
        Static methods
        Public methods
        None of the above

5. (TCO 2) Benefits of encapsulation include which of the following? (Points : 2)
        Universal data access
        Reduced data dependencies
        Decrease in implementation time
        Stable communication between applications
        All of the above

6. (TCO 2) Which of the following symbols indicate(s) level of access for both attributes and methods in a class. (Points : 2)
        All of the above

7. (TCO 2) Object-oriented classes should be designed with the concept of a black box in mind. This means that users of the class should only need to know what _____ and _____ are associated with the class. The actual implementation details need not be known. (Points : 2)
        interface; implementation
        inputs; outputs
        objects; accessors
        relationships; interfaces

8. (TCO 2) In order to increase the quality of our code, _____ and information/data hiding should be considered when designing any object-oriented class. (Points : 2)
        overloaded constructors
        an object’s initial state

9. (TCO 2) Given a private attribute called age, which of the following are proper implementations for a getter and a setter? (Points : 2)
        void getAge(){return age;}, void setAge(int newAge){age = newAge;}
        int getAge(){return age;}, int setAge(int newAge){return newAge;}
        int getAge(){age = newAge;}, void setAge(int newAge){return age;}
        int getAge(){return age;}, void setName(int newAge){age = newAge;}

10. (TCO 2) Identify the attribute declaration(s) below that most likely contribute to the concept of information/data hiding and is correctly declared. (Points : 2)
        private age;
        int age;
        int private age;
        public int age;
        None of the above

Write a review

Please login or register to review

Which of the following statements is are true

  • $9.99

*All your data are SECURED & ENCRYPTED using a valid, trusted server certificate (Comodo SSL) and we don't store credit card information on our servers and all Payments are SECURED & handled by Paypal.
SSL CertificatePaypal

Tags: Multiple choice question, MCQ, java, cSharp, C#, cpp