-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
# Personnel | ||
# Personnel | ||
This Python program demonstrates object-oriented programming (OOP) principles by creating a Personnel class with child classes for specific roles: Doctor, Surgeon, and Nurse. Each class has its own attributes, and methods are used to display relevant information. | ||
|
||
Features | ||
Personnel Class: The base class for storing common attributes such as name, age, and hourly rate. | ||
Methods: | ||
__init__() initializes attributes. | ||
display() prints the basic personnel details. | ||
Doctor Class: Inherits from Personnel and adds the specialty attribute. | ||
Method: displayDoctor() prints the Doctor's details including name, age, hourly rate, and specialty. | ||
Surgeon Class: Inherits from Personnel and adds the BoardCertified attribute. | ||
Method: displaySurgeon() prints the Surgeon's details including name, age, hourly rate, and BoardCertified status. | ||
Nurse Class: Inherits from Personnel and adds the rank attribute. | ||
Method: displayNurse() prints the Nurse's details including name, age, hourly rate, and rank. | ||
Technologies Used | ||
Python: The programming language used to implement the classes and methods. |