1 / 10

Chapter 13

Chapter 13. Object-oriented design for multiple classes. Objectives. To expand an object-oriented solution to cater for multiple classes To introduce interface and GUI objects. 13.1. Object-oriented design for multiple classes. Object-oriented design for multiple classes.

oakes
Download Presentation

Chapter 13

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 13 Object-oriented design for multiple classes

  2. Objectives • To expand an object-oriented solution to cater for multiple classes • To introduce interface and GUI objects

  3. 13.1 Object-oriented design for multiple classes

  4. Object-oriented design for multiple classes • Advantages in using inheritance: • Saves time because the Parent class contains attributes and method that already exist • Reduce errors because the Parent class method have already been tested and used

  5. 13.2 Interface and GUI objects

  6. Interface and GUI objects • Many popular programming languages provide a graphical user interface (GUI), which enables the programmer to select the elements of the program’s user interface from a pre-existing range of option • Interface design is a subset of a program design, as it concentrates on one aspect of the program’s performance and implementation

  7. Interface and GUI objects • The interface are developed from predesigned classes available in the programming language • The use interface option may include windows, buttons, menus, boxes to hold text, drop down list and many more

  8. Summary • Most object-oriented programs need more than one class. • Classes can be related to each other through association, by aggregation or composition or by inheritance. • Polymorphism allows several operations to have the same name, but they achieve their purposes by different methods.

  9. Summary • Using operation overriding, a child class may substitute the parent class version of an operation with its own specific version. • With operation overloading, several operations of the same name may have different numbers of parameters and different algorithms.

  10. Summary • Interface design for visual programming languages uses object-oriented design principles. • Interface objects have operations and attributes. • The choice of interface design can reduce the complexity of both an algorithm and the resulting program.

More Related