Exercise 3

1 Applying Hierarchical Modification

Today you are going on a lunch date! To help you, several classes are created below.

The
first class is DayName, contains the parameter nameOfDay, a certain day written as a String.
The
second class, LunchAppointment, contains the variables lunchTime (what time you are going to lunch) and lunchDate (who you are going on the lunch date with).
And at last the class,
Date, with parameters dayName (where you can set the variable in the class DayName, for fun it is now Funday) as well as date, month and year.






What you are going to do now is create a class,
Today, in which you can modify the values in the class Date as well as in the class LunchAppointment. First, write the class using nested notation.




Now write the class,
Tomorrow, going with another date, using dot notation.



1.1