C++ MCQs on Object-Oriented System Development

OBJECT-ORIENTED SYSTEM DEVELOPMENT

1. One of the most frequently used second-generation development tools is

Explanation:

Correct answer: c) Data dictionary

Option c is the correct answer. A data dictionary is one of the most frequently used second-generation development tools. It is a centralized repository of information about data, such as data definitions, data structures, data relationships, and data usage within a system. It helps in documenting and managing data-related aspects of software development.


2. The classic software development life cycle is usually represented by

Explanation:

Correct answer: d) Water-fall model

Option d is the correct answer. The classic software development life cycle is usually represented by the Waterfall model. The Waterfall model is a sequential and linear approach to software development, where each phase must be completed before moving to the next phase. The phases include requirements gathering, design, implementation, testing, deployment, and maintenance.


3. The object-oriented approach uses heavily

Explanation:

Correct answer: d) Grid charts

Option d is the correct answer. The object-oriented approach uses heavily the concept of Grid charts, which are used to represent the relationships between classes and objects in an object-oriented system. Grid charts provide a visual representation of how classes and objects interact with each other, including inheritance, composition, and association relationships.


4. The fountain model of software development basically depicts

Explanation:

Correct answer: a) Overlap and iteration between various stages

Option a is the correct answer. The fountain model of software development, also known as the iterative model, depicts overlap and iteration between various stages of the development process. In the iterative model, the software development process is divided into smaller cycles, and each cycle involves the steps of planning, designing, implementing, and testing. These cycles are repeated until the desired software is achieved.


5. The 'is a' relationship can be illustrated by

Explanation:

Correct answer: d) Inheritance chart

Option d is the correct answer. The 'is a' relationship is illustrated by an inheritance chart in object-oriented programming. Inheritance allows one class (subclass or derived class) to inherit properties and behaviors from another class (superclass or base class). The subclass is a specialized version of the superclass, and it inherits all the attributes and methods of the superclass. This relationship is also known as a generalization relationship.


6. The process of one object calling a member of another object may be represented by

Explanation:

Correct answer: c) Use relationship

Option c is the correct answer. The process of one object calling a member of another object is represented by a use relationship in object-oriented programming. The use relationship signifies that one object utilizes the services or functions provided by another object to achieve its tasks. It represents a dependency between objects, where one object is dependent on another to perform a specific operation.


7. Data flow diagrams are also known as

Explanation:

Correct answer: b) Bubble charts

Option b is the correct answer. Data flow diagrams (DFDs) are also known as bubble charts. DFDs are graphical representations of the flow of data within a system. The diagrams consist of bubbles (also called nodes) representing processes, and arrows representing the flow of data between processes, data stores, and external entities. DFDs are widely used in software development for analyzing and modeling data processes.


8. Objects in a program may correspond to

Explanation:

Correct answer: b) Processes in a real-world problem and d) Nouns in textual analysis

Options b and d are the correct answers. Objects in a program may correspond to processes in a real-world problem and nouns in textual analysis. In object-oriented programming, objects represent real-world entities or concepts, and they encapsulate data and behavior related to those entities. These entities are modeled as objects, and their attributes and methods are defined within the class. The objects can represent processes or actions (such as a person, car, or bank account) in a real-world problem and are identified as nouns in textual analysis.


9. Which of the following types of verbs is likely to be a good candidate for representing a member function?

Explanation:

Correct answer: a) Compare verbs

Option a is the correct answer. Verbs that represent actions or operations are likely to be good candidates for representing member functions in a class. Compare verbs often imply some kind of action or operation, which makes them suitable for defining behaviors or operations that a class can perform.


10. To prepare a class hierarchy, we need to know

Explanation:

Correct answer: c) Common attributes and functions among classes

Option c is the correct answer. To prepare a class hierarchy, we need to identify common attributes and functions among classes. Class hierarchy represents the inheritance relationship between classes, where one class is a subclass of another class. Common attributes and functions help in defining the common behaviors and characteristics shared by related classes.


11. A class, in addition to service functions, may also contain

Explanation:

Correct answer: d) All the above

Option d is the correct answer. A class, in addition to service functions, may also contain class management functions, class access functions, and class utility functions. Class management functions are responsible for creating, initializing, and destroying objects of the class. Class access functions provide interfaces to access and modify the class's private data. Class utility functions perform various utility operations relevant to the class.


12. Which of the following statements is TRUE with regard to the design of classes?

Explanation:

Correct answer: d) All of the above

Option d is the correct answer. All the statements are true with regard to the design of classes. In object-oriented programming, the interaction between two classes should be explicit to maintain proper encapsulation and control. Objects of one class should not send messages directly to a member of another class to prevent tight coupling between classes. A class should be dependent on as few classes as possible to achieve low coupling and high cohesion. These principles help in creating well-designed and maintainable classes in a software system.


13. Which of the following statements is FALSE with regard to the design of member functions?

Explanation:

Correct answer: b) All functions must always be declared public

Option b is the correct answer. The statement is FALSE. Not all member functions must always be declared public. Member functions should be declared based on the intended accessibility and encapsulation requirements. Some functions may need to be declared private or protected to prevent direct access from external entities and to enforce proper data encapsulation. Public functions provide an interface for external entities to interact with the class, while private functions are used internally within the class implementation.


14. The main () function module known as the driver program

Explanation:

Correct answer: d) Creates objects and establishes communication between them

Option d is the correct answer. The main() function, known as the driver program, serves as the entry point of execution for a program. It creates objects of classes, initializes them, and establishes communication between them. The main() function is responsible for coordinating the overall execution flow of the program by calling various functions and methods defined in the classes to perform specific tasks.


15. Let a be an object of class A and b of class B. A and B have some association between them. Which of the following statements is TRUE?

Explanation:

Correct answer: d) None of the four

Option d is the correct answer. The statement "None of the four" is true. The question describes a situation where two classes, A and B, have some association between them. However, none of the given options are necessarily true in this context. Without specific details about the association between A and B, it is not possible to determine whether object a can send a message to b, or object b can do some service to a, or if one class must be a subclass of another. The correct answer is therefore "None of the four."



Your Score is 10

THE STUDENT FRIENDLY BOOK TO LEARN C++. 
Let us C++ by Famous author Yashavant Kanetkar
Indian writer


Topic wise C++ MCQs Index ≡ (Click to open)
Click on particular topic to visit that page
  1. Principles of Object-Oriented Programming 
  2. Beginning with C++
  3. Tokens, Expressions, and Control Structures
  4. Functions in C++
  5. Classes and Objects
  6. Constructors and Destructors
  7. Operator Overloading
  8. Inheritance
  9. Pointers, Virtual Functions, and Polymorphism
  10. Managing Console I/O Operations
  11. Working with Files
  12. Templates
  13. Exception Handling
  14. Standard Template Library
  15. Manipulating Strings
  16. New Features in ANSI C++ Standards
  17. Object-Oriented System Development

Post a Comment

0 Comments