[Cs3] Lab6
Mikhail Nesterenko
mikhail at cs.kent.edu
Mon Oct 9 09:58:40 EDT 2017
>
> I do not understand Lab 6. It seems what it is telling us to change in the
> code given is what the code does already. I am not sure what we are
> actually supposed to do for this lab.
Currently, if the animal is present more than once, then _all_ such
animals are removed. Here is how the code works currently
Before audit:
Blue: shark dolphin alligator turtle eagle penguin
Green: elephant zebra aardvark bear alligator
Orange: aardvark lion buffalo wildcat lion eagle
Red: deer duck wildcat lion
Yellow: goose alligator flamingo goose
After audit:
Blue: shark dolphin turtle penguin
Green: elephant zebra bear
Orange:
Red: deer duck
Yellow: flamingo
You need to modify it so that one animal is kept, and extra animals
are removed, provided that it is not sick. The output should look like
this:
Before audit:
Blue: shark dolphin alligator turtle eagle penguin
Green: elephant zebra aardvark bear alligator
Orange: aardvark lion buffalo wildcat lion eagle
Red: deer duck wildcat lion
Yellow: goose alligator flamingo goose
After audit:
Blue: shark dolphin alligator turtle penguin
Green: elephant zebra aardvark bear
Orange: lion
Red: deer duck
Yellow: goose flamingo
Remember, buffalo, wildcat and eagle are sick.
Thanks,
--
Mikhail
More information about the cs3
mailing list