1 / 8

Chapter 10 Thinking in Objects

Chapter 10 Thinking in Objects. Motivations. You see the advantages of object-oriented programming from the preceding chapter. This chapter will demonstrate how to solve problems using the object-oriented paradigm. Class Abstraction and Encapsulation.

genek
Télécharger la présentation

Chapter 10 Thinking in Objects

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 10 Thinking in Objects

  2. Motivations You see the advantages of object-oriented programming from the preceding chapter. This chapter will demonstrate how to solve problems using the object-oriented paradigm.

  3. Class Abstraction and Encapsulation Class abstraction means to separate class implementation from the use of the class. The creator of the class provides a description of the class and let the user know how the class can be used. The user of the class does not need to know how the class is implemented. The detail of implementation is encapsulated and hidden from the user.

  4. Designing the Loan Class Run Loan TestLoanClass

  5. Loan Class • Listing 10.1 on pages 367-8 • TestLoan.java • Listing 10.2 on pages 368-9 • Loan.java

  6. Object-Oriented Thinking Chapters 1-8 introduced fundamental programming techniques for problem solving using loops, methods, and arrays. The studies of these techniques lay a solid foundation for object-oriented programming. Classes provide more flexibility and modularity for building reusable software. This section improves the solution for a problem introduced in Chapter 3 using the object-oriented approach. From the improvements, you will gain the insight on the differences between the procedural programming and object-oriented programming and see the benefits of developing reusable code using objects and classes.

  7. The BMI Class BMI UseBMIClass Run

  8. BMI Class • Listing 10.3 on page 371 • UseBMIClass.java • Listing 10.4 on pages 371-2 • BMI.java

More Related