Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Build a Shark object and a Driver class that will display the history of a shark

ID: 656499 • Letter: B

Question

Build a Shark object and a Driver class that will display the history of a shark over the years. Your shark will be born 25 years ago. It will eat and swim as a baby. Advance the calendar 10 years forward and display how your adult shark eats and swims now. Then advance the calendar one last time to today's date and display how your old shark performs these behaviors. Use any other classes or interfaces neccessary.

Your output should look something like this:

Mon May 01 17:05:39 EDT 1989 I eat plankton. I swim close to my mother.

Sat May 01 17:05:39 EDT 1999 I eat dolphins. I swim wherever I want.

Thu May 01 17:05:39 EDT 2014 I eat the slow tuna fish. I swim very slowly.

Explanation / Answer

now the shark class

Now you can have hunting sharks! Better yet, the Ocean class can now focus on being an ocean:

Now obviously an updating Shark will want to know if there are any other critters nearby

So the Ocean could pass in its critters:

And now you can implement the Shark's hunting behavior

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote