{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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 )
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern