0% found this document useful (0 votes)
2 views2 pages

Assignment UML

The document outlines an assignment to design a UML class diagram involving various classes such as Professor, Student, Doctor, Bill, and Patient, all inheriting from a base class Person. Each class includes specific data members and methods for initialization and manipulation of data. The document also discusses concepts of aggregation, inheritance, composition, and generalization in the context of the UML design.

Uploaded by

ellglin89
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Assignment UML

The document outlines an assignment to design a UML class diagram involving various classes such as Professor, Student, Doctor, Bill, and Patient, all inheriting from a base class Person. Each class includes specific data members and methods for initialization and manipulation of data. The document also discusses concepts of aggregation, inheritance, composition, and generalization in the context of the UML design.

Uploaded by

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

Assignment no 1

Topic: UML Diagram


Name : Adeel Fazil
Submit To: Mariya Bibi
Sap id:70110717

Qno1:
Design a UML class diagram according to the following specifications
and requirements:

A.Create a professor, inherited from the class Person with an additional data
member to store a doctor s specialty. Add appropriate constructors and methods to
initialize, access, and manipulate the data members.
b.Create a class Student, inherited from the class Person with an additional data
member to store a doctor s specialty. Add appropriate constructors and methods to
initialize, access, and manipulate the data members

B.Create a class Doctor, inherited from the class Person with an additional data member to store
a doctor s specialty. Add appropriate constructors and methods to initialize,
access, and manipulate the data members.

C.Create a class Bill with data members to store a patient s ID and the patient s hospital charges
such as pharmacy charges for medicine, the doctor s fee, and the room charges.
Add appropriate constructors and methods to initialize, access, and manipulate the
data members.

D. Create a class Patient, inherited from the class Person with additional data
members to store a patient's ID, age, date of birth, attending physician s name, the
date when the patient was admitted in the hospital, and the date when the patient
was discharged from the hospital. (Use the class Date to store the date of birth,
admit date, discharge date, and the class Doctor to store the attending physician's
name.) Add appropriate constructors and methods to initialize, access, and
manipulate the data members.
Aggregation:Separate parent class child class works
Inheritance: Inherited claesses
Composition:Separate parent class child class not works
Generalization: Same Characteristics

You might also like