A pet shop contains multiple pets, namely two cats (Fred, Tom), two dogs (Buch, Bravo) and one bird (Tweety). Each pet has a distinct price, a name, and a sound. In Addition, a pet owner can enter the shop and buy one or multiple pets. On entering the shop every pet tries to draw the attention of the pet owner to itself by making a distinct sound (by console based string output).
Provide the needed classes (later extensibility for alternative pets should be kept in mind)
Provide an additional class “PetShopSimulation” which uses your classes and simulates the entrance of a pet owner, who buys one cat and one bird.
All 4 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.