Question: practice program 1,2,3 listing 1.1 is attached 1.4 Graphics Supplem 12. Find the documentation for the Java Class Library on the Oracde Web site. (At
1.4 Graphics Supplem 12. Find the documentation for the Java Class Library on the Oracde Web site. (At this writing, the link to this documentation is http://download-Ilnw.oracle com/javase/7/docs/api/.) Then find the description for the dass Scanner How many methods are described in the section entitled "Method Summary 13. Self Test Question 27 asked you to think of some attributes for a song object. What attributes would you want for an object that represents a play list containing many songs? 14. What behaviors might a song have? What behaviors might a play list have? 15. What attributes and behaviors would an object representing a credit card 16. Suppose that you have a number x that is greater than 1. Write an algo- Contrast the difference in behavior between the two kinds of objects. account have? rithm that computes the largest integer k such that 2 is less than or equal to x 17. Write an algorithm that finds the maximum value in a list of values. 18. Write statements that can be used in a Java applet to draw the five inter- locking rings that are the symbol of the Olympics. (Don't worry about the color.) Gra 19. Find the documentation for the class Graphics in the Java Class Library (See Exercise 12.) Learn how to use the method drawRect. Then write statements that can be used in a Java applet to draw a square contain Gra ing a circle. The circle's diameter and the square's side should be equal in size 20. Write statements that can be used in a Java applet to draw the outline of a crescent moon Gra PRACTICE PROGRAMS Practice Programs can generally be solved with a short program that directly applies the programming principles presented in this chapter 1. Obtain a copy of the Java program shown in Listing 1.1 from the Web at the location given in the preface. Name the file FirstProgram.java. Compile the program so that you receive no compiler error messages. Then run the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
