Answered step by step
Verified Expert Solution
Link Copied!

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 2
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 3 to 5 hours (included) of sleep daily.
?**** Eggplant & Tofu for pandas having 6 to 8 hours (included) of sleep daily.
?**** Broccoli Chicken for pandas having 9 to 11 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]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are DNA and RNA and what is the difference between them?

Answered: 1 week ago

Question

Why do living creatures die? Can it be proved that they are reborn?

Answered: 1 week ago