Question: python program bug exhibitPurpose: A natural habitat museum is looking to develop software to track animals presented in various exhibits. One of the first exhibits

python program bug exhibitPurpose:
A natural habitat museum is looking to develop software to track animals presented in various exhibits.
One of the first exhibits the museum wants to transfer to this new system will be an everglade that
includes various bugs, bird, and other animals. You will prepare some of the initial code related to this
exhibit.
One of the first parts of this exhibit will be the bugs found in the everglades. To get started, you will
prepare a class that provides the common functionality for all of the various kinds of bugs. One of these
kinds of bugs is provided for reference, and you will prepare another class for another kind of bug.
Task:
Design the prototype of this system mentioned above using Python. The Bug class will be the superclass
that contains the common functionalities for all of the other classes. The Spider class is provided for
reference when developing the subclasses. You will also prepare the Grasshopper class as another
subclass of Bug.
For the Bug class, you will need an instance method to specify the name, number of legs, and number of
wings. You should also include methods to access or modify these three properties.
The last method for the Bug class will be __str__. This is used to return a string that describes the state of
an object. In this case, return a string that indicates the name, number of legs, and number of wings of a
bug.
After completing the Bug class, refer to the Spider class for an example of how a subclass of Bug will be
implemented. Based on that example, implement the Grasshopper class. A grasshopper has 6 legs and 4
wings. Similar to the Spider class, you will also need to include some fact about grasshoppers found in
the everglades.
Once you have implemented all three of those classes, you will need a Tester class. In this class, you will
construct three objects: one from each of the other three classes. For the Bug object, use Millipede,
1000, and 0 as the arguments. For the Spider and Grasshopper objects, you will not need to provide any
arguments (the call to the superclass constructor will handle that for you).
You then need to print out the information about each object. Since these classes are implementing the __str__ method,
you will only need to pass in the variables that hold these objects to the print method.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!