Recent questions tagged object-oriented-programming

1 1 vote
1 1 answer
213
213 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...
1 1 vote
1 1 answer
251
251 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
134
134 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
174
174 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
512
512 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
418
418 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
207
207 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
396
396 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
403
403 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
279
279 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
291
291 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
230
230 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
464
464 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
508
508 views
A constructor cannot be explicitly called by the client program. true or false?
0 0 votes
0 0 answers
272
272 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
550
550 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
658
658 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
437
437 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
872
872 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
360
360 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
580
580 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
620
620 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
543
543 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...