0% found this document useful (0 votes)
18 views1 page

Assignment 5: Question # 1

The document discusses two programming questions - creating a 3x3 matrix class with methods for addition, multiplication, and copying matrices, and calculating employee salary based on attendance with deductions for absences.

Uploaded by

tiya Abid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Assignment 5: Question # 1

The document discusses two programming questions - creating a 3x3 matrix class with methods for addition, multiplication, and copying matrices, and calculating employee salary based on attendance with deductions for absences.

Uploaded by

tiya Abid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

ASSIGNMENT 5

Question # 1:
Create a class called Martix that represents a 3x3 matrix. This matrix contains a two-dimensional
integer array of size 3x3. Provide the following member functions for this class:
a) A one-argument constructor to initialize the member matrix to the matrix sent as an argument
from the calling function.
b) An AddMatrix function for addition of two or more matrice and the result in another array cerated
dynamically in constructor. After addition print the transpose of the matrix.
c) A MultiplyMatrix method for finding the product of the two matrices uaing friend functions.
d) Make a copy constructor for the initialize the obect with another object
Note: Define all the member functions outside the class.
Question # 2:
Calculate the salary of employee on the basis of attendance of employee which you have already compute
in above tasks. Formula to calculate the salary is given below:
Salary = (working-hours per day * total days per month)*1000;
Note: 2 days off per week. Per week total attendance must be 5 of days. And deduct salary on the basis of
absentees.
1000 rupees per absent.

You might also like