Recent questions tagged object-oriented-programming

149
views
0 answers
0 votes
A constructor cannot be explicitly called by the client program. true or false?
92
views
0 answers
0 votes
A program that includes the file containing a class declaration is called a ________ program of the class.
495
views
4 answers
0 votes
331
views
1 answers
0 votes
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 ... design pattern would you like to apply? Explain the reasons with examples j
358
views
0 answers
0 votes
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 ( ... problems mentioned in the question? Write necessary java codes to solve the problem.
1.1k
views
1 answers
0 votes
Which one of the following features is supported by 𝐶 ++ but not by JAVA ?(a) Encapsulation(b) Multiple inheritance(c) Concurrency(d) Garbage collection
837
views
1 answers
0 votes
Which one of the following fundamental features of the OOPs is not supported by 𝐶++?(a) Persistence(b) Delegation(c) Genericity(d) Data abstraction
412
views
1 answers
1 votes
An object whose contents cannot be changed once the object is created is called:(a) Immutable object(b) Mutable object(c) Smart object(d) Rich object
757
views
1 answers
1 votes
During exception handling, which of the following statements hold true?Single try can have multiple associated catch with itA single Catch can have multiple ... when the class is inheritedFor a given exception, multiple catch can execute
1.5k
views
0 answers
0 votes
Consider the following recursive Java function $f$ that takes two long arguments and returns a float value:public static float f (long m, long n) { float result = (float)m / ( ... $?$0.2$0.4$0.6$0.8$
1.5k
views
1 answers
0 votes
If the objects focus on the problem domain, then we are concerned withObject Oriented AnalysisObject Oriented DesignObject Oriented Analysis and DesignNone of the above
9.5k
views
1 answers
0 votes
What is ‘Basis of Encapsulation’?objectclassmethodall of the mentioned
6.7k
views
1 answers
0 votes
Given a class named student, which of the following is a valid constructor declaration for the class?Student student(){}Private final student(){}Student(student s){}Void student(){}
1.1k
views
1 answers
0 votes
An object can have which of the following multiplicities?ZeroMore than oneOneAll of the above
3.7k
views
1 answers
0 votes
An operation can be described as:Object behaviorFunctionsClass behavior(A),(B)
3.8k
views
1 answers
0 votes
Object oriented inheritance models:"is a kind of" relationship."has a" relationship."want to be" relationship."contains" of relationship.
1.5k
views
1 answers
0 votes
The IOS class member function used for formatting IO iswidth(), precision(), read()width(), precision(), setf()getch(), width(), Io()unsetf() ,setf(), write()
1.5k
views
2 answers
0 votes
Give the output #include<iostream> using namespace std; class Base { public: int x,y; public: Base(int i, int j){x=i;y=j;} }; class Derived:public Base { public: ... ); q.print(); return 0; }$10\:10$Compiler Error$0\:0$None of the option
1.8k
views
2 answers
1 votes
Give the output #include<iostream> using namespace std; class Base1{ public: ~Base1() {cout<<"Base1's destructor"<<endl;} }; ... DestructorDerived's DestructorBase$2$'s destructorBase$1$'s destructorDerived's DestructorCompiler Dependent
988
views
2 answers
0 votes
The data hiding is taken care by :AbstractionEncapsulationModularityInheritance
4.2k
views
4 answers
0 votes
Abstraction and encapsulation are fundamental principles that underlie the object oriented approach to software development. What can you say about the following two ... correctBoth I and II are correctOnly II is correctOnly I is correct
2.3k
views
6 answers
0 votes
Consider the following JAVA program:public class First { public static int CBSE (int x) { if (x < 100)x = CBSE (x+10); return (x-1); } ... } }What does this program print?$59$ $95$ $69$ $99$
10.1k
views
3 answers
0 votes
Which of the following statement(s) with regard to an abstract class in JAVA is /are TRUE ?An abstract class is one that is not used to create objectsAn abstract ... inherited by other classesOnly I only II Neither I nor IIBoth I and II
2.5k
views
3 answers
0 votes
Which of the following cannot be passed to a function in C++?ConstantStructureArrayHeader file