What is object-oriented programming (OOP), and how does it promote reusable and maintainable code? Discuss the core principles of OOP, including encapsulation, inheritance, polymorphism, and abstraction, and their role in building complex software systems.