Sunteți pe pagina 1din 3

[STUDENT NAME] [Enrolment No.

]
[CLASS (SECTION)]

Bahria University
Software Engineering Department

Course: CSL-210 OBJECT ORIENTED PROGRAMMING


Term: SPRING 2019, Class: BSE 2(A/B)
Assignment No:
0 1

Assignment Title:

Inheritance, Association, Aggregation and Composition

Submitted By:
M I S B A H P E R V E E N

(Name) (Reg. No.)


Submission Date Date Submitted
1 0 / 0 4 / 1 0

(Date: DD/MM/YY)

Submitted To:
Engr. Misbah Perveen
(Subject Teacher)

Signature: ________________ Max Marks: ___________ Marks Obtained: _____________

1
[STUDENT NAME] [Enrolment No.]
[CLASS (SECTION)]

BAHRIA UNIVERSITY (KARACHI CAMPUS)


ASSGINMENT # 1 - SPRING 2019
Object Oriented Programming (CSL - 210)
Class: BSE 2 A&B
Lab Instructor: Engr. Misbah Perveen
Max Marks: 05 (Question 1 of 2 marks, Question 2 of 3 marks)
Submission Deadline: 1 May, 2019

Question No. 1: Design and implement these four classes and incorporate the functions described
in the UML.

Faculty PermanentFaculty

- name:String - basicSalary: String


- designation :String - allownaces: double
- course:String
+ PermanentFaculty()
+Faculty( )
+ DisplayInfo( ) : void
+ DisplayInfo( ) : void
+ getData( ):void + getData ( ): void
+ calcSalary():double

VisitingFaculty University

- hourlyRate : double - arr1[ ] : PermanentFaculty


- noOfDays: int - arr2[ ] : VisitingFaculty

+ VisitingFaculty() + addPFaculty(a : PermanentFaculty) : void


+ getData( ): void + calcAvgSaVF(): double
+ DisplayInfo( ) : void + addVFaculty(a: VisitingFaculty) : void
+ calcSalary(): double + calcAvgSaPF(): double

2
[STUDENT NAME] [Enrolment No.]
[CLASS (SECTION)]

 Create an application class with N PermanentFaculty objects and N VisitingFaculty objects.


 Create constructors, accessor and mutator as per your need in the program
 getData( ) Should ask the user to input the data for the child and parent class attribute.
 calcAvgSalPF() and calcAvgSalVF() should calculate average salary of all permanent
faculty and visiting faculty respectively
 Displayinfo( ) should display all the information of the all the attributes of the class and
parent class.
 calcSal() should calculate salary according to class criteria.

Question No. 2: Design and implement these four classes Employee, MonthlySalEmployee,
HourlySalEmployee, Company and implement the following functions:

 Create an application class with N HourlySalaryEmployee objects and N


MonthlySalEmployee objects.
 Create constructors, accessor and mutator as per your need in the program
 Should ask the user to input the data for the MonthlySalEmployee and parent class attribute,
same for the HourlySalEmployee class

 should calculate average salary of all Hourly Employee and Monthly Employee respectively
 Displayinfo() should display all the information of the all the attributes of the class and parent
class and salary.
 calcSal() should calculate salary according to class criteria

Please submit these answers on turnitin and in hard copies both and the deadline is:
May 01, 2019
Note:
 No late submission will be entertained.
 Copied assignment will be marked zero.

S-ar putea să vă placă și