Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task 2 The Giant Panda Protection and Research Center in the Sichuan province of southwest China, actually employs a category of workers known as panda
Task
The Giant Panda Protection and Research Center in the Sichuan province of southwest
China, actually employs a category of workers known as panda nannies. The primary
responsibility is to play with adorable panda cubs and name them, determine gender,
keep track of their age and hours they sleep. So being a programmer panda nanny, you
will create a code that will do all these works for you.
Create a class named Panda and also write the constructor.
Access the instance attributes and print them in the given format.
Call instance methods to keep track of their daily hours of sleep.
Suppose consulting with other panda nannies you have set some criteria based
on which you will make their diet plans. The criteria are:
Mixed Veggies for pandas having to hours included of sleep daily.
Eggplant & Tofu for pandas having to hours included of sleep daily.
Broccoli Chicken for pandas having to hours included of sleep daily.
Lastly for all other arguments, then just give it bamboo leaves.
Now handle this problem modifying the method designed to keep track of their daily
hours of sleep and determine diet plan.
You are not allowed to change the code below
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