The getx and gety methods will return the value of these instance variables. The setx and sety methods will set the instance variables. The toString method will produce a String (x,y), eg "(0.0,0.0)". The equals method will check for equality of two Points. Because x and y are doubles, Equals compares x and p.x by checking whether the absolute difference of the two is less than a provided epsilon value, and does the same for y and p.y. The euclidDistance method computes the Euclidian distance between this and another point: the square root of the sum of (x - p.x) squared and (y - p.y) squared.
Your testing should be be implemented in the main program and should exercise all the methods of Point - especially the corner cases. When we run the grading program, we will be doing exactly that.
Your testing should be be implemented in the main program and should exercise all the methods of Cloud - especially the corner cases. When we run the grading program, we will be doing exactly that.
Here all you need to do is implement the readPoints method, that given a Scanner, first reads n the number of points, the creates a Cloud of appropriate maxSize, then reads n points and adds these to the Cloud. Example File You can use the debug flag to have conditional debugging code, which should have no effect (produce no output) when debug is false.
Your testing here should exercise the entire system.
Once you are satisfied that Point is rock solid, start testing Cloud using your test cases. Again, do NOT move on to Assign4 until you are satisfied Cloud is rock solid. Be SURE your test cases exercise all the methods of Cloud - especially the corner cases. Take the time to put some thought into what those corner cases are. You can be sure that OUR grading test cases will do so.
Testing of Assign4 should encompass the entire system. What does that mean? How should you test the entire system? Again, thought first, then coding.
The debug flag can help you to put debugging print statements in your code. You must be able to turn debugging off by setting debug to false. Make sure you have tested your programs using javac and java on a department Linux machine.
Programming assignments will be submitted using RamCT. You can submit the assignment by selecting Assignments in the Course Menu and selecting the appropriate assignment within the Assignments section. Once you have selected the correct assignment, you should attach all files indicated by the directions of the assignment and submit the assignment for grading.
After you have submitted the assignment, be sure to verify that the assignment was submitted correctly by clicking on the submitted tab under Assignments and verifying that the files that were submitted are correct. Attaching incorrect files is one of the most common problems . it is the responsibility of the student to ensure that the correct files were submitted for the assignment.
Once an assignment has been submitted, you can unsubmit the assignment by locating the assignment under the submitted tab, clicking on the pull-down menu associated with the assignment and selecting the Take back assignment to Inbox. This will allow you to modify the attached files and resubmit the assignment.
BE SURE to submit the modified assignment when you are finished.