This project demonstrates object-oriented programming concepts in Python, specifically focusing on inheritance patterns, multiple inheritance, and the use of __slots__
. The project implements various classes representing academic roles (Student, Professor, Employee) with a common base class (Person).
- Single inheritance hierarchy with
Person
as base class - Multiple inheritance demonstration with
StudentProfessor
- Use of
__slots__
for memory optimization inLocation
class - Comprehensive test suite using pytest
- Automated testing with GitHub Actions
Person
: Base class with basic personal informationStudent
: Inherits from Person, adds grade informationProfessor
: Inherits from Person, adds course informationEmployee
: Inherits from Person, adds department informationStudentProfessor
: Multiple inheritance exampleLocation
: Demonstrates__slots__
usage
- Python 3.10+
- pytest
Structure of the project:
assignment.py
test_classes.py