CISC 124 Lecture Notes - Lecture 20: Unified Modeling Language, Multiple Inheritance, Source Code

58 views2 pages

Document Summary

Must have the file src. zip - download separately and put it in the root jdk folder. A class that implements comparable can be sorted with a built in sort method. Can sometimes pretend that an interface is an object - part of polymorphism. Every new object you define is automatically a child of the object class. Find out how to find out inheritance by looking up api or source code. Public class person = public class person extends object. Want to store the description of every person in 1 array. Super - takes you one level up in the hierarchy. Compiler will force you to invoke super in a child class" constructor at the first line. Polymorphism: pointers of type person are pointing to objects of type student and professor. At run time the pointers will morph into their actual object types - late/dynamic binding. 5 ways to have methods in a sub-class:

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents