COMP 302 Lecture Notes - Lecture 25: Type Constructor, Subtyping, Code Reuse

23 views7 pages

Document Summary

March 21, 2017 ( lecture 25 // week 11, lecture 1 ) Today we are talking about a fundamental concept called subtyping . A is a subset of b: a b means that a and b are collections, and this notation means that everything that is in a, is also in b. B might be a larger collectio or the same size. It includes everything in a. this is not what we are talking about today!!! When you think about collections, they come with: (1) set of elements (2) set of operations you can perform on them. This is why the set view is not adequate. We need to focus on what we can do with the things in the computational collection (aka 2). For example, you might have two similar collections in terms of elements, but with different operations.

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

Related Questions