In Blue j Create a new class named Scene. Add a main method to the Scene class that simply creates a new Scene object  Add a public method named animate that has no parameter variables and returns nothing.   Add two House fields to Scene. Call them house1 and house2. Add a sun field that can reference a Circle object.  Add a moon field that can reference a Circle object.                                                                                          Create a no-arg constructor for the Scene class that creates the two House objects shown in the image below. Use the methods you created in the preceding activity to position and color the houses exactly as in the image. We will adopt the convention that house1 refers to the left house and house2 refers to the right house. Add a sun to the upper-left corner of the scene. (Create the sun object and set the color, position, and size in the no-arg constructor.)  When you run main, what appears in the resulting image should match the above exactly.   In the animate method, move the sun across the sky until it moves completely off the right edge of the window using the slowMoveHorizontal method for the sun object. Add a call to animate in your main method just below the line that creates the Scene object. Now when you run main you should see the sun move across the sky.  Add a blue moon object similar to how you added the sun. Place the moon initially off the screen to the left of the sun. You could just copy the sun code and then move moon horizontally. In animate, after the instruction that moves sun across the sky, make moon move slowly across the sky and stop above house2

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In Blue j

Create a new class named Scene.
Add a main method to the Scene class that simply creates a new Scene object
 Add a public method named animate that has no parameter variables and returns nothing. 
 Add two House fields to Scene. Call them house1 and house2.
Add a sun field that can reference a Circle object.
 Add a moon field that can reference a Circle object.                                                                                          Create a no-arg constructor for the Scene class that creates the two House objects shown in the image
below. Use the methods you created in the preceding activity to position and color the houses exactly
as in the image. We will adopt the convention that house1 refers to the left house and house2 refers
to the right house.

Add a sun to the upper-left corner of the scene. (Create the sun object and set the color, position, and
size in the no-arg constructor.)
 When you run main, what appears in the resulting image should match the above exactly. 
 In the animate method, move the sun across the sky until it moves completely off the right edge of
the window using the slowMoveHorizontal method for the sun object. Add a call to animate in your
main method just below the line that creates the Scene object. Now when you run main you should
see the sun move across the sky. 

Add a blue moon object similar to how you added the sun. Place the moon initially off the screen to
the left of the sun. You could just copy the sun code and then move moon horizontally. In animate,
after the instruction that moves sun across the sky, make moon move slowly across the sky and stop
above house2

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Running Time of Application
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education