You are on page 1of 2

SSN COLLEGE OF ENGINEERING

SSN Nagar, Kalavakkam-603110 Department of CSE 141353 OBJECT ORIENTED PROGRAMMING LAB

Batch : Yr/Sem/Section :

2010-2014 II /III / A

Staff Incharge : Ms.S.V.Jansi Rani , AP/CSE

ASSIGNMENT 2
TITLE Due Date : : Matrix Vector Multiplication 1/8/2011 (A) ,2/8/2011 (B) , 4/8/2011 (C)

Task 1: Define a class matrix such a way that each object should hold only one 2-D array and its operations such as addition, subtraction, multiplication , equality, negation and finding min-max pointer of a matrix. Task 2: Define another class called Vector which has pointer array and implement its operations such as addition , subtraction and multiplication. Task 3: Implement matrix and vector multiplication Identitfy where to use constructor, constructor with dynamic memory, destructor allocation .And also identitfy , other concepts which can be used. Sample I/O : A.Matrix B.Vector C.Matrix-Vector Multiplication D.Exit Enter choice:A 1. Input 2. Addition 3. Subtracton

4. Multiplication 5. Negation 6. Min-Max point 7. Exit Enter Choice: 1 Enter Size: 3 3 Enter elements :1 2 3 Enter Choice: 5 / 6 Enter Choice: 2 Not possible input another matrix Enter Choice: 1 Enter Size: 3 3 Enter elements :1 2 3 Enter Choice: 2 / 3/ 4/ 5 Enter Choice: 7 A.Matrix B.Vector C.Matrix-Vector Multiplication D.Exit Enter Choice: B 1. Input Vector 2. Addition 3. Subtraction 4. Multiplication 5. Exit ( like matrix do it) Enter choice: 5 A.Matrix B.Vector C.Matrix-Vector Multiplication D.Exit Enter choice: C Enter matrix details: Enter vector details : Matrix-vector multiplication : Enter choice: D

You might also like