{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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 )

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.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern