Intersoft Quiz

15 Questions | Attempts: 182
Share

SettingsSettingsSettings
Intersoft Quiz - Quiz

Questions and Answers
  • 1. 

    Which one of the following is a logical abstract class for a class called "football player"?

    • A.

      Team

    • B.

      Game

    • C.

      Sport

    • D.

      Athlete

    • E.

      Salary

    Correct Answer
    D. Athlete
  • 2. 

    You have developed classes that "wrap" basic operating system functionality. Referring to the above, what is the benefit of requiring your other classes to go through these "wrapper" classes for OS functions rather than accessing them directly?

    • A.

      Efficiency

    • B.

      Execution speed

    • C.

      Portability

    • D.

      Scalability

    • E.

      Thread safety

    Correct Answer
    C. Portability
  • 3. 

    In reference to the above, Class C contains all of the following attributes EXCEPT which one?

    • A.

      Name

    • B.

      Height

    • C.

      Weight

    • D.

      IdNumber

    • E.

      Color

    Correct Answer
    E. Color
  • 4. 

    In the class diagram above, what are the three sections from top to bottom?

    • A.

      Class name, attributes, methods

    • B.

      Class name, methods, attributes

    • C.

      Data file, methods, subclasses

    • D.

      Superclass, subclasses, attributes

    • E.

      Class name, collaborators, subclass methods

    Correct Answer
    A. Class name, attributes, methods
  • 5. 

    Which one of the following is NOT a benefit of using accessor methods instead of allowing direct access to class attributes?

    • A.

      They can prevent improper modifications to attributes.

    • B.

      They ease maintenance when the attribute is changed.

    • C.

      They can prevent issues when accessing non-initialized attributes.

    • D.

      They allow for different attribute storage structures within the class.

    • E.

      They enhance performance.

    Correct Answer
    E. They enhance performance.
  • 6. 

    Public abstract class Base {   protected void subop1();   protected void subop2();   protected void supop3();   void operation() {      ...      supop1();      ...      supop2();      supop3();      ...} } The operation() method above is an example of which one of the following patterns?

    • A.

      Strategy [GoF95]

    • B.

      Template Method [GoF95]

    • C.

      Lazy Initialization [Beck97]

    • D.

      Controller [Larman98]

    • E.

      Extend Super [Beck97]

    Correct Answer
    B. Template Method [GoF95]
  • 7. 

    Which one of the following statements does NOT apply to the Observer Behavioral Design Pattern?

    • A.

      The subject may have any number of dependent observers.

    • B.

      Subjects dynamically attach themselves to Observers to keep them independent of each other.

    • C.

      The Observer Pattern may be implemented as a "push" or a "pull."

    • D.

      The observer may depend on any number of subjects.

    • E.

      All dependent observers are notified when the subject undergoes a state change.

    Correct Answer
    B. Subjects dynamically attach themselves to Observers to keep them independent of each other.
  • 8. 

    Which one of the following Behavioral Design Patterns is provided as a key element of the C++ Standard Template Library (STL)?

    • A.

      Mediator [GoF95]

    • B.

      Command [GoF95]

    • C.

      Strategy [GoF95]

    • D.

      Iterator [GoF95]

    • E.

      Template Method [GoF95]

    Correct Answer
    D. Iterator [GoF95]
  • 9. 

    Which one of the following creational Design Patterns does the above UML Sequence Diagram represent?

    • A.

      Prototype [GoF95]

    • B.

      Builder [GoF95]

    • C.

      Factory Method [GoF95]

    • D.

      Abstract Factory [GoF95]

    • E.

      Singleton [GoF95]

    Correct Answer
    B. Builder [GoF95]
  • 10. 

    Four of the five Creational Design Patterns identified by the Gang of Four (GoF) provide a means to parameterize the creation of objects. Referring to the above statement, when considering Creational Design Patterns, which one of the following patterns is the most simple (i.e., least complex) but least flexible?

    • A.

      Prototype

    • B.

      Factory Method

    • C.

      Memento

    • D.

      Builder

    • E.

      Abstract Factory

    Correct Answer
    B. Factory Method
  • 11. 

    Create table vtable (   a varchar(10) not null,   b integer null,   c char(10) not null,   d varchar(10) not null ) Referring to the above SQL, at least how many column values must be specified by a SQL "insert" statement to create a new row in table "vtable"?

    • A.

      None - the statement is invalid.

    • B.

      One column value

    • C.

      Two column values

    • D.

      Three column values

    • E.

      Four column values

    Correct Answer
    D. Three column values
  • 12. 

    SELECT fname,lname,ssn,dob FROM employees ORDER BY lname Question: What is added to the above SQL to sort the rows in reverse alphabetical order?

    • A.

      Asc

    • B.

      Descend

    • C.

      Desc

    • D.

      Decreasing

    • E.

      Reverse

    Correct Answer
    C. Desc
  • 13. 

    What delimits columns in a SQL query string?

    • A.

      Commas

    • B.

      Semicolons

    • C.

      Colons

    • D.

      Periods

    • E.

      Space characters

    Correct Answer
    A. Commas
  • 14. 

    What SQL keyword do you use to view all records where the last_name column begins with the letters "sm" or ends with "th"?

    • A.

      Substring

    • B.

      Having

    • C.

      Has

    • D.

      Includes

    • E.

      Like

    Correct Answer
    E. Like
  • 15. 

    Select avg(price),max(price), min(price) from product Question: What is wrong with the above SQL statement?

    • A.

      Only one column function is allowed in the select list.

    • B.

      Aggregate functions require a "group by" clause.

    • C.

      There is no WHERE clause.

    • D.

      Multiple aggregates must operate on different columns.

    • E.

      Nothing is wrong.

    Correct Answer
    E. Nothing is wrong.

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Feb 27, 2013
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 01, 2012
    Quiz Created by
    Eugene_tihonov
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.