P2 README - P2 README 5:28 PM Programming assignment#2 CSE...

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

View Full Document Right Arrow Icon
11/7/11 5:28 PM P2 README Page 1 of 7 http://ieng6.ucsd.edu/~cs12f/Assignments/P2/README.html Programming assignment #2: CSE 12 Fall 2011 Here's a description of the second programming assignment for CSE 12, Fall 2011. In this assignment, you will write a class that implements the Java Collections interface List<E> , using a singly-linked list, and collect timing data on its performance. The JUnit test program you wrote for the previous assignment will be useful here. >>> Due Fri Oct 21 12:00noon >>> Required solution files: List12.java TimeList.java TimeList.pdf This means that the files that contain your solution to the assignment must be turned in by the due deadline by using the bundleP2 script while logged into your cs12 account on ieng6. If your file is turned in 24 hours or more before the deadline, you will get 1 additional point added to your programming assignment score. The turnin procedure is described below in the section "Turning in your assignment" . It's a good idea to plan to do the assignment well before the deadlines; terminals and tutors can get very busy at the last minute. In doing this assignment, it's your responsibility to understand the course rules for integrity of scholarship. Getting started First, familiarize yourself with the topics in section 2.3, chapter 3, and section 5.3 of the textbook, or corresponding lecture notes. This assignment uses material introduced and discussed there. You will also find online documentation of the java.util.List<E> interface useful; see http://java.sun.com/javase/6/docs/api/java/util/List.html . Next, create a directory named "P2" under your cs12 home directory. Your solution to this assignment should be turned in from that directory by the due date and time. You will use the bundleP2 script to do that; see below . List12.java In this assignment, you will define a class named List12 that implements the java.util.List<E> interface. This implementation must use a singly-linked list with a head pointer (i.e. a pointer, in the List object itself, to the first element of the list or to a dummy header node), but no tail pointer (i.e. no pointer in the List object itself to the last element of the list), and will not extend any abstract class. That is, the class definition will begin: public class List12<E> implements java.util.List<E> { The List<E> interface in the java.util package requires 25 different public instance methods. However, for this assignment you only need to implement these 13 methods:
Background image of page 1

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

View Full Document Right Arrow Icon
11/7/11 5:28 PM P2 README Page 2 of 7 http://ieng6.ucsd.edu/~cs12f/Assignments/P2/README.html public boolean add(E o); public void add(int index, E element); public void clear(); public boolean contains(Object o); public boolean equals(Object o); public E get(int index); public int hashCode(); public int indexOf(Object o); public boolean isEmpty(); public Iterator<E> iterator(); public boolean remove(Object o); public E set(int index, E element); public int size(); All methods of the List<E> interface will need to have definitions in your List12 class in order for it to
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 7

P2 README - P2 README 5:28 PM Programming assignment#2 CSE...

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

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