weight = 20


For this lab, you will build on your Lab 9 solution to create a dog walking service that can track a sequence of days.

To do this, you must rename your DogWalkingService class to ServiceDay since it represents a day of the dog walking service.

You will create a new DogWalkingService class that will contain an ArrayList of ServiceDay objects, one for each day the dog walking service is in business.

-days: ArrayList<ServiceDay>
+DogWalkingService(capacity: int)
+enrollDog(dog: Dog): boolean
+removeDog(index: int): Dog
+processDay(numberOfWalks: int): void
+getDaySummary(index: int): String
+getDaySummary(): String
+getSummary(): String

Requirements for DogWalkingService


You must design the Lab10 class that is a program that:

  1. Asks the user how many dogs they would like to start with.
  2. Creates a DogWalkingService object that can support 25% more dogs than the user would like to walk.
  3. Adds randomly named dogs to the DogWalkingService instance until there are as many dogs as the user wants to walk enrolled in the walking service.
  4. Asks the user how many days they would like the service to run.
  5. Conducts the walks for the requested days using the following principles:
    1. There should be 2 to 6 walks (randomly determined) each day.
    2. Each walk should be between 10 and 45 minutes (randomly determined).
    3. Every third day, the dog that was enrolled the longest ago is removed from the current service day.
    4. Every fifth day, two additional dogs are enrolled in the current service day.
  6. Displays a summary of the results of all of the days processed.

The summary of the results of all of the days processed should be very similar to this:

The dog walking service was active for 12 days.

12% of the walks were successful (all dogs pooped)
Average number of walks per day: 3.3 walks
Average minutes per walk: 28.2 minutes
Average minutes per day: 93.0 minutes

Here is a summary of all 3 dogs still enrolled in the service:
1. Spot is a fast walker who peed 130 times and pooped 5 times.
2. Spotless is a slow walker who peed 98 times and pooped 1 time.
3. Yippee is a fast walker who peed 21 times and pooped 0 times.


This laboratory assignment was developed by Dr. Chris Taylor.

See your professor's instructions for details on submission guidelines and due dates.