search
Log In
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Recent questions and answers in Object Oriented Programming

0 votes
1 answer
1
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 / (float)n; if (m < 0 ¦ n<0 return 0.0f; else result -=f(m*2, n*3); return result; } Which of the following real values best approximates the value of $f(1,3)$? $0.2$ $0.4$ $0.6$ $0.8$
answered Dec 24, 2020 in Object Oriented Programming Àbhíjèét Míshrà 90 views
0 votes
1 answer
2
The diagramming language suitable for object-oriented paradigm is Data Flow Diagramming Language Entity-Relationship Language Object-Oriented Language Unified Modeling Language
answered Nov 16, 2020 in Object Oriented Programming abhishek tiwary 98 views
0 votes
1 answer
3
Which of the following is not true in C++ ? Private elements of a base class are not accessible by members of its derived class. Protected elements of base class are not accessible by members of its derived class. When base class access specified is ... derived class. When base class access specified is Public , protected elements of a base class become protected members of its derived class.
answered Aug 23, 2020 in Object Oriented Programming nocturnal123 97 views
1 vote
2 answers
4
which of the following can not be declared static ? a)class b)object c)functions d)member variables
answered Aug 9, 2020 in Object Oriented Programming the_psycho_scientist 1.4k views
0 votes
1 answer
5
Which of the following is true? (A) A static member of a class cannot be inherited by its derived class. (B) A static member of a class can be initialized only within the class it is a member of. (C) A static member of a class can be ... Since static member of a class is actually a global element, it does not require a class/object qualifier to access it independently of class/object.
answered Aug 9, 2020 in Object Oriented Programming the_psycho_scientist 429 views
0 votes
1 answer
7
Given the array of integers ‘array’ shown below: $\begin{array}{|c|c|c|c|c|c|c|c|c|c|} \hline 13 & 7 & 27 & 2 & 18 & 33 & 9 & 11 & 22 & 8 \\ \end{array}$ What is the output of the following JAVA statements? int[]p= new int [10]; int[]q= new int [10]; for ( int k=0; k<10; k++) p[k]= array [k]; q=p; p[4]=20; System.out.println(array[4]+":"+q[4]); $20:20$ $18:18$ $18:20$ $20:18$
answered Aug 9, 2020 in Object Oriented Programming the_psycho_scientist 195 views
0 votes
1 answer
8
Which of the following is true of constructor function in C++ ? A class must have at least one constructor. A constructor is a unique function which cannot be overloaded. A constructor function must be invoked with the object name. A constructor function is automatically invoked when an object is created.
answered Aug 9, 2020 in Object Oriented Programming the_psycho_scientist 85 views
1 vote
2 answers
9
Give the output #include<iostream> using namespace std; class Base1{ public: ~Base1() {cout<<"Base1's destructor"<<endl;} }; class Base2 { public: ~Base2(){cout<<"Base2's destructor"<<endl;} }; class Derived : public Base1,public Base2{ ... destructor Base$2$'s destructor Derived's Destructor Derived's Destructor Base$2$'s destructor Base$1$'s destructor Derived's Destructor Compiler Dependent
answered Aug 9, 2020 in Object Oriented Programming the_psycho_scientist 226 views
0 votes
2 answers
10
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: Derived(int i,int j):x(i),y(j){} void print(){cout<< x << ""<<y ;} }; int main(void) { Derived q(10,10); q.print(); return 0; } $10\:10$ Compiler Error $0\:0$ None of the option
answered Aug 9, 2020 in Object Oriented Programming the_psycho_scientist 205 views
0 votes
1 answer
11
0 votes
1 answer
12
Which of the following object types are generally autonomous, meaning that they can exhibit some behavior without being operated upon by another object. Passive Active Both (A) and (B) None of the mentioned
answered Jun 6, 2020 in Object Oriented Programming Ollie 105 views
0 votes
2 answers
13
0 votes
1 answer
14
In a system for a restaurant the main scenario for placing order is given below: Customer reads menu Customer places order Order is sent to kitchen for preparation Order items are served Customer request for a bill for the order Bill is prepared for this order Customer is given the bill ... will have at least how many objects among whom the messages will be exchanged) 1) 3 (2) 4 (3) 5 (4) 6
answered May 16, 2020 in Object Oriented Programming Sangita B 632 views
0 votes
1 answer
17
0 votes
1 answer
20
0 votes
2 answers
21
Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x < 100)x = CBSE (x+10); return (x-1); } public static void main(String[]args){ System.out.print(First.CBSE(60)); } } What does this program print? $59$ $95$ $69$ $99$
answered Mar 26, 2020 in Object Oriented Programming abhishekmehta4u 285 views
0 votes
0 answers
22
Polymorphism means : A template function Runtime type identification within a class hierarchy Another name for operator overloading Virtual inheritance
asked Mar 26, 2020 in Object Oriented Programming jothee 62 views
0 votes
1 answer
23
Abstraction and encapsulation are fundamental principles that underlie the object oriented approach to software development. What can you say about the following two statements? Abstraction allows us to focus on what something does without considering the complexities of how it works. Encapsulation ... us. Neither I nor II is correct Both I and II are correct Only II is correct Only I is correct
asked Mar 24, 2020 in Object Oriented Programming jothee 217 views
0 votes
1 answer
24
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 objects An abstract class is designed only to act as a base class to be inherited by other classes Only I only II Neither I nor II Both I and II
asked Mar 24, 2020 in Object Oriented Programming jothee 407 views
0 votes
1 answer
25
Which one of the following is correct for overloaded functions in $C++$? Compiler sets up a separate function for every definition of function. Compiler does not set up a separate function for every definition of function. Overloaded functions cannot handle different types of objects. Overloaded functions cannot have same number of arguments.
asked Mar 24, 2020 in Object Oriented Programming jothee 243 views
0 votes
1 answer
26
Which of the following operators cannot be overloaded in $C/C++$ ? Bitwise right shift assignment Address of Indirection Structure reference
asked Mar 24, 2020 in Object Oriented Programming jothee 130 views
14 votes
5 answers
27
It is desired to design an object-oriented employee record system for a company. Each employee has a name, unique id, and salary. Employees belong to different categories and their salary is determined by their category. The functions get name, getId and compute salary are required. Given the class ... the subclass Choose the best design I, IV, VI, VIII I, IV, VII I, III, V, VI, VIII II, V, VIII
answered Mar 20, 2020 in Object Oriented Programming immanujs 5.1k views
5 votes
2 answers
28
Consider the class of object oriented languages. Which of the following is true? Pascal is an object oriented language. Object oriented languages require heap management. Object oriented languages cannot be implemented in language C. Object oriented languages are more powerful than declarative programming languages. Parallelism cannot be realized in object oriented languages.
answered Feb 27, 2020 in Object Oriented Programming JashanArora 449 views
0 votes
0 answers
29
Object-oriented paradigm is used in the analysis stage of SDLC to Structure the behavioural part of the business process Design the structural part of Computer memory Design the object-oriented programming language Design the structure of the database.
asked Aug 4, 2019 in Object Oriented Programming gatecse 43 views
0 votes
0 answers
30
The signature of the object method clause present in class diagram contains All definitional attributes of the class used in the method All referential attributes of the class/es used in the method All definitional attributes of related classes All attributes of related classes
asked Aug 4, 2019 in Object Oriented Programming gatecse 53 views
1 vote
1 answer
31
Consider the following C++ function f(): unsigned int f(unsigned int n) { unsigned int b=0; while (n) { b+=n & 1; n>>1; } return b; } The function f() returns the int that represents the ____P____ in the binary representation of positive integer n, where P is number of $0$’s number of bits number of consecutive $1$’s number of $1$’s
answered Jul 2, 2019 in Object Oriented Programming srestha 779 views
0 votes
3 answers
32
In Java, which of the following statements is/are TRUE? S1: The final' keyword applied to a class definition prevents the class form being extended through derivation S2: A class can only inherit one class but can implement multiple interfaces S3: Java permits a class to replace the ... . It is called method overloading Code: S1 and S2 only S1 and S3 only S2 and S3 only All of S1, S2 and S3
answered Nov 22, 2018 in Object Oriented Programming mahesh13 901 views
0 votes
1 answer
33
Which of the following is not correct (in C++)? 1) Class templates and function templates are instantiated in the same way. 2) Class templates differ from function templates in the way they are initiated. 3) Class templates is initiated by defining an object using the template argument. 4) Class templates are generally used for storage classes.
answered Nov 2, 2018 in Object Oriented Programming Kuljeet Shan 1.7k views
0 votes
0 answers
34
In C++ and java which of the following features is not essential for polymorphic behaviour of programs? A) Inheritance B) Method overriding C) Method overloading D) Encapsulataion The question was asked in GSET 2018(Gujarat State Eligibilty Test ). According to the answer key , Option C is correct, but How? Isn't Method overloading a
asked Oct 13, 2018 in Object Oriented Programming sherlock_john 103 views
2 votes
3 answers
35
Which of the following, in C++, is inherited in a derived class from base class? constructor destructor data members virtual methods
answered Jun 25, 2018 in Object Oriented Programming Prasanjeet Ghosh 2.1k views
0 votes
0 answers
36
If vtable is array vtable [] = {funptr1,funptr2,funptr3}; than how did its size is 4 bytes (64 bit compiler)
asked Jun 3, 2018 in Object Oriented Programming kd..... 51 views
2 votes
1 answer
37
The Servlet Response interface enables a servlet to formulate a response for a client using the method void log(Exception e, String s) void destroy() int get ServerPort() void set ContextType(String Type)
answered May 28, 2018 in Object Oriented Programming chetanmcs 1.1k views
0 votes
2 answers
38
The syntax of capturing events method for document object is CaptureEvents() CaptureEvents(Orgs eventType) CaptureEvents(eventType) CaptureEvents(eventVal)
answered May 19, 2018 in Object Oriented Programming Prasanjeet Ghosh 647 views
0 votes
1 answer
39
If I allocate the memory using new operator to member in constructor I.e dynamic constructor than should I have to write delete in destructor
answered Apr 13, 2018 in Object Oriented Programming Kshitij Vengurlekar 59 views
7 votes
3 answers
40
Which of the following operator(s) cannot be overloaded? .(member Access or Dot operator) ?: (ternary or Conditional Operator) :: ( Scope Resolution Operator) All of the above
answered Mar 13, 2018 in Object Oriented Programming pankaj_vir 3.3k views
To see more, click for all the questions in this category.
...