C++ and Java (June – 2014) [IDOL - Old Course | Question Paper]


Click Here: (PDF Download)

Click Here: (PDF View) | Click Here: (Image View) | Click Here: (Text View)

Time: 3 Hours
Total Marks: 100

N.B.:  (1) Questions No. 1 is Compulsory.
           (2) Attempt any four questions from the remaining questions.
           (3) Figures to the right indicate the full marks.

Q.1 Attempt The Following Question: (20 Marks)
(A) Define the concept class. With a suitable example explain the method of creating a class and accessing its numbers in C++ Language.
(B) Write a short note on Polymorphism and Data Hiding.
(C) Explain the input and output statement in C++ Language.

Q.2 Attempt The Following Question: (20 Marks)
(A) Write a C++ Program to create a class with an integer data member to store a number and two member function to find the number is even/odd and prime or not. Accept a number and check whether it is even/odd and prime or not.
(B) Explain the concept of static functions in C++.
(C) Write a short note on friend functions.

Q.3 Attempt The Following Question: (20 Marks)
(A) Write a C++ Program to add and subtract two complex numbers using operator overloading of binary operators ‘+’ and ‘-’.
(B) Define infinite function. Explain the method of creating and using inline function in C++.
(C) With a suitable example explain the method of using the destructor in c++.

Q.4 Attempt The Following Question: (20 Marks)
(A) Write a C++ Program to define a time class containing the members:
• Two integer data members minutes and hours
• Two overload constructors, one take two integer parameter and the other take one integer parameter representing the total number of minutes and convert it into hours and minutes.
• One method to display the class data members.
• Include Increment() method that increment time by 1 minute and Decrement() method that decrements time by 1 minute.
(B) Write a short note on Abstract Class.
(C) Differentiate between Early Binding and Late Binding.

Q.5 Attempt The Following Question: (20 Marks)
(A) Write a C++ program to create a class named student with data members(rollno, name, five different subject marks, total and percentage) and member function named calculate() for finding the total marks and percentage of a student.
Using an array of object calculate the percentage of 10 students and arrange the students detail in ascending order of name.
(B) Define access specifiers in C++, List and explain the different types of access specifiers.
(C) Write a short on ‘this’ pointer.

Q.6 Attempt The Following Question: (20 Marks)
(A) Write a java program to find to find the reverse of a number and hence find the number is palindrome or not.
(B) Describe the method of using for loop in java programs with an example.
(C) Write a short note on packages.

Q.7 Attempt The Following Question: (20 Marks)
(A) Write an applet with a text filed for entering a number and a button named “find”. On click of find button display the factorial of text field number in a message box.
(B) Explain the life cycle on a thread in multithread program.
(C) Write a short note on interfaces in java.

0 Comments