Notes 2 - Week 1: Lists We will create and use an ADT using...

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

View Full Document Right Arrow Icon
Week 1: Lists We will create and use an ADT using an interface called a list . Task 1(same as Week 0:Task 6): To get an informal idea study Fig. 4-1 on page 108. These methods are given more detail in the ADT version on pages 109-110. Finally a version is displayed in Java syntax as an interface on page 114-115. Compare and contrast these 3 versions and convince yourself how they are related to each other. The particular methods chosen by our author is arbitrary. Different authors have different methods and different versions of these methods. For example, our textbook’s add(newEntry) method will add newEntry at the head of the list, a different textbook author may chose to interpret this to add newEntry at the end of the list instead. Another example can be seen with the remove method. This author’s remove takes a position number. A different author’s textbook may choose to take anEntry as an argument and remove the first occurrence, and yet a third author may chose to remove all occurrences of the parameter anEntry . Some of these variations are included in homework assignments.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Notes 2 - Week 1: Lists We will create and use an ADT using...

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

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