Project – agile dinosaur care system
Our park is growing, and so are the tasks that need to be accomplished. Lambda expressions can simplify our code and improve the efficiency of operations. Let’s integrate them into our system!
Incorporate lambda expressions into your “dinosaur care system” for sorting, filtering, and performing actions on collections of dinosaurs. Furthermore, design a notification system using method references to alert park staff about various events, enhancing communication and responsiveness within our park.
Here are the steps. We assume certain methods exist. You’ll have to create those methods according to your Dinosaur
class’s design:
- Set up your project: If you haven’t already done so in the previous chapter, create a new Java project in your IDE. Make sure you have a
Dinosaur
class defined with properties such asname
,species
,healthStatus
, and so on. You’ll also want to have aDinosaurCareSystem...