2A

This semester, the first day of finals is December 13, 2017.

Write a program FinalPrinter which will calculate how many days from today (whatever day the program is run) until finals start.

Chapter 2 Worked Example 1 from your text gives you a Day class and discusses how to use it. A copy of the Day class itself is at the Codecheck URL below. You need to copy the class into a Bluej project along with the starter code.

Lesson 2 of the Udacity videos also discusses the Day object. Section 19: How Many Days gives an example of working with the Day object in code.

Do the following:

For the draft, just add code to the starter to define the variable today and assign today's date to it. When you run the program, the date will be printed by the starter code.

2A draft:
2A final:

2B

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

You are given a word in the starter code. Do the following:

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 2 times the length of the string. Note: There is a String method length() which returns the length of the String. Use it.

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.

For this problem, you will use the Udacity graphics package. After you create your project, you will need to import the graphics package into Bluej. Download the graphics package from Udacity and put it in a convenient location. (You will need this again in future assignments and exams). 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: