COS 260 DAY 11 Tony Gauvin
Agenda Questions? 4th Mini quiz Corrected Assignment 2 Mixed results Assignment 2 Great results Capstone Proposals Due Oct 15 No class on Oct 15 Next Mini Quiz on Chapter 5 Oct 19 Assignment 3 Posted Due Oct 19 Review Chapter 5
Objects First with Java Review Java has an extensive class library. A good programmer must be familiar with the library. The documentation tells us what we need to know to use a class (its interface). Some classes are parameterized with additional types. <> Parameterized classes are also known as generic classes or generic types. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling © David J. Barnes and Michael Kölling
Objects First with Java Review Java has an extensive class library. A good programmer must be familiar with the library. The documentation tells us what we need to know to use a class (interface). The implementation is hidden (information hiding). We document our classes so that the interface can be read on its own (class comment, method comments). Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling © David J. Barnes and Michael Kölling
Chapter Five Review Interface <> implementation Map Set Javadoc and tags Access modifiers Information hiding Coupling Class and constant variables Static and final Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling
OOP Coupling Coupling is the amount of interdependence between programming modules Loose Coupling means little interdependence Tight Coupling means lots of interdependence Source: http://gamedevelopment.tutsplus.com/tutorials/quick-tip-the-oop-principle-of-coupling--gamedev-1935 Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling
Putting it all together Creating a Roll The Dice animation Needs Graphics canvas Dice pictures random integer 1-6 We will leverage Existing code as much as possible rolldaDie.zip img.zip Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling