COMP 302 Lecture Notes - Lecture 26: Gaussian Integer, No Code, Subtyping

37 views7 pages

Document Summary

March 23, 2017 ( lecture 26 // week 11, lecture 2 ) Normally, he likes to emphasize concepts in a way that aren"t tied to language. But today he will specifically focus on java because it illustrates some concepts that transcend the java language, but it java is also a language that is widely-used, so it is is useful to understand its subtleties. Two main features he wants to highlight: (1) Inheritance , which doesn"t necessarily need to be tied to object-oriented programming, but it is with oop where it came into its own. ". Inheritance is the ability to reuse code. (2) subtyping . Subtyping is the ability to use the same code across different types. In java, whenever you have inheritance, the mechanism that induces inheritance also induces subtyping. Inheritance means that you have a bunch of code that you"ve already written for a class of objects, and then you decide to make something similar but slightly different.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents