Object design and complete programs
Inheritance, interfaces and traits, exceptions, and a complete program.
About 4 hours of study
Learning objectives
- Design with inheritance and interfaces
- Handle errors with exceptions
- Build a complete program
Lessons
- 1
Inheritance, interfaces and traits Intermediate
Parent and child classes, abstract classes, interfaces, polymorphism and traits.
- 2
Exceptions Intermediate
Reporting and handling errors with throw, try, catch and finally, and writing your own exception classes.
- 3
Putting it together Intermediate
Planning and writing a complete command-line program that reads commands, keeps data in a class and reports errors with exceptions.
Module practice
- PHP: Animals that speakEasy
- PHP: Shapes and an interfaceMedium
- PHP: A payroll reportHard
- PHP: Safe divisionEasy
- PHP: Validate agesMedium
- PHP: A bank with custom errorsHard
- PHP: A task listEasy
- PHP: A task managerMedium
- PHP: Library loansHard
Module quiz
‹ Closures, built-in functions and objectsFinal assessment ›