На главную Java, Java, Java, Object-Oriented Problem Solving (3rd Edition) 2017-07-07 02:10:07 [Page 103] OBJECTIVES After studying this chapter, you will Understand the role that methods play in an object-oriented program.Know how to use parameters and arguments to pass data to an object.Understand how constructor methods are used to instantiate objects.Know the difference between passing a value and passing a reference to an object.Be able to design your own methods.Know how to use the if-else and while control structures. OUTLINE 3.1Introduction3.2Passing Information to an Object3.3Constructor Methods3.4Retrieving Information from an Object3.5Passing a Value and Passing a Reference3.6Flow of Control: Control Structures3.7Testing an Improved OneRowNim Intelligent Agents3.8From the Java Library: java.lang.Object3.9Object-Oriented Design: Inheritance and Polymorphism3.10Drawing Lines and Defining Graphical Methods (Optional) Chapter Summary Solutions to Self-Study Exercises Exercises Related Категории Search