This website is preserved for historical and scholarly reference and is no longer actively maintained.
                         CpSc 210, Section 2
                             Assignment 2 
                            February 5, 2000 


Due: Tuesday, February 13  by 11:59 p.m.

Assignment: Complete a method which computes the distance between two points (30 pts.)  The method is given by: 

     public static double distance ( Pt p1, Pt p2 )
     // pre:  p1 is not null and p2 is not null
     // post:  the absolute distance between p1 and p2 is returned

Create a directory, A2, which contains a java file, Asg2, containing the
distance method and a main method which tests the distance method.  Thus,

     public class Asg2
     {
        public static double distance ( Pt p1, Pt p2 )
        {
        ...
        }

        public static void main ( String [] args )
        {
        ...
        }
     }

Late penalties: 20 points per partial day late.  That is, programs
	turned in after midnight Tuesday and before midnight Wednesday
	can receive a maximum of 10 pts.

Total point value of assignment:  30 points

Late submissions not accepted after: Wednesday, February 14 at 11:59 p.m.

This assignment is to be done INDIVIDUALLY.



Other requirements:

	Follow the style standards to be found on your instructor's
	web page for CPSC 210.

	Submit your program using the handin command.  There is a link to
	the handin description on your lab page (www.cs.clemson.edu/~lab210).


Grading rubric:

	In the opinion of the instructor the program is an honest attempt
		to complete the assignment as described  5 pts.

	If the above requirement is not met, no further points will be awarded.

	Style standards, including:
	    Name, CPSC 210, etc., printed to screen by program 5 (3 pts.)
	    Name, CPSC 210, and description of problem at beginning of code
 	        in class Asg2.  (3 pts.)
	    Indent exactly 3 spaces to show logic.  (1 pt. per occurrence)
	not to exceed 5 pts. deduction

	The program compiles without error.  (5 pts.)

	Quality and results of your test driver (main method).  (5 pts.)  
	distance method works correctly with instructor's test program (10 pts.)