Exercises
We’ve learned so many fun new things in this chapter. It’s time to enlighten the users of the Mesozoic Eden software with some new features that have been built with our new skills:
- Manage the birthdays of the dinosaurs in our park. Add the
birthday
property to theDinosaur
class. - The park operates on a strict schedule. Create a simple system to log events such as feeding times, cleaning, and emergency drills in the park using the Date API.
- In Mesozoic Eden, we have a very strong safety-first policy. Regular inspections help us maintain our high standards of safety. Create a program that calculates how many days are left until the park’s next safety inspection, based on the date of the last safety inspection. Safety inspections need to happen every 45 days.
- We have a newborn Theropod. The guests were asked to submit names for our youngest inhabitant of Mesozoic Eden. 10 names were picked. Create a list for these 10 names.
- We want...