1 / 6

Advanced Java Concepts: Inheritance, Method Overriding, and UML Diagrams for CPSC 233

This tutorial for CPSC 233 (Winter 2013) focuses on advanced Java programming concepts, emphasizing inheritance, method overriding versus method overloading, and the role of static members. It incorporates practical exercises using UML diagrams to clarify the relationships and functionalities within class hierarchies. Participants will analyze source code to identify inherited data members and methods, as well as recognize method overrides and overloads. Additionally, a review and quiz section will help reinforce understanding of these key concepts.

Télécharger la présentation

Advanced Java Concepts: Inheritance, Method Overriding, and UML Diagrams for CPSC 233

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. Introduction to Computer Science for Majors II CPSC 233, Winter 2013 Tutorial 14, Mar 27/28, 2013 CPSC 233, winter 2013

  2. Outline • Review • Quiz CPSC 233, winter 2013

  3. Key Concepts • Advanced Java • Copy constructor • Pass by value • Pass by reference • Static members • Inheritance • Private, protected, public • Member inheritance • Method overriding v.s method overloading • Invoking of the constructors CPSC 233, winter 2013

  4. UML Diagram (source code in practice1/) • Answer the following questions based on the given program • What are the data members that Child1 inherits from the superclass? • What are the methods that Child1 inherits from the superclass? • Identify method overriding in this program • Identify method overloading in this program • What is the output of the program (see Driver.java)?

  5. UML Diagram (source code in practice2/) • Answer the following questions based on the given program • What are the data members that Child1 inherits from the superclass(es)? • What are the methods that Child1 inherits from the superclass(es)? • What are the data members that Parent inherits from the superclass? • What are the methods that Parent inherits from the superclass? • Identify method overriding in this program • Identify method overloading in this program • What is the output of the program (see Driver.java)?

  6. Outline • Review • Quiz CPSC 233, winter 2013

More Related