Recent questions tagged object-oriented-programming

1 1 vote
1 1 answer
148
148 views
Which of the following is not true about constructorWhen an object is created and initialized at the same time, a copy constructor gets called.They do not have return typ...
0 0 votes
1 1 answer
181
181 views
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason RAssertion A: We can build an object from a class containing a pure vir...
0 0 votes
0 0 answers
110
110 views
Arrange the following applet life cycles methods in sequence$\operatorname{start}()$$\operatorname{paint()}$$\operatorname{init()}$$\operatorname{stop()}$Choose the corre...
0 0 votes
1 1 answer
121
121 views
Which of the following statements are True?The $++$ operator can be overloaded to perform decrementation of a variable.It is necessary that a constructor in a class shoul...
0 0 votes
2 2 answers
494
494 views
Match List I with List II$\begin{array}{|ll|ll|} \hline & \textbf{List I} & & \textbf{List II} \\ \hline \text{A.} & \text{Overloading} & \text{I.} & \text{Since function...
0 0 votes
2 2 answers
407
407 views
Which of the following statement is not True?A data member of a class can be declared as static and is normally used to maintain values common to the entire class.A frien...
0 0 votes
0 0 answers
198
198 views
What is the output of code given below:#include<iostream.h using namespace std; class Base { public: Base(){ cout<<"Base Const"; } virtual ~Base() { cout<<"Base dest"; } ...
0 0 votes
2 2 answers
380
380 views
Which of the following C++ statements correctly declares an abstract class?class A { virtual void show ()=0; };class A { void show ()=0; };class A { void show() {} ; };cl...
0 0 votes
1 1 answer
384
384 views
Which of the following are TRUE about constructors in C++?A constructor can be overloaded.A constructor does not have a return type.A constructor must be declared as a fr...
0 0 votes
1 1 answer
263
263 views
Which of the following statements is TRUE?Virtual functions do not implement polymorphismVirtual functions do not permit calling of derived class functions using a base c...
0 0 votes
1 1 answer
271
271 views
Which of the statement are CORRECT?Constructors are invoked automatically when the objects are created.Constructors do not have return types, not even void and therefore ...
0 0 votes
0 0 answers
216
216 views
The steps for analysis and design of object oriented system.Draw interaction diagramsDraw state chart and object diagramDraw use case and activity diagramDraw component a...
0 0 votes
2 2 answers
439
439 views
Given below are two statements :Statement $\text{(I)}$ : The friend function and the member functions of a friend class directly access the private and protected data.Sta...
0 0 votes
0 0 answers
498
498 views
A constructor cannot be explicitly called by the client program. true or false?
0 0 votes
0 0 answers
263
263 views
A program that includes the file containing a class declaration is called a ________ program of the class.
0 0 votes
1 answers 1 answer
530
530 views
Function overloading is a concept in which :a function is used to implement lots of tasks at the same time.a function is called too many number of times by another functi...
0 0 votes
1 1 answer
629
629 views
Which of the following is true?A "static" member of a class cannot be inherited by its derived class.A "static" member of a class can be initialized only within the class...
0 0 votes
4 4 answers
1.1k
1.1k views
0 0 votes
0 0 answers
429
429 views
Given below are two statements:Statement $\text{I}$: subsystem models show logical grouping of objects into coherent subsystemStatement $\text{II}$: State machine models ...
1 1 vote
2 2 answers
856
856 views
If a constructor 'Date' is declared explicitly and has to be defined outside the class, which of the following is correct?Date::Date(int dd) $\{/ * \ldots * /\}$explicit ...
0 0 votes
0 0 answers
349
349 views
Match $\text{List I}$ with $\text{List II}$$\text{List I}$$\text{List II}$$\text{A}$. If the implementation of generated or derived classes differ only through a paramete...
0 0 votes
1 1 answer
568
568 views
Imagine a scenario where new child classes are introduced frequently from a base class. The method calling sequences for every child class are the same but the implementa...
0 0 votes
0 0 answers
608
608 views
Suppose, you are implementing “Overdraft Account (OD)” class using java for a banking app. An OD type account is opened with an approved loan limit (ex 100000/-). The acc...
0 0 votes
0 0 answers
533
533 views
Match List I with List II : List IList II(A) Localization(I) Encapsulationlation(B) Packaging or binding of a collection of items(II) Abstraction(C) Mechanism that enable...