How To Exam?

a knowledge trading engine...


University of Mumbai 2007-2nd Sem B.E FE Computer Programming II - Question Paper

Sunday, 14 July 2013 02:45Web



C iVi I    p.&. Ctf/i *>.;> 'nr Qzj)

cpOy&ttbbl f'Ct'TT&ytlvx.4 ~1L Con. 2948-07.    [REVISED COURSE]    /    ' ND-2044

(3 Hours)    [Total Marks : 100

N.B. (1) Question No.1 is compulsory.    M

(2)    Answer any four out of remaining six questions.

(3)    Assumptions made should be clearly stated.

(4)    All computer programs and program segment only in C++.

1. (a) Shown below is a Floyd's triangle    10

1

2 3

4 5 6

7 8 9 10

11..........................................15

79...........................................................................91

Write an Object Oriented Program (In terms of Class and Object) to print the triangle.

(b) Write an Object Oriented program for fitting a straight line through a set of points 10 (x, y), i = 1 ......n. the straight line equation is

y=mx+c

and the values of m and c are given by

n S(X| yj) -(SXj)(Syi)

nx,2)-)2

(Xyi - mEX|)

Q,

n

all summations are from 1 to n

2.    Explain following terms with the help of suitable programs    20

(a)    Over loaded functions

(b)    Overriding functions

(c)    Friend function

(d)    Template functions.

r-' * CLtovO.    'k\ U

Con. 2948-ND-2044-07.    2    '     ' V ~

(b). Write,an Object Oriented program to extract a portion of a character string and print 10 the extracted string. Assumethat m characters are extracted, starting with the nth character

'4. Implement a class named 'Matrix' having following members.    20

Private members ;

(a)    A two dimensional array variable A of 10 x 10 integer elements

(b)    Number of rows and columns of the array - M and N

Public members are to be incorporated as member functions and the list is as follows

(a)    Function for reading a matrix from console

(b)    Function for display of Matrix

(c)    Function for addition of two matrices

(d)    Function which, over loads multiplication operator {) for Multiplication of two conformable matrices.

Use object as function parameter in addition of matrices. Write suitable main program to test the member functions.

5.    (a) Explain inheritance in Object oriented programming in C++ in terms of Multiple 10

inheritances, level of inheritance, Deriving classes in public, private and protected mode. Use suitable programs and class definitions for exemplifications of the concepts.

(b) Write notes on Virtual functions exemplifying in terms of suitable classes and its 10 members in terms of Pure Virtual function, abstract classes and dynamic binding.

6.    Develop a class with member functions facilitating arithmetic operations on rational numbers. 20 i.e. carrying out addition, subtraction, division and multiplication of rational numbers. All of the Member functions need to be overloading binary operators. Develop suitable main program to demonstrate various aspect of binary operator overloading. Incorporate suitable constructors and over loaded constructors. Rational numbers assume the form of a/b, where

a and b are integer constants.

7.    Develop a class for linked list (Dynamic data structure) with the following member functions 20 to carryout the following.

(a)    Create a linked list to store set of integer data

(b)    Display the Linked list

(c)    Insert a node containing data in a sorted list

(d)    Delete a node from the list containing a specific data

Use object as node rather than using a struct variable to model a node.







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER University of Mumbai 2007-2nd Sem B.E FE Computer Programming II - Question Paper