Assistance with modifying a Test program

The "Point" class has two fields (x and y), one constructor, and four methods(getx(), getY(), equals(), and toString()). I also have a separate "TestPoint" class that does have main() method after the Point class.

I need to modify the "TEST POINT" program below so that it defines q to have the same coordinates as p. Then, check that [url removed, login to view](p) is true and that q == p is false, thereby verifying that two distinct objects can be separate but equal.

public class Point {

private int x, y; // the point's coordinates

public Point(int x, int y){

this.x = x;

this.y = y;


public boolean equals(Point p){

return (x == p.x && y == p.y);


public int getX(){

return x;


public int getY(){

return y;


public String toString(){

return new String("(" + x + ", " + y + ")");



public class TestPoint {

public static void main(String[] args) {

Point p = new Point(2, -3);

[url removed, login to view]("p: " + p);

[url removed, login to view]("[url removed, login to view](): " + [url removed, login to view]());

[url removed, login to view]("[url removed, login to view](): " + [url removed, login to view]());

Point q = new Point(7,4);

[url removed, login to view]("q: " + q);

[url removed, login to view]("[url removed, login to view](p): " + [url removed, login to view](p));

[url removed, login to view]("[url removed, login to view](q): " + [url removed, login to view](q));



Keahlian Java, Perancangan Perangkat Lunak

Lihat lebih lanjut: online ustaad how to pass odesk test us basic skills test, district & session test data entry operator test format, i need some one to enter some data for me the documents are provided separately the final format of the entered data should be c, i need an editor for a book i am in the process of writing, i need a logo for my internet radio station called the crack family radio, i need a contract manufacturer for socks and hosiery in the united states, i have an existing site made with net need someone to implement html that is ready on the new site, unix test question multiple choice test, virtuemart modify choose shipping method page, responsible creating set data fully test program submit assignmenttest data include test data years payment , drupal easy website build, alibaba website build, handicapping website build service design, test application black box test documentation, joomla commerce website build, full website build, copy exitsing website build site, drag drop website build bracelet, teacher rating website build, bid website build, common questions freelance website build, website build bid, poker website build

Tentang Pemberi kerja:
( 5 ulasan ) United States

ID Proyek: #11720663

Diberikan kepada:


We are team of excellent developers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. We have read your description for project Lagi

$30 USD dalam 1 hari
(21 Ulasan)

3 freelancer menawar dengan rata-rata $27 untuk pekerjaan ini


Hello, I am expert in java/c/c++ and i can deliver your task in the least time and least payments. The code will be well commented and well formatted for better understanding. I believe in long term relations so firs Lagi

$25 USD dalam 1 hari
(40 Ulasan)
$56 USD dalam 1 hari
(5 Ulasan)

The project makes sense, I should be able to turn it around in very short order. Question for you - have you heard of the tool "junit" for unit testing? It's designed for tasks like these where you need to execute te Lagi

$25 USD dalam 1 hari
(1 Ulasan)