CS2_22A_LinkedListsStacksQueues

CS2_22A_LinkedListsStacksQueues - CS2 • Module 22A •...

Info iconThis preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS2 • Module 22A • Category: CS Concepts • Topic: Linked Lists • Objectives – Linked Lists – Stacks – Queues CS 2 Introduction to Object Oriented Programming Module 22A CS Concepts Linked Lists - Stacks - Queue Evolving Data Structures: Evolving Data Structures: Linked Lists Linked Lists ! Imagine you just broke Imagine you just broke up with your girlfriend... up with your girlfriend... Here, certain gender assumptions are made. Bear with us. Linked Lists Review It’s time to clean off your desk. Time to replace your photographs Ex- Girlfriend You’re going to finally remove that picture of your old Ex- girlfriend, Brittany, who never really cared for you. (Long story.) MOM You decided to replace her photo with a framed picture of your mother. She was no good for you anyway. So, you put the old photograph in a box (just in case she calls). Ex- Girlfriend Ex- Girlfriend Ex- Girlfriend ... next to the boxes holding pictures of the other celebrities you once dated. Ex- Girlfriend Mistake #1 Mistake #1 Mistake #2 Mistake #2 Big Big Polymorphic Polymorphic Mistake Mistake Mistake #4 Mistake #4 TIME LINE OF HEARTBREAK And then it hits you And then it hits you cs2 can help organize the cs2 can help organize the wreckage that is your social life. wreckage that is your social life. How So? Ex- Girlfriend Ex- Girlfriend Ex- ThingFriend Ex- Girlfriend Mistakes I Mistakes I Have Made Have Made Instead of using boxes, it might be better to use a linked list structure. How So? Ex- Girlfriend Ex- Girlfriend VERY Ex- Girlfriend Ex- Girlfriend Mistakes I Mistakes I Have Made Have Made Instead of using boxes, it might be better to use a linked list structure. How So? Ex- Girlfriend Ex- Girlfriend VERY Ex- Girlfriend Ex- Girlfriend Mistakes I Mistakes I Have Made Have Made Instead of using boxes, it might be better to use a linked list structure. How So? Ex- Girlfriend Ex- Girlfriend VERY Ex- Girlfriend Ex- Girlfriend Mistakes I Mistakes I Have Made Have Made Instead of using boxes, it might be better to use a linked list structure. How So? Ex- Girlfriend Ex- Girlfriend VERY Ex- Girlfriend Ex- Girlfriend Mistakes I Mistakes I Have Made Have Made Instead of using boxes, it might be better to use a linked list structure. How So? Ex- Girlfriend Ex- Girlfriend VERY Ex- Girlfriend Ex- Girlfriend Mistakes I Mistakes I Have Made Have Made Instead of using boxes, it might be better to use a linked list structure. Immediately you start coding Immediately you start coding public class Picture { private String strName; private Picture next; public Picture (String strNome){ setName(strName); setNext(null); } public void setNext(Picture next){ this.next = next; } public Picture getNext() { return next; } public String getName(){ return strName; } public void setName(String strName){ this.strName = strName; } } // Picture Looks good....
View Full Document

{[ snackBarMessage ]}

Page1 / 82

CS2_22A_LinkedListsStacksQueues - CS2 • Module 22A •...

This preview shows document pages 1 - 16. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online