` [Established by Govt. of Kerala]

C3

Practical Examination – November 2011 Part II – C++ (Time: 45 Minutes)

Marks: 50

1. Define a class with following specifications: Class name:Matrix Purpose : Store member data values, process them and display sum of 2 matrices Member Data : Data Name row col matrix1 matrix2 sum_matrix

Visibility private private private private private

Data type integer integer integer array integer array integer array

Member functions: Constructor function (public visibility) - Gets the row and column values get_matrix (public visibility with return type void) – inputs values into both the matrices calc_matrix (public visibility with return type void) – finds sum of 2 matrices print_matrix (public visibility with return type void) – displays the sum matrix Create an object of the class by passing row and column values into the constructor. Then execute the remaining functions of the program in the required sequence.

C3.pdf

Member Data : Data Name Visibility Data type. row private ... execute the remaining functions of the program in the required sequence. C3. Page 1 of 1. C3.pdf.

59KB Sizes 0 Downloads 179 Views

Recommend Documents

No documents