Challenge: Solution Review
This lesson will explain the solution to the problem from the previous coding challenge.
We'll cover the following...
We'll cover the following...
Solution #
Explanation
Let’s start by looking at the code we had originally:
As you can see, there is a parent class Applications. It has four child classes:
-
FacebookLightMode -
FacebookDarkMode -
WhatsAppLightMode -
WhatsAppDarkMode
The definitions of these classes are simple. Apart from initializing the application name and type, each class also defines the following functions:
-
display -
displayMode
Each class has its definition of both these ...