Practice 01
Implement hierarchical inheritance to manage different types of
people associated with a university.
Specifications
• Base Class: Person
• Attributes: name and id_number.
• Method: display_info(): Returns a string with the person's name and ID.
• Child Class 1: Student (Inherits from Person)
• Additional Attribute: major.
• Method Overriding: Redefine display_info() to include the student's major.
• Child Class 2: Faculty (Inherits from Person)
• Additional Attribute: department.
• Method Overriding: Redefine display_info() to include the faculty's department.
• New Method: assign_course(course_name): Returns a confirm
Practice 02
Make a smart-device.
Base Classes
Class Type Attributes Key Methods
Communication Base brand, model Phone(number): Confirms a call.
Camera Base resolution_mp take_photo(): Confirms a photo capture.
FitnessTracker Base sensor_count monitor_hr(): Confirms heart rate monitoring.
Derived Classes
Class Inherits From Unique Attribute New Method
Communication and stream_video(): Confirms video
SmartPhone storage_gb
Camera streaming.
Communication and sync_data(): Confirms data
SmartWatch battery_life_days
FitnessTracker synchronization.