[Solved] COP2800 Assignment 5

30 $

File Name: COP2800_Assignment_5.zip
File Size: 188.4 KB

SKU: [Solved] COP2800 Assignment 5 Category: Tag:

Or Upload Your Assignment Here:


When Elvis gets up in the morning, he likes to have a little fun with his donuts. He loves crème filled, strawberry filled, grape filled, apple filled, cinnamon filled, blueberry filled and banana filled donuts.

By the time Elvis sits down to breakfast, the Lazy Susan is loaded up with five donuts chosen at random by his housekeeper. Elvis spins the Lazy Susan three times, eats what’s closest to him, and goes about his business for the day.

Design Requirements:

  1. Three classes… Elvis, LazySusan and Donut. Each class has a defined toString() method.
  2. A Donut has a Filling. Filling should be an enumerated type. Tools you may need:The length of an enum : Filling.values().length.Conversion of an int to a enum value : Filling.values()[3].
  3. Donuts should be held in arrays inside Elvis and LazySusan.
  4. When Elvis eats a donut it must, of course, come off the LazySusan.
  5. Your driver should load up the Lazy Susan, display its contents, spin it three times, display Elvis’ tummy, and what’s left on the Lazy Susan.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] COP2800 Assignment 5
30 $