This document contains the definition of a C++ class called TEST with 4 member functions - a default constructor TEST(), a parameterized constructor TEST(int, int), a destructor ~TEST(), and a display function Display().
The questions ask (i) what OOP concept is illustrated by the constructors and (ii) what the destructor is referred to as and when it is invoked.
The answer identifies the concept of constructor overloading/function overloading for question (i) and names the third function as the destructor, stating it is invoked when the scope of an object ends for question (ii).
The aptitude test consisted tricky questions on core subjects of CSE like C , C++, Java ,Data Structures, Database, Computer Networks, Theory of Computation.
Describe the C#.Net major features. This slide includes C# 5.0, C# 6.0 and C# 7.0. C#.net evolution part 1, that is published previously included the C# 1.0, C# 2.0, C# 3.0 and C# 4.0.
Describe the C#.Net major features. This slide includes C# 1.0, C# 2.0, C# 3.0 and C# 4.0.
C# 5.0, C# 6.0 and C# 7.0 will be covered in C#.net Evolution part 2
Применение паттерна Page Object для автоматизации веб сервисовCOMAQA.BY
Доклад о том, как еще можно организовать автоматизацию тестирования веб-сервисов, а именно, приспособить подход/шаблон Page Object (казалось бы, причем тут он?). Главное достоинство подхода - его максимальная простота и дружелюбность. Мы рассмотрим живой и успешно работающий на реальном проекте фреймворк, построенный подобным образом, разберём на слои, обсудим плюсы, минусы и саму идею подхода в целом.
Pragmatic Functional Refactoring with Java 8Codemotion
by Raoul-Gabriel Urma - You may be hearing a lot of buzz around functional programming. For example, Java 8 recently introduced new features and APIs inspired from functional ideas such as first-class functions, composition and immutability. In this talk we show how you can refactor your traditional object-oriented Java to using FP features and APIs from Java 8 in a beneficial manner. - How to adapt to requirement changes using first-class functions - How you can enhance code reusability using currying - How you can make your code more robust by favouring immutability over mutability - and more!
The aptitude test consisted tricky questions on core subjects of CSE like C , C++, Java ,Data Structures, Database, Computer Networks, Theory of Computation.
Describe the C#.Net major features. This slide includes C# 5.0, C# 6.0 and C# 7.0. C#.net evolution part 1, that is published previously included the C# 1.0, C# 2.0, C# 3.0 and C# 4.0.
Describe the C#.Net major features. This slide includes C# 1.0, C# 2.0, C# 3.0 and C# 4.0.
C# 5.0, C# 6.0 and C# 7.0 will be covered in C#.net Evolution part 2
Применение паттерна Page Object для автоматизации веб сервисовCOMAQA.BY
Доклад о том, как еще можно организовать автоматизацию тестирования веб-сервисов, а именно, приспособить подход/шаблон Page Object (казалось бы, причем тут он?). Главное достоинство подхода - его максимальная простота и дружелюбность. Мы рассмотрим живой и успешно работающий на реальном проекте фреймворк, построенный подобным образом, разберём на слои, обсудим плюсы, минусы и саму идею подхода в целом.
Pragmatic Functional Refactoring with Java 8Codemotion
by Raoul-Gabriel Urma - You may be hearing a lot of buzz around functional programming. For example, Java 8 recently introduced new features and APIs inspired from functional ideas such as first-class functions, composition and immutability. In this talk we show how you can refactor your traditional object-oriented Java to using FP features and APIs from Java 8 in a beneficial manner. - How to adapt to requirement changes using first-class functions - How you can enhance code reusability using currying - How you can make your code more robust by favouring immutability over mutability - and more!
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2. 2 (b) Answer the questions (i) and (ii) after going
through the following class : Delhi 2006
class Interview
{
int month;
public:
Interview(int y) {month=y;} //Constructor 1
Interview(Interview&t); //Constructor 2
};
(i) Create an object, such that it invokes
Constructor 1 1
(ii) Write complete definition for Constructor 2 1
3. (b) Interview Ob1(5);
OR
int N=5; Interview Ob1(N);
(1 mark for proper declaration of Object)
Interview(Interview &t)
{
month = t.month;
}
(1 mark for writing proper statements inside definition of Constructor
2)
OR
(1 mark for writing the conceptual definition of the copy constructor)
OR
(Only ½ mark for mentioning the term: copy constructor)
Note: Any valid statement in C++ working with t as an object of
Interview must be accepted while defining the constructor.
4. (b) Answer the questions (i) and (ii) after going
through the following class : Outside Delhi 2006
class Exam
{
int year;
public:
Exam(int y) { year=y;} //Constructor 1
Exam(Exam & t); //Constructor 2
};
(i) Create an object, such that it invokes
Constructor 1. 1
(ii) Write complete definition for Constructor 2. 1
5. (ii) Exam (Exam &t)
{year = t.year;}
OR
Copy constructor: It is an overloaded constructor,
in which object of the same class is passed as
parameter.
(1 mark for writing proper statements inside definition of
Constructor 2)
OR
(1 mark for any valid statement in C++ working with t as an
object of Exam)
OR
(1 mark for writing the definition/explanation of the concept of
copy constructor)
OR
(1/2 mark for mentioning only the term copy constructor)
6. (b) Answer the questions (i) and (ii) after going
through the following class: Delhi 2007 2
class Science
{
char Topic[20];
int Weightage;
public:
Science ( ) //Function 1
{
strcpy (Topic, “Optics” );
Weightage = 30;
cout<<“Topic Activated”;
}
7. (b) Answer the questions (i) and (ii) after going
through the following class: Delhi 2007 2
~Science( ) //Function 2
{
cout’<<”Topic Deactivated”;
}
(i) Name the specific features of class shown by
Function 1 and Function 2 in the above example.
(ii) How would Function 1 and Function 2 get
executed ?
8. (b) (i) Function 1: Constructor/ Default
Constructor
Function 2: Destructor
(½ Marks for each correct answer)
(ii) Function 1 is executed or invoked
automatically when an object of class Science
is created.
Function 2 is invoked automatically when the
scope of an object of class Science comes to
an end.
OR
10. (b) Answer the questions (i) and (ii) after going
through the following class
Outside Delhi 2007 2
class Maths
{
char Chapter [20];
int Marks;
public:
Maths ( ) //Member Function 1
{
strcpy (Chapter, “Geometry”);
Marks = 10;
cout<<“Chapter Initialised”;
11. (b) Answer the questions (i) and (ii) after going
through the following class
Outside Delhi 2007 2
{
~Math () //Member Function 2
}
cout<<”Chapter Over”;
}
};
(i) Name the specific features of class shown by
Member Function 1 and Member Function 2 in the
above example.
(ii) How would Member Function 1 and Member
Function 2 get executed?
12. (b) (i) Function 1: Constructor OR Default
Constructor
Function 2: Destructor
(½ Marks for each correct answer)
(ii) Function 1 is executed or invoked
automatically when an object of class Maths is
created.
Function 2 is invoked automatically when the
scope of an object of class Maths comes to an
end.
OR
13. (b)
Example:
{
Maths s1; //Constructor is invoked
} //Destructor is invoked
(½ Mark for each correct answer through
explanation OR
example)
NOTE: If the error in declaration of the
destructor is specified then marks for the
destructor function should be allocated.
14. (b) Answer the questions (i) and (ii) after going
through the following program Delhi 2008 2
#include<iostream.h>
#include<string.h>
class Bazar
{
char Type[20];
char Product[20];
int Qty;
float Price;
Bazar ( ) //Function 1
{
strcpy (Type, “Electronic”);
15. (b) Answer the questions (i) and (ii) after going
through the following program Delhi 2008 2
strcpy (Product, “Calculator”);
Qty=10;
Price=225;
}
public:
void Disp ( ) / / Function 2
{
cout<<Type<<“-”<<Product<<“:”<<Qty
<<“@” <<Price<<endl;
}
};
16. (b) Answer the questions (i) and (ii) after going
through the following program Delhi 2008 2
void main ( )
{
Bazar B; / /Statement 1
B. Disp ( ); / / Statement 2
}
(i) Will Statement 1 initialize all the data members for
object B with the values given in the Function I? (Yes
OR No). Justify your answer suggesting the
correction(s) to be made in the above code.
(ii) What shall be the possible output when the
program gets executed? (Assuming, if required - the
suggested correction(s) are made in the program)
17. Ans: No, since the constructor Bazar has
been defined in private section Suggested
Correction: Constructor Bazar() to be ,
defined in public
(½ Mark for identifying NO)
(½ Mark for justification and correction)
(ii) What shall be the possible output when the
program gets executed?
(Assuming, if required - the suggested
correction(s) are made in the Program)
18. If the constructor is defined as a public
member, the following output shall be
generated:
Electronic-Calculator:10@225
(1 Mark for correct answer)
OR
(½ Mark each for the String and Numeric
values)
19. (b) Answer the questions (i) and (ii) after going
through the following program:
Outside Delhi 2008 2
#include<iostream.h>
#include<string.h>
class Retail
{
char Category [20];
char Item [20];
int Qty;
float Price;
20. (b) Answer the questions (i) and (ii) after going
through the following program:
Outside Delhi 2008 2
Retail ( ) // Function 1
{
strcpy (Category, “Cereal”);
strcpy (Item, “Rice”);
Qty = 100;
Price = 25;
public:
void Show ( ) // Function 2
{
cout<<Category<<“–”<<Item<<“ : ”<<Qty
21. (b) Answer the questions (i) and (ii) after going
through the following program:
Outside Delhi 2008 2
<<“@”<<Price<<endl;
}
};
void main ( )
{
Retail R; // Function 1
R. Show ( ) ;. // Function 2
}
22. (b) Answer the questions (i) and (ii) after going
through the following program:
Outside Delhi 2008 2
(i) Will Statement 1 initialize all the data
members for object R with the values given in
the Function 1 ? (Yes OR No). Justify your
answer suggesting the correction(s) to be
made in the above code.
(ii) What shall be the possible output when the
program gets executed? (Assuming, if required
- the suggested correction(s) are made in the
program)
23. Ans: i) No, since the constructor Retail has
been defined in private section.
Suggested Correction: Constructor RetailO to
be defined in public section of class.
(½ mark for identifying No)
(½ mark for justification)
24. 2 (b) Answer the questions (i) and (ii) after
going through the following class:
Delhi 2009
class WORK 2
{
int WorkId;char WorkType ;
public:
-WORK ( ) //Function 1
{ cout<<”Un-Allocated”<<endl ;}
void status ( ) //Function 2
{ cout<<WorkId<<”: “<<WorkType<<endl ;}
WORK ( ) //Function 3
25. 2 (b) Answer the questions (i) and (ii) after
going through the following class:
Delhi 2009
{ WorkId = 10; WorkType=’T’ ; }
WORK(WORK &W) //Function 4
{
WorkId=W. WorkId+12;WorkType=W.
WorkType+l
}
} ;
26. 2 (b) Answer the questions (i) and (ii) after
going through the following class:
Delhi 2009
(i) Which member function out of Function 1,
Function 2, Function 3 and Function 4 shown
in the above definition of class WORK is called
automatically, when the scope of an object
gets over? Is it known as Constructor OR
Destructor
OR Overloaded Function OR Copy
Constructor?
(ii) WORK W ; //Statement 1
27. 2 (b) Answer the questions (i) and (ii) after
going through the following class:
Delhi 2009
Which member function out of Function 1,
Function 2, Function 3 and Function4 shown in
the above definition of class WORK will be
called on execution of statement written as
statement 2 ? What is this function specifically
known as out of Destructor or Copy
Constructor or Default Constructor?
28. Ans Function 1
Destructor.
(½ Mark for naming Function 1 correctly)
(½ Mark for naming it as Destructor,
(ii) WORK W; // Statement 1
WORK Y(W); // Statement 2
Which member function out of Function 1, Function 2,
Function 3 and Function4 shown in the above definition
of class WORK will be called on execution of statement
written as statement 2 ? What is this function specifically
known as out of Destructor or Copy Constructor or
Default Constructor?
Ans Function 4
Copy Constructor.
(½ Mark for naming Function 4 correctly)
(½ Mark for naming it as Copy Constructor)
29. (b) Answer the questions (i) and (ii) after going
through the following class:
Outside Delhi 2009 2
class Job
{
int JobId;char JobType;
public:
~Job ( ) //Function 1
{ cout<< “Resigned” <<end1; }
Job ( ) //Function 2
{ JobId=10 ; JobType =‘T” ;}
30. (b) Answer the questions (i) and (ii) after going
through the following class:
Outside Delhi 2009 2
void TellMe( )//Function 3
{ cout<<JobId<< “: ” <<JobType<<end1; }
Job (Job &J) //Function 4
{
JobId=J.JobId+10; JobType=J.JobType+l;
}
};
31. (b) Answer the questions (i) and (ii) after going
through the following class:
Outside Delhi 2009 2
(i) Which member function out of Function 1,
Function 2, Function 3 and Function 4 shown in
the above definition of class Job is called
automatically, when the
scope of an object gets over? Is it known as
Constructor OR Destructor OR Overloaded
Function OR Copy Constructor?
32. (b) Answer the questions (i) and (ii) after going
through the following class:
Outside Delhi 2009 2
(ii) Job P ; //Line 1
Job Q(P) ; //Line 2
Which member function out of Function 1,
Function 2, Function 3 and Function 4 shown in
the above definition of class Job will be called
on execution of statement written as Line 2 ?
What is this function specifically known as out
of Destructor or Copy Constructor or Default
Constructor?
33. Ans Function 1.
Destructor.
( ½ Mark for mentioning the correct function)
( ½ Mark for identifying it as Destructor)
(ii) Job P ; //Line 1
Job Q(P) ; //Line 2
Which member function out of Function 1,
Function 2, Function 3 and Function4 shown in
the above definition of class Job will be called
on execution of statement written as Line 2 ?
What is this function specifically known as out
of Destructor or Copy Constructor or Default
Constructor?
34. Ans Function 4.
Copy Constructor.
( ½ Mark for mentioning the correct function)
( ½ Mark for identifying it as Copy constructor)
35. (b) Answer the questions (i) and (ii) after going
through the following class:
Delhi 2009 2
class TEST
{
int Regno, Max, Min, Score;
public:
TEST() //Function 1
{
Regno= 101;Max=100;Min=40;Score=75;
}
36. (b) Answer the questions (i) and (ii) after going
through the following class:
Delhi 2009 2
TEST(int Pregno,int Pscore) //Function 2
{
Regno=Pregno; Max=100; Min=40;
Score=Pscore;
}
~TEST() //Function 3
{
cout<<“TEST Over”<<endl;
}
37. (b) Answer the questions (i) and (ii) after going
through the following class:
Delhi 2009 2
void Display() //Function 4
{
cout<<Regno<<“:”<<Max<<“:”<<Min<<endl;
cout<<“[Score]”<<Score<<endl;
}
};
(i) As per Object Oriented Programming, which.
concept is illustrated by Function 1 and Function 2
together?
(ii) What is Function 3 specifically referred as ? When
do you think, Function 3 will be invoked/called?
38. Ans. i) Polymorphism
OR
Function Overloading
OR
Constructor Overloading
(1 Mark for naming the concept correctly)
(ii) Destructor, invoked or called when scope of an
Object gets over.
(½ Mark for naming Destructor correctly)
(½ Mark for mentioning correctly when it is invoked)
39. (b) Answer the questions (i) and (ii) after going
through the following class:
Outside Delhi 2009 2
class Exam
{
int Rno,MaxMarks,MinMarks,Marks;
public:
Exam() //Module 1
{
Rno=101; MaxMarks=100; MinMarks=40;
Marks=75;
}
40. (b) Answer the questions (i) and (ii) after going
through the following class:
Outside Delhi 2009 2
Exam(int Prno, int Pmarks) //Module 2
{
Rno=Prno;MaxMarks=l00;MinMarks=40;Marks
=Pmarks;
}
~Exam() //Module 3
{
cout<<“Exam Over”<<endl;
}
41. (b) Answer the questions (i) and (ii) after going
through the following class:
Outside Delhi 2009 2
void Show () //Module 4
{
cout<<Rno<<“:”<<MaxMarks<<“:”<<MinMarks
<<endl;
cout<<“[Marks Got]”<<Marks<<endl;
}
};
42. (b) Answer the questions (i) and (ii) after going
through the following class:
Outside Delhi 2009 2
(i) As per Object Oriented Programming, which
concept is illustrated by Module 1 and Module
2 together?
(ii) What is Module 3 referred as ? When do
you think, Module 3 will be invoked/called?
43. Ans. Polymorphism
OR
Constructor Overloading
OR
Function Overloading
(1 Mark for mentioning the correct concept)
(ii) What is Module 3 referred as ? When do you
think, Module 3 will be invoked/called?
Ans. Destructor. It is invoked as soon as the scope
of the object gets over.
(½ Mark for identifying it as Destructor)
(½ Mark for mentioning correctly when it be
called/invoked)
44. (b) Write the output of the following C++ code.
Also. write the name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV].
Delhi 2010 2
#include<iostream.h>
void Print ( ) // Function [I]
{
for (int K=1 ; K<=60 ; K++) cout<< "-" ;
cout<<end1 ;
}
45. (b) Write the output of the following C++ code.
Also. write the name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV].
Delhi 2010 2
void Print (int N) // Function [II]
{
for (int K=1 ; K<=N ; L++) cout<<"*" ;
cout<<end1 ;
}
46. (b) Write the output of the following C++ code.
Also. write the name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV].
Delhi 2010 2
void Print (int A, int.B) // Function [III]
{
for (int K=1. ;K<=B ;K++) cout <<A*K ;
cout<<end1 ;
}
47. (b) Write the output of the following C++ code.
Also. write the name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV].
Delhi 2010 2
void Print (char T, int N) // Function [IV]
{
for (int K=1 ; K<=N ; K++) cout<<T ;
cout<<end1;
}
48. (b) Write the output of the following C++ code.
Also. write the name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV].
Delhi 2010 2
void main ( )
{
int U=9, V=4, W=3;
char C='@' ;
Print (C,V) ;
Print (U,W) ;
}
49. Ans.
@@@@
91827
OR
No Output as L is not declared in void Print (int N)
Polymorphism
OR
Function Overloading
(½ Mark for writing each correct line of output)
(1 Mark for writing the feature name correctly)
50. (b) Write the output of the following C++ code.
Also, write the .name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV] Outside Delhi 2010 2
#include<iostream.h>
void Line ( ) //Function [I]
{
for (int L=1;L<=80;L++) cout<<"-";
cout<<end1;
}
51. (b) Write the output of the following C++ code.
Also, write the .name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV] Outside Delhi 2010 2
void Line (int N) //Function[II]
{
for (int L=l;L<=N;L++) Cout<<"*";
cout<<endl;
}
52. (b) Write the output of the following C++ code.
Also, write the .name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV] Outside Delhi 2010 2
void Line (char C, int N) //Function [III]
{
for (int L=l;L<=N;L++) cout<<C;
cout<<endl;
}
53. (b) Write the output of the following C++ code.
Also, write the .name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV] Outside Delhi 2010 2
void Line (int M, int, N) //Function [IV]
{
for (int L=1;L<=N;L++) cout<<M*L;
cout<<end1;
}
54. (b) Write the output of the following C++ code.
Also, write the .name of feature of Object
Oriented Programming used in the following
program jointly illustrated by the function [I] to
[IV] Outside Delhi 2010 2
void main ( )
{
int A=9, B=4, C=3;
char K= '#' ;
Line (K,B);
Line (A,C);
}
56. (b) Answer the questions (i) and (ii) after
going through the following class:
Sample Paper 2010 SET I 2
class Seminar
{
int Time;
public:
Seminar() //Function 1
{
Time=30;cout<<"Seminar starts now"<<end1;
}
57. (b) Answer the questions (i) and (ii) after
going through the following class:
Sample Paper 2010 SET I 2
void Lecture() //Function 2
{
cout<<"Lectures in the seminar on"<<end1;
}
Seminar(int Duration) //Function 3
{
Time=Duration;cout<<"Seminar starts
now"<<end1;
}
58. (b) Answer the questions (i) and (ii) after
going through the following class:
Sample Paper 2010 SET I 2
~Seminar()
//Function 4
{
cout<<"Vote of thanks"<<end1;
}
};
i) In Object Oriented Programming, what is
Function 4 referred as and when does it get
invoked/called?
59. (b) Answer the questions (i) and (ii) after
going through the following class:
Sample Paper 2010 SET I 2
ii) In Object Oriented Programming, which
concept is illustrated by Function 1 and
Function 3 together? Write an example
illustrating the calls for these functions.
60. (b)
i) Destructor, it is invoked as soon as the
scope of the object gets over. 2
( ½ Mark for mentioning destructor)
( ½ Mark for remaining answer)
ii) Constructor Overloading (or Function
Overloading or Polymorphism)
Seminar S1; //Function 1
Seminar S2(90); //Function 3
( ½ Mark for mentioning the correct concept)
( ½ Mark for the example)
61. (b) Answer the questions (i) and (ii) after
going through the following program:
SAMPLE PAPER 2010 SET II 2
class Match
{
int Time;
public:
Match()
//Function 1
{
Time=0;
cout<<"Match commences"<<end1; }
62. (b) Answer the questions (i) and (ii) after
going through the following program:
SAMPLE PAPER 2010 SET II 2
void Details() //Function 2
{
cout<<"Inter Section Basketball
Match"<<end1;
}
Match(int Duration) //Function 3
{
Time=Duration;
cout<<"Another Match begins now"<<end1; }
63. (b) Answer the questions (i) and (ii) after
going through the following program:
SAMPLE PAPER 2010 SET II 2
Match(Match &M) //Function 4
{
Time=M.Duration;
cout<<"Like Previous Match "<<end1;
}
};
i) Which category of constructor - Function 4
belongs to and what is the purpose of using it?
ii) Write statements that would call the member
Functions 1 and 3
64. (b)
i)Copy constructor, It will help to copy the
data from one object to another.
( ½ Mark for mentioning copy constructor)
( ½ Mark for remaining answer)
ii) Match M; //Function 1
Match N(10); //Function 3
( ½ Mark for each statement)