Inheritance completion activity #4
When used in a class declaration, the final
keyword means a class can't be inherited.
Why? Do this as a guarantee that the code in your class could never be overridden. This ensures other programmers won't extend your beautiful class. Final provides a safety net from a future of lesser programmers raising havoc on the future of the company.
Use the code from the previous 3 examples. Now go forth and save the company by converting the book and software subclasses to final classes. The future is waiting for you.