Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Details of the source code skeleton and classes: https://www.cse.msu.edu/~cse231/Online/Projects/Project11/ More description about the program: https://www.cse.msu.edu/~cse231/Online/Projects/Project11/Project11.pdf Assignment Background In this project, you will write a Python
Details of the source code skeleton and classes:
https://www.cse.msu.edu/~cse231/Online/Projects/Project11/
More description about the program:
https://www.cse.msu.edu/~cse231/Online/Projects/Project11/Project11.pdf
Assignment Background In this project, you will write a Python program to implement a virtual pet. You can decide the species, name, and gender of your pet. You can also interact with your pet by feeding your pet, playing with your pet, bathing your pet, etc. You will design a user-defined Class called 'Pet' to achieve that A pet has the following basic attributes Species (we assume two species: dog and cat) Name - Gender (we assume two genders: male and female) - Fur color As well as some other attributes that are related to physical or mental health status Energy - Hunger -Thirst - Loneliness - Smell These attributes are measured in the range from 0 to 10. For the energy' attribute, the ideal value is 10. For the other attributes ('hunger', 'thirst', 'loneliness', and 'smell'), the ideal value is 0. When a pet object is created, his or her initial status is randomized within an acceptable range. For example, a newly created pet may have a hunger/thirst/loneliness/smell level in the range of (0, 5), and have an energy level in the range of (5, 10) Therefore, in your pet class, you will have attributes related to each feature that we mentioned. Make them as private attributes (i.e., the attribute name should start with a double underline, like self._name) The goal of this game is to take care of your pet by keeping your pet in a good status (i.e., lower hunger/thirst/loneliness/smell level, and higher energy level). You can take care of your pet by taking each of the following actions Let your pet get some sleep Feed your pet some food Feed your pet some water Play with your pet Bathe your pet
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started