Lance R.

asked • 03/26/21

How should I create this file?


Create a class called Blobber inside of a file called blobber.py. Your Blobber class should have the following properties:

  1. A private float data field called radius
  2. A private float data field called height
  3. A private string data field called color. The color should always be lowercase.
  4. A private string data field called name. The name should always be capitalized.
  5. A constructor is called with a name, color, radius, and height.
  6. Accessor (getter) and mutator (setter) methods for name and color
  7. A method called feedBlobber()
  8. Takes a float value and increases the radius by the given amount
  9. This method takes some thought!
  10. A method called blobberSpeak() that returns a string that can be printed.
  11. The string should be a complete two-line statement that includes the name, color, and happiness level of the Blobber.



1 Expert Answer

By:

Patrick B. answered • 03/27/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.