<< Chapter < Page | Chapter >> Page > |
Listing 1 - Write the Java application described below. |
---|
/*File Prob01 Copyright 2012 R.G.Baldwin Write a program named Prob01 that uses the class definition shown below and Ericson's media libraryalong with the image file named Prob01.jpg to produce the graphic output image shown in Figure 1 below. Click Prob01.java to download a Java source file containing the solutionto this program. In addition to the output image, your program must display your name and the otherthree lines of text shown below on the command-line screen: Display your name here.
A 300 by 274 world with 2 turtles in it.joe turtle at 256, 131 heading 45.0.
sue turtle at 50, 37 heading 0.0.*********************************************************/
public class Prob01{//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION.
public static void main(String[]args){
Prob01Runner obj = new Prob01Runner();obj.run();
System.out.println(obj.getMars());System.out.println(obj.getJoe());
System.out.println(obj.getSue());}//end main
}//end class Prob01nd program specifications. |
Figure 1 - Required output image for Prob01.
Discussion
The following is a non-exhaustive list of concepts that you need to understand along with knowledge and skills that youneed to possess in order to successfully write this program and/or understand the given solution in Prob02.java . Some of these items are general in nature and some are specific to the use of Ericson's multimedialibrary. I won't repeat the items listed under Program 1 above. Instead, I will concentrate on new concepts, knowledge, and skills not included in the above list.
Listing 2 - Write the Java application described below. |
---|
/*File Prob02 Copyright 2012 R.G.Baldwin Write a program named Prob02 that uses the class definition shown below and Ericson's media libraryalong with the image file named Prob02.jpg to produce the graphic output image shown in Figure 2 below. Click Prob02.java to download a Java source file containing the solution to this program. In addition to the output image, your program must display your name and the other text shownbelow on the command-line screen: Display your name here.
Picture, filename Prob02.jpg height 274 width 365*********************************************************/
public class Prob02{//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION.
public static void main(String[]args){
Prob02Runner obj = new Prob02Runner();obj.run();
System.out.println(obj.getPicture());}//end main
}//end class Prob02//End program specifications. |
Notification Switch
Would you like to follow the 'Object-oriented programming (oop) with java' conversation and receive update notifications?