Make some modifications to Joe the Box. Add a method to Box named setColor that takes

Question:

Make some modifications to Joe the Box.

• Add a method to Box named setColor that takes a color as input, then makes the input color the newcolor for the box. (Maybe setDefaultColor should call setColor?)

• Add a method to Box named setSize that takes a number as input, then makes the input number the new size for the box.

• Add a method to Box named setPosition that takes a list or tuple as a parameter, then makes that input the new position for the box.

• Change init so that it uses setSize and setPosition rather than simply setting the instance variables.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: