Docsity

CMSC 132 Homework 3 Solution: UML Class Design for a Park with Hunters, Prey, and Dogs - P, Assignments of Computer Science

Toggle sidebar
bg1
CMSC 132 Homework 3 - Solution
Problem Description
A park contains customers and two types of animals, birds and
dogs. Birds can be either turkeys or hawks. Some dogs are hounds.
Hounds can be either greyhounds or bloodhounds. Customers,
hawks, and hounds (hunting dogs) are all hunters. Turkeys are
prey. Animals can travel at different speeds. Birds can fly and dogs
can bark. All hunters can detect and capture prey. All prey can hide
to avoid detection. Greyhounds can chase prey, and bloodhounds
can track prey. Customers may bring hawks or hounds to the park
to help hunt turkeys. Whether a turkey is captured depends on its
ability to hide or run from hunters.
Possible UML Class Design

Partial preview of the text

Download CMSC 132 Homework 3 Solution: UML Class Design for a Park with Hunters, Prey, and Dogs - P and more Assignments Computer Science in PDF only on Docsity!

CMSC 132 Homework 3 - Solution

Problem Description

A park contains customers and two types of animals, birds and dogs. Birds can be either turkeys or hawks. Some dogs are hounds. Hounds can be either greyhounds or bloodhounds. Customers, hawks, and hounds (hunting dogs) are all hunters. Turkeys are prey. Animals can travel at different speeds. Birds can fly and dogs can bark. All hunters can detect and capture prey. All prey can hide to avoid detection. Greyhounds can chase prey, and bloodhounds can track prey. Customers may bring hawks or hounds to the park to help hunt turkeys. Whether a turkey is captured depends on its ability to hide or run from hunters.

Possible UML Class Design