Question: you are a virtual cat Create an object that represents a cat. It should have properties for tiredness, hunger, loneliness, and happiness Next, write methods
you are a virtual cat
- Create an object that represents a cat. It should have properties for tiredness, hunger, loneliness, and happiness
- Next, write methods that increase and decrease those properties. Call them something that actually represents what would increase or decrease these things, like "feed", "sleep", or "pet".
- Last, write a method that prints out the cat's status in each area. (ex. Kai is really hungry, Kai is VERY happy.)
JavaScript
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
