chap8-schedule.docx - chap 8 Interacting objects Newton’s...

  • No School
  • AA 1
  • 5

This preview shows page 1 - 2 out of 5 pages.

chap 8 Interacting objects : Newton’s Lab Objectives Understand another polymorphism context: method overloading Understand the two usage of Java keyword “this” : one is for self-referencing, and the other is for one constructor to invoke another constructor, i.e., an overloaded constructor Know how to define and use constant variables in Java using keyword static final Understand how to use Interface as superclass (parent class) Understand the dynamic binding and what design patterns to use for class and interface design. Understand the various class and interface design patterns Schedule: This lesson covers Moodle folder “chap 8”. Please follow the steps below. 1, work on sec 8.1 ~ 8.9, which include scenario Newtons-Lab-1, Lab-2 and Lab-3. 2, in Lab-3, you need to understand the code to bounce the planet when it reaches the edges of the space 3, in Lab-3, you need to understand the code in class Obstacle that determines where a planet body has hit an obstacle or not. 4, after class exercise: work on textbook exercises 8.35, 8.40, 8.41 and 8.44. You need to first open the existing scenario “Newtons-Lab-3”, then start working on these exercises. 5, unzip file “ exampleOfClassInterfaceDesign.zip ”, you will see three source code folders, plus one file named versionComparison.docx”. You need to study the source code examples in these three folders, to learn the different class-interface design principles, and more specifically, you need to know which design version can accommodate dynamic binding in the application file, and which version cannot. File “ versionComparison.docx” illustrates the difference in the three versions of class and interface design, and presents the UML class diagram for each design. 6, the source code in this zip “ exampleOfClassInterfaceDesign.zip ” includes Interface, and the following links explain the characteristics of Interface: We can think of Interface as a special kind of class, and its special characteristics are: in Interface, all methods must be abstract methods, regardless we explicitly place the keyword abstract for methods.
Image of page 1

Subscribe to view the full document.

Image of page 2

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes