Unit VI Using Class Methods Object Methods - 1.5 Weeks General Students learn the difference between Classes and Objects, as well as between Class Methods and Object Methods. They learn that calling object methods requires the instantiation of an object with the new Objectives operator. Students also learn the importance of randomness in their daily lives and how randomness is generated in a Java program. Classes and objects Using to instantiate a new object new Topics, Calling object methods Sub-Topics, Using Overloaded constructors by recognizing the method heading signature Details Generating random values Using the Random class to be Methods nextInt, nextDouble, setSeed Covered Using Math.random Generating any desired random range Using the Graphics class The hidden new operator of the Graphics object Additional Graphics methods setColor, drawPolygon, fillPolygon Using the Polygon class Method addPoint Constructing custom Color objects Anonymous objects and concrete objects Displaying random graphics objects with random colors Wrapper classes Integer, Double, Boolean Integer.MAX_VALUE Integer.MIN_VALUE Using intValue Resources, Exposure Java, Chapter 6, Using Class Methods and Object Methods Evaluations 2 Reading Quizzes, 1 Lab Assignment and 1 Multiple-Choice Chapter Test. Students do several class exercises creating Java statements that generate a specified random range. Conversely they do exercises with program statements and determine the random range. Class Tasks, Students complete a sequence of timed output exercises. Lab Random Objects With Random Colors Lab Assignment Assignments Students complete a lab assignment with 8 graphics cells. Each cell feature a group of randomly colored objects, such as lines, circles, squares, etc. All randomness generated done with Math.random. Unit six teaches students to use many classes that use object methods. It is now necessary to define an object with the new operator before any of the object methods can be called. Teaching Strategies, This unit teaches that methods of the Graphics class are called with a Graphics object that appears to exist without the use of the new operator. This is an illusion, because the Graphics object is constructed Best in the background and then passed to the Graphics object parameter of the paint method. Practices Wrapper classes are introduced and will be important for future topics where data structures are only capable of storing objects. Curriculum CR#1, CR#5 Requirements
Unit VI Using Class Methods Object Methods - 1.5 Weeks General Objectives Students learn the difference between Classes and Objects, as well as between Class Methods and Object Methods. They learn that calling object methods requires the instantiation of an object with the new operator. Students also learn the importance of randomness in their daily lives and how randomness is generated in a Java program. Topics, Sub-Topics, Details to be Covered Classes and objects Using new to instantiate a new object Calling object methods Using Overloaded constructors by recognizing the method heading signature Generating random values Using the Random class Methods nextInt, nextDouble, setSeed Using Math.random Generating any desired random range Using the Graphics class The hidden new operator of the Graphics object Additional Graphics methods setColor, drawPolygon, fillPolygon Using the Polygon class Method addPoint Constructing custom Color objects Anonymous objects and concrete objects Displaying random graphics objects with random colors Wrapper classes Integer, Double, Boolean Integer.MAX_VALUE Integer.MIN_VALUE Using intValue Resources, Evaluations Exposure Java, Chapter 6, Using Class Methods and Object Methods 2 Reading Quizzes, 1 Lab Assignment and 1 Multiple-Choice Chapter Test. Class Tasks, Lab Assignments Students do several class exercises creating Java statements that generate a specified random range. Conversely they do exercises with program statements and determine the random range. Students complete a sequence of timed output exercises. Random Objects With Random Colors Lab Assignment Students complete a lab assignment with 8 graphics cells. Each cell feature a group of randomly colored objects, such as lines, circles, squares, etc. All randomness generated done with Math.random. Teaching Strategies, Best Practices Unit six teaches students to use many classes that use object methods. It is now necessary to define an object with the new operator before any of the object methods can be called. This unit teaches that methods of the Graphics class are called with a Graphics object that appears to exist without the use of the new operator. This is an illusion, because the Graphics object is constructed in the background and then passed to the Graphics object parameter of the paint method. Wrapper classes are introduced and will be important for future topics where data structures are only capable of storing objects. Curriculum Requirements CR#1, CR#5
ADV_COMPUTER.docx