PART 1:
For this project, you'll be creating a page where the user can switch between night and day by clicking on the sun/moon. The instructions are HERE (.txt again, sorry).
Due: Friday, March 4 by the end of class.
--------------------------------------
PART 2:
One sun and one moon? Booooooorrrriiiinnnngggg..... What would the day/night sky look like on a different planet? In a different galaxy? In a different universe? Create at least two suns and at least two moons, in different colors. What color would the sky be? Be creative!
Due: Friday, March 11 by the end of class.
--------------------------------------
PART 3:
Real life isn't just black and white or yes and no. There are shades of grey, and there's maybe yes, maybe no, and everything in between. Day and night work the same way! What would the sky colors look like at dusk or dawn? How about twilight? Change the original project so the sun/moon rotates between 4 different times/color palettes.
You will need to use "if", "else", and "elseif" statements. Below is a pretty good explanation of how these work:
Elseif is a conditional, nested if statement.
String color = green;
if(color is red)
print("It's red!")
else if(color is green)
print("It's green!")
else
print("It's not red!")
First, the program checks to see if color is red. Because color is not red, the code in the else statement is executed.
Next, the program looks at the else if statement. The else if is only looked at if the first if condition is not satisfied. In this sense else if is sort of like a nested conditional statement. Because the if's condition is not met, everything in the else is executed. However things in the else if are only executed if the condition of the else if is met. To reiterate, else if is only looked at (before being executed) if the initial if condition (in this case, the color is red) is false.
Due: Friday, March 25 by the end of class