You are on page 1of 12

Weekly Assignment-4

Due date: 3rd July 2020 – [11:55PM] Total marks: 100

Roll no 6331

Name Jesis Maharjan

Carefully watch the following C++ program.


See the style of commenting done in the above program. Add screen print of the output of the
above program and also draw UML- Class diagram.

1. Follow the same commenting style for the following programs taught in the specific
dates mentioned.
2. Your answer should also include output of every program in your system.
3. Also draw the UML – class diagram of each program including above

List of programs are as follows:

1. Class2.cpp of 22nd June online class


2. employee.cpp of 24th June online class

Output of the above program is:


UML-class diagram
Rectangle

-width :double
-length :double

+Rectangle( )
+setWidth(double ):void
+setLength(double):void
+getWidth( ) : double
+getLength( ):double
+getArea( ):double

1. Class2.cpp of 22nd June online class


Output:
UML diagram:
Book
-bookid : int
-title : string
-price : float
+Book( )
+Book (int,string,float)

2. Employee.cpp of 24th june online class


Output:
UML diagram
Employee
-eid : int
-ename : string
+Employee( )
+Employee (int,string)
+getId ( ):int
+setId(int):void
+getname( ):string
+setname(string):void

TASK-2 : Answer the following MCQs.


============
Answers:
1 b)

2 c)

3 c)

4 d)

5 a)
6 a)

7 b)

8 c)

9 a)

10 b)

11 a)

12 c)

13 d)

14 a)

15 b)

You might also like