Oop Msbte Question Paper Summer 2008

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Oop Msbte Question Paper Summer 2008 as PDF for free.

More details

  • Words: 659
  • Pages: 3
0708-II 3 Hours / 80 Marks

9036 Seat No.

--------------------------------------------------------------------------------------------------------------Instructions -

(1) All Questions are compulsory. (2) Figures to the right indicate full marks. (3) Assume suitable data, if necessary. (4) Use of Non-programmable Electronic Pocket Calculator is permissible.

Attempt any EIGHT of the following :

1. (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) 2.

Give 4 characteristics of object oriented programming. Which are input and output operator in C++? Give its examples. Define class with syntax. How many ways we can define member function in class? Give its syntax. Give any 4 characteristics of constructor. Define parameterized constructor with its syntax? What are the ways of constructor calling in main program? Give its syntax? Write the advantages of pointer. Define virtual function with its syntax. What do you mean by polymorphism? State two types of polymorphism. Attempt any THREE of the following :

(a) (b)

16

12

What do you mean by inheritance? Give different types of inheritance. What is the scope of base class members inherited in derived class in the following code : class bases { int i, j : public : void set (int a, int b) : void show ( ) : } class derived : public base { int Ki public : derived ( int x )

Object Oriented Programming: MSBTE Question Paper, Summer – 2008

-----------------------------------

} & state in how many types we can inherits properties of base class in Derived class ? c) Write any program which shows compile time polymorphism using function overloading. d) Write a program for following hierarchy inheritance in the given Figure. No.1 Assume suitable member function. Staff Code

Teacher Subject

Officer Grade Fig. No. 1

3.

12 Attempt any THREE of the following: In how many ways we can use pointer in functions definitions explain it? b) What do you mean by pointer? Which are the pointer operators present? Give its example? c) What is runtime polymorphism? Explain with suitable example? d) Declare a class simple interest having data members as principle amount, rate of interest, no. of years. The constructor will have default value of rate of interest as 11.5%. Accept this data for two objects. Calculate and display simple interest for each object? a)

4

a) b) c)

Attempt any TWO of the following: 16 Write a program to declare a class rectangle haying data members length and breadth. Accept this data for one object and display area and perimeter of rectangle. Write a program to declare class time having data member as hrs, min, sec. Write a constructor to accept data and use display function for two objects. Write a program to implement inheritance as shown in Figure No. 2. Assume suitable data member function to accept and display function.

Object Oriented Programming: MSBTE Question Paper, Summer – 2008

depositor Acc-no balance borrower Loan-no Loan-amount Fig. No. 2 5.

a) Attempt the following: Compare Structure and Class. b) Attempt any ONE of the following: (i) Write a program to find sum of three numbers using pointer to function method? (ii) What will be the o/p of following program? int main ( ) { cout. fill (‘<’) ; cout. precision ( 3) ; for ( int n = 1 ; n < = 6 ; n+ + ) { cout. width (5) ; cout. << n ; cout. width ( 10) ; cout << 1.01 float (n) << “\n”; if (n = = 3 ) ; cout. fill( ‘#’) ; } cout. width(15) ; cout << 12.345678 ; return 0 ; } 6.

12

12 Attempt any THREE of the following: a) Describe memory allocation for objects. b) Give syntax and use of following with respect to file (i) get ( ) (ii) put ( ) c) How we open file using constructor? Write any program for creating files with constructor function. d) Explain different file opening modes in details. ______________

Object Oriented Programming: MSBTE Question Paper, Summer – 2008

Related Documents