hw9-PointList

# hw9-PointList - Assignment #9 CSc 127a Fall 2007 25 points...

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

Assignment #9 – CSc 127a – Fall 2007 – 25 points Due: Thursday, 11/08/2007 no later than 10 pm by Web turnin at https://lectura.cs.arizona.edu/turnin/ - follow the directions To do and turn in: Solve the problem described below and name your file PointList.java Make sure you have the appropriate comment block at the top of your file, as well as other commenting in your program, and good style conforming to Java conventions. Purpose : To give you experience in solving problems with partially filled 1-D arrays and working with methods. Problem: Design and implement a class called PointList (stored in a file named PointList.java ). This class is used to store a list of points (x and y coordinates) adjacently in an array, therefore your class will use an array of ints. Every two spots in the array will hold an x and a y value (x is always first, y is always second), representing a point in the Cartesian Coordinate System. No duplicate points are allowed . The first point in the list is referred to as Point 0 and is in positions 0 (x 0 ) and 1 (y 0 ). Here is a visual representation of a sample list of points: 10 (x 0 ) -3 (y 0 ) 6 (x 1 ) 4 (y 1 ) 9 (x 2 ) 9(y 2 ) 10 (x 3 ) 8 (y 3 ) IMPORTANT

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

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

## This note was uploaded on 04/02/2008 for the course CSC 127a taught by Professor Suzanne during the Spring '07 term at Arizona.

### Page1 / 2

hw9-PointList - Assignment #9 CSc 127a Fall 2007 25 points...

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

View Full Document
Ask a homework question - tutors are online