CS49J

Do not create packages. Use the default package

1A

Complete the class RectangleWork given to you. You will find it at the Codecheck URL below.

You will use the Rectangle class in the Java library. You will need to import java.awt.Rectangle. To look at Rectangle's public interface type java api rectangle into Google or other search engine

Do the following:

Codecheck URL

1B

In this problem you will use various String methods. Complete the class StringsForAll given to you. You will find it at the Codecheck URL below

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 to replace characters. No credit for simply printing the word with replacements or replacing the entire word.

Note: When you submit your code to Codecheck, it will first run with the given word(rates) 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, the second word will also execute correctly.

Codecheck URL

1C

When UNIX was developed, the date January 1, 1970 was set as time 0 and time was measured from that point in seconds. Itis often calledmthe UNIX epoch. You will use the Day class from Chapter 2 Worked Example 1 to calculate the days from today to that date.

Write a program Timestamp which will calculate how many days in the past the epoch was from today (whatever day the program is run).

You will find the Day class at the Codecheck URL below.

Codecheck URL

Submitting

After you are satisfied that your code is correct,