discussion 8 - github pages · 2020-01-10 · linked list to stream code for linked list how can we...
TRANSCRIPT
![Page 1: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/1.jpg)
Discussion 810/30 and 11/1
![Page 2: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/2.jpg)
OOP - Revision to Rectangles
![Page 3: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/3.jpg)
Conversion of Rectangle to Class
![Page 4: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/4.jpg)
Duck Typing: Is there a difference between them?
![Page 5: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/5.jpg)
Exercise 1Creates classes C1 and C2 such that
Outputs:
2
6
8
![Page 6: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/6.jpg)
Exercise 1
![Page 7: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/7.jpg)
Exercise 2What will the output be?
![Page 8: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/8.jpg)
Exercise 2What will the output be?
10
10
![Page 9: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/9.jpg)
Exercise 3What does this output?
![Page 10: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/10.jpg)
Exercise 3What does this output?
0
0
![Page 11: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/11.jpg)
Streams
![Page 12: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/12.jpg)
Streams
![Page 13: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/13.jpg)
Binary Tree to Stream
How can we convert to stream?
![Page 14: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/14.jpg)
treeStream (or fringeStream in the notes)
![Page 15: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/15.jpg)
Linked List to StreamCode for linked list
How can we convert this to a stream?
![Page 16: Discussion 8 - GitHub Pages · 2020-01-10 · Linked List to Stream Code for linked list How can we convert this to a stream?](https://reader034.vdocuments.mx/reader034/viewer/2022042101/5e7e46313109d856950effd8/html5/thumbnails/16.jpg)
llStream