2A

Complete the application RectangleObject. A Rectangle object has been created for you in the starter file.

Do the following:

Hint: You can decrease the size of the Rectangle by using a negative number as a parameter in the grow method.

Note: Your code will be run twice - once with the values 50, 10 for width and height and once with two different values for width and height. You do not need to worry about that. It will happen automatically. If your code is correct, you will get the correct answers

For the draft, calculate and print the area of the original rectangle. Do not grow or translate

2A draft:
2A final:

2B

In this problem you will use various String methods. Complete the class StringPlay

Remember that replace is an accessor method. It returns the changed version of the string. If you want to do something with the returned string - like use replace on it again - you need to save the return value in a variable.

You must use the String replace method on strings of one character. No credit for simply printing the word with the replacements or replacing the entire word.

Note: When you submit your code to Codecheck, it will first run with the given word, but then it will run again with a different word. You do not need to worry about that. It will happen automatically. If your code is correct,

For the draft, just print the length of the string mnus 1. Note: There is a String method length() which returns the length of the String

2B draft:
2B final:

2C

Finish the application SnowmanDrawing to draw a snowman consisting of 3 circles centered on top of one another with a hat on top. The centers of the circles fall on a vertical line. The drawing will looks like this:

screen shot of output

The dotted rectangle is the bounding rectangle of the middle circle. It is not part of your drawing.

Specifications:

For the draft, fill the hatbox and draw the brim.

Getting the Udacity graphics package

For this problem, you will use the Udacity graphics package. After you create your project, you will need to import the graphics package into it. Download the graphics package from Udacity and put it in a convenient location. Select the workbench for your project. Click Import... Navigate to the graphics package and select it. You may get a warning. Just click Continue

2C draft:
2C final: