

![]()


Object-Oriented Programming is a fundamental computer science course that introduces students to the concepts and principles of programming using objects and classes. The course covers key topics such as encapsulation, inheritance, polymorphism, and abstraction, enabling students to design and build modular, reusable, and maintainable software applications. Through theoretical discussions, hands-on exercises, and programming projects, students will develop proficiency in an object-oriented language, understand the importance of design patterns, and gain experience implementing real-world problem solutions following best practices in software development.
Recommended Textbook
C++ Programming Program Design Including Data Structures 6th Edition by D.S. Malik
Available Study Resources on Quizplus
21 Chapters
1050 Verified Questions
1050 Flashcards
Source URL: https://quizplus.com/study-set/319 Page 2
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/128444
Sample Questions
Q1) The device that stores information permanently (unless the device becomes unusable or you change the information by rewriting it)is called primary storage.
A)True
B)False
Answer: False
Q2) Dividing a problem into smaller subproblems is called ____ design.
A) OOD
B) top-down refinement
C) structured
D) analog
Answer: C
Q3) When the computer is turned off,everything in secondary memory is lost.
A)True
B)False
Answer: False
Q4) C++ programs have always been portable from one compiler to another.
A)True
B)False
Answer: False

Page 3
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5305
Sample Questions
Q1) ____________________ rules determine the meaning of instructions. Answer: Semantic semantic
Q2) The escape sequence \r moves the insertion point to the beginning of the next line. A)True B)False
Answer: False
Q3) The smallest individual unit of a program written in any language is called a(n)____________________.
Answer: token
Q4) In C++,you can use a(n)____________________ to instruct a program to mark those memory locations in which data is fixed throughout program execution. Answer: named constant constant
Q5) ____________________ is the process of planning and creating a program. Answer: Programming programming
To view all questions and flashcards with answers, click on the resource link above.
Page 4

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5306
Sample Questions
Q1) C++ comes with a wealth of functions,called ____________________ functions,that are written by other programmers. Answer: predefined pre defined pre-defined
Q2) Suppose that alpha,beta,and gamma are int variables and the input is:
100 110 120
200 210 220
300 310 320
What is the value of gamma after the following statements execute? cin >> alpha; cin.ignore(100,'\n'); cin >> beta; cin.ignore(100,'\n'); cin >> gamma; A) 100 B) 200 C) 300 D) 320
Answer: C
To view all questions and flashcards with answers, click on the resource link above.
Page 5

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5307
Sample Questions
Q1) Every else must be paired with a(n)____________________.
Q2) Putting a semicolon after the parentheses following the expression in an if statement (that is,before the statement)is a(n)____________________ error.
Q3) A control structure alters the normal sequential flow of execution in a program.
A)True
B)False
Q4) What is the output of the following C++ code?
int x = 35; int y = 45; int z; if (x > y)
\(\quad\)z = x + y; else
\(\quad\)z = y - x;
Cout << x << " " << y << " " << z << endl;
A) 35 45 80
B) 35 45 10
C) 35 45 -10
D) 35 45 0
Q5) In C++,the logical operator AND is represented by ____________________.
To view all questions and flashcards with answers, click on the resource link above. Page 6

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/128467
Sample Questions
Q1) Consider the following code.(Assume that all variables are properly declared.) cin >> ch; While (cin)
{ \(\quad\)cout << ch; \(\quad\)cin >> ch; }
This code is an example of a(n)____ while loop.
A) sentinel-controlled
B) flag-controlled
C) EOF-controlled
D) counter-controlled
Q2) What is the output of the following C++ code? num = 10; while (num > 10)
\(\quad\)num = num - 2;
cout << num << endl;
A) 0
B) 6
C) 8
D) 10
To view all questions and flashcards with answers, click on the resource link above.
Page 7

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5309
Sample Questions
Q1) Assume that all variables are properly declared.The following statement in a value-returning function is legal. if (x % 2 == 0)
\(\quad\)return x; else
\(\quad\)return x + 1;
A)True
B)False
Q2) Given the function prototype: double testAlpha(int u,char v,double t); which of the following statements is legal?
A) cout << testAlpha(5, 'A', 2);
B) cout << testAlpha( int 5, char 'A', int 2);
C) cout << testAlpha('5.0', 'A', '2.0');
D) cout << testAlpha(5.0, "65", 2.0);
Q3) Which of the following function prototypes is valid?
A) int funcTest(int x, int y, float z){}
B) funcTest(int x, int y, float){};
C) int funcTest(int, int y, float z)
D) int funcTest(int, int, float);
Q4) The program that tests a function is called a(n)____________________ program.
To view all questions and flashcards with answers, click on the resource link above. Page 8
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5310
Sample Questions
Q1) The ____ function is used to interchange the contents of two string variables.
A) iterator
B) traverse
C) swap
D) change
Q2) The scope of a namespace member is local to the ____.
A) function
B) block
C) file
D) namespace
Q3) The identifiers in the system-provided header files such as iostream,cmath,and iomanip are defined in the namespace ____.
A) cctype
B) stdl
C) std
D) stdlib
Q4) In C++,[] is called the array subscript operator.
A)True
B)False

9
Q5) The values in the domain of an enumeration type are called
To view all questions and flashcards with answers, click on the resource link above.
Page 10

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5311
Sample Questions
Q1) Which of the following correctly declares name to be a character array and stores "William" in it?
A) char name[6] = "William";
B) char name[7] = "William";
C) char name[8] = "William";
D) char name[8] = 'William';
Q2) The statement strlen("Marylin Stewart"); returns ____________________.
Q3) Suppose that sales is an array of 50 components of type double.Which of the following correctly initializes the array sales?
A) for (int 1 = 1; j <= 49; j++) \(\quad\)\(\quad\)Sales[j] = 0;
B) for (int j = 1; j <= 50; j++) \(\quad\)\(\quad\)Sales[j] = 0;
C) for (int j = 0; j <= 49; j++) \(\quad\)\(\quad\)Sales[j] = 0.0; D) for (int j = 0; j <= 50; j++) \(\quad\)\(\quad\)Sales[j] = 0.0;
Q4) The following statements store the value ____________________ into len. int len; len = strlen("Sunny California");
To view all questions and flashcards with answers, click on the resource link above. Page 11

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5312
Sample Questions
Q1) Aggregate input/output operations are allowed on a struct variable.
A)True
B)False
Q2) A(n)____________________ is a set of elements of the same type.
Q3) The contents of a struct variable must be written one member at a time.
A)True
B)False
Q4) Memory is allocated for struct variables only when you ____________________ them.
Q5) Consider the following function prototype: int seqSearch(const listType& list,int searchItem);
The actual parameter cannot be modified by ____.
A) seqSearch
B) listType
C) list
D) searchItem
Q6) Arrays are passed by ____________________ only.
Q7) Data in a struct variable must be read one member at a time.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 12

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/128469
Sample Questions
Q1) A(n)____________________ function of a class changes the values of the member variable(s)of the class.
Q2) How many destructors can a class have?
A) no explicit destructors
B) one
C) two
D) any number
Q3) The word ____ at the end of the member functions in the accompanying class clockType in Figure 1 specifies that these functions cannot modify the member variables of a clockType object.
A) static
B) const
C) automatic
D) private
Q4) A(n)____________________ contains the definitions of the functions to implement the operations of an object.
Q5) The public members of a class must be declared before the private members. A)True
B)False
Q6) Object code is produced from a(n)____________________.
Page 13
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5314
Sample Questions
Q1) Which of the following is true about inheritance?
A) All public member functions of the base class become the public member functions of the derived class.
B) All public member variables of the base class become the public member variables of the derived class.
C) All public members of the base class become the public members of the derived class.
D) The public member variables of the base class become the public or private member variables of the derived class.
Q2) If inheritance is private,all members of the base class,including private members,become private members of the derived class.
A)True
B)False
Q3) In OOD,a program is a collection of interacting ____________________; in structured programming,a program is a collection of interacting functions.
Q4) In ____________________,the derived class is derived from a single base class.
Q5) In ____________________ polymorphism,the (data)type is left unspecified and then later instantiated.
To view all questions and flashcards with answers, click on the resource link above. Page 14

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5315
Sample Questions
Q1) In a(n)____ copy,two or more pointers have their own data.
A) shallow
B) deep
C) static
D) dynamic
Q2) The statement int *p; is equivalent to int * p;,which is also equivalent to the statement ____________________.
Q3) The C++ operator ____ is used to destroy dynamic variables.
A) destroy
B) delete
C) *
D) ~
Q4) The ____________________ of a list is the number of elements in the list.
Q5) Which of the following would be appropriate syntax for the heading of a copy constructor for a class called rulerType?
A) rulerType(int inches, int centimeters)
B) rulerType()
C) rulerType(const rulerType& myRuler)
D) copy rulerType(int inches, int centimeters)
Q6) The binding of virtual functions occurs at program ____________________ time. Page 15
To view all questions and flashcards with answers, click on the resource link above.
Page 16

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5316
Sample Questions
Q1) A conversion constructor is a(n)____________________ parameter function.
Q2) The general syntax of the function prototype to overload the stream extraction operator >> for a class is ____.
A) istream& operator>>(istream&, className&);
B) const istream& operator>>(istream&, className&);
C) friend operator>>(istream&, className&);
D) friend istream& operator>>(istream&, className&);
Q3) To include the operator function operator+ as a nonmember function of the class rectangleType,its prototype in the definition of rectangleType is: ____ rectangleType operator+(const rectangleType&,const rectangleType&);
A) bool
B) int
C) double
D) friend
Q4) Class templates are called ____ types.
A) polymorphic
B) structured
C) member
D) parameterized
To view all questions and flashcards with answers, click on the resource link above. Page 17

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5317
Sample Questions
Q1) In C++,throw is a(n)____________________ word.
Q2) The heading of a try block can contain ellipses in place of a parameter.
A)True
B)False
Q3) The logic_error and runtime_error classes are defined in the header file ____.
A) stdex
B) stdlib
C) stdexcept
D) exception
Q4) If the catch block with an ellipses (in the heading)is needed,then it should be the first catch block in a sequence of try/catch blocks.
A)True
B)False
Q5) The code to handle exceptions depends on the type of application you develop.
A)True
B)False
Q6) The class ____________________ contains the function what.
Q7) All derived classes of the class exception override the function ____________________ to issue their own error messages.
To view all questions and flashcards with answers, click on the resource link above. Page 18

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5318
Sample Questions
Q1) Every call to a recursive function requires the system to allocate memory for the local variables and formal parameters.
A)True
B)False
Q2) A function is called ____ if it calls itself.
A) directly iterative
B) indirectly iterative
C) directly recursive
D) indirectly recursive
Q3) The collating sequence of A in the ASCII character set is ____________________.
Q4) Which of the following solutions is easier to construct for the Tower of Hanoi problem?
A) Recursive
B) Iterative
C) Procedural
D) Step-by-step
Q5) The fourth Fibonacci number in a sequence is the sum of the ____________________ Fibonacci numbers.
Q6) The numbering system that the computer uses is called the ____________________ system.
To view all questions and flashcards with answers, click on the resource link above. Page 19

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5319
Sample Questions
Q1) Data can be organized and processed sequentially using an array called a(n)____ list.
A) linked
B) ordered
C) sequential
D) ascending
Q2) The ____________________ operator advances the iterator to the next node in the linked list.
Q3) A linked list is a random access data structure.
A)True
B)False
Q4) The ____ deallocates the memory occupied by the nodes of a list when the class object goes out of scope.
A) constructor
B) destructor
C) head pointer
D) tail pointer
Q5) For classes that include pointer data members,the assignment operator must be explicitly ____________________.
Page 20
Q6) In a linked list,the link component of each node is a(n)____________________.
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5320
Sample Questions
Q1) In the linked implementation of stacks,the stack is ____________________ only if you run out of memory space.
Q2) The ____________________ elements of a stack and queue should not be accessed directly.
Q3) A technique in which one system models the behavior of another system is called ____.
A) imitation
B) recursion
C) simulation
D) stimulation
Q4) The bottom element of the stack is the last element added to the stack.
A)True
B)False
Q5) The postfix expression 14 2 5 + = will generate an error,because ____.
A) it contains an illegal operator
B) it does not have enough operands
C) it has too many operators
D) there will be too many elements in the stack when the equal sign is encountered
Q6) An array is a(n)____________________ access data structure.
21
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5321
Sample Questions
Q1) In general,the selection sort algorithm is good only for small lists because ____________________ grows rapidly as n grows.
Q2) The top node of a comparison tree is call the ____________________ node.
Q3) In a bubble sort for list of length n,the first step is to compare elements ____.
A) list[0] and list[n]
B) list[0] and list[n-1]
C) list[0] and list[1]
D) list[n-1] and list[n+1]
Q4) When moving array values for insertion sort,to move list[4] into list[2],first ____.
A) move list[2] to list[3]
B) delete list[2]
C) move list[4] to list[3]
D) copy list[4] into temp
Q5) For a list of length n,the bubble sort makes exactly ____________________ key comparisons.
Q6) To construct a search algorithm of the order less than log<sub>2</sub>n,it cannot be ____________________ based.
To view all questions and flashcards with answers, click on the resource link above.
Page 22

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5322
Sample Questions
Q1) In a binary tree,the level of the children of the root node is ____.
A) 0
B) 1
C) 2
D) 3
Q2) The ____ of a node in a binary tree is the number of branches on the path from the root to the node.
A) height
B) level
C) width
D) size
Q3) In addition to the inorder,preorder,and postorder traversals,a binary tree can also be traversed level-by-level,which is also known as ____________________ traversal.
Q4) In a diagram of a binary tree,each node is represented as a(n)____.
A) line
B) triangle
C) circle
D) rectangle
To view all questions and flashcards with answers, click on the resource link above. Page 23

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5323
Sample Questions
Q1) The starting vertex of a shortest path in a graph is called the ____________________.
Q2) An edge incident on a single vertex is called a(n)____.
A) block
B) cycle
C) component
D) loop
Q3) The implementation of a breadth first graph traversal uses a stack.
A)True
B)False
Q4) A graph G is a pair,G = (V,E),where V is a finite nonempty set called the set of ____ of G,and the elements of E are the pairs of elements of V.
A) nodes
B) branches
C) vertices
D) edges
Q5) In a directed graph,the pairs (u,v)and (v,u)represent the same edge.
A)True
B)False
Q6) A graph is ____________________ if the number of vertices is zero.
Page 24
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5324
Sample Questions
Q1) Every container contains the typedef ____________________.An iterator of this type is used to iterate through the elements of a container in reverse.
Q2) ____ returns the maximum number of elements that can be inserted into the vector container vecCont without reallocation.
A) vecCont.size()
B) vecCont.max_size()
C) vecCont.capacity()
D) vecCont.length()
Q3) The operator ____________________,supported by the queue container class,removes the next element in the queue.
Q4) The operator ____________________,supported by the stack container class,inserts a copy of item onto the stack.
Q5) A container's ____ executes when the object goes out of scope.
A) default constructor
B) destructor
C) copy constructor
D) iterator
Q6) The term ____________________ stands for double-ended queue.
To view all questions and flashcards with answers, click on the resource link above. Page 25