Part A. P2.7 from your textbook, but start with a color that has red, green,
and blue values of 60, 70, and 80. Then apply the brighter
method
three times.
Draft: Just construct the color and print its redness, by invoking the
getRed
method.
Put your work in a class Homework2A.
Part B. P2.8 from your textbook, as modified in part A. That is, start with
a color that has red, green, and blue values of 60, 70, and 80. Then apply the
brighter
method three times.
Draft: Set myColor
to new Color(60, 70, 80)
.
That's the easiest 2 points you'll ever get.
Put your work in a class BrighterDemo.
Part C.
Using the Day
class of Worked Example 1, write a program that
generates a Day
object representing January 1, February 28, and
December 31 of this year. Advance each object by one day, and print each
object. Also print the expected values:
2012-01-02 Expected: 2012-01-02 ...
Draft: Just print out the object representing January of this year and its expected value.
You will find Worked Example 1 by following the link on the top of the course page.
You submit three Java files to Canvas:
Note that you must submit to Canvas. netbrat is anonymous and has no connection to the gradebook.