(10 points)
Here is a description of the content of the UW library that you might find useful.
Spring is here. This is the time to go on a road trip to look at the scenery of Washington state. Unfortunately, this class doesn't incluce such a field trip! But we can still get a taste of our beautiful state by drawing a countryside scene with a Java program.
In this project, you will complete several classes to draw a picture in a graphics window. The purpose of this assignment is to give you experience writing classes in Java and using Eclipse.
Download the four files AppleTree.java, Car.java, CountrysideScene.java,and Mountain.java and include them in an Eclipse project (as we did in class). Run the program by instantiating the class CountrysideScene. You should get a window that displays a blue sky, a green expanse and two mountains in the upper left corner of the image. Notice that the two mountains don't have the same size. Read through the code of CountrysideScene and Mountain. You will see that when CountrysideScene is instantiated, a graphics window is created. Then two Mountain objects are created. As it is, the draw method of the Mountain class draws a triangle in the graphics window. Make sure that you understand how this is happening within the code.
None of the classes given to you are complete. Your assignment is to complete the four classes given above and create a fith class so that an instance of CountrysideScene appears as a picture containing four different scenery elements. Here is a list of the requirements of the assignment :
To create the graphics elements, you may want to draw them first on a piece of graph paper. It will make it easy for you to locate each point of your drawing with respect to some reference point (x,y).
If you want to create your own colors, use the Color constructor. It reads Color(r,g,b) where r,g and b are integers between 0 and 255. The color is a mixture of red, green and blue as specified by r, g and b. This site gives the rgb values for different colors. For example
Color myColor = new Color(152, 251, 152); // a pale green color
Good luck!
Here is a possible picture (shown with only three types of elements. You have to put in a fourth one as well).
Your program has to be your own.