File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes  Default  how i can do this in java main and class point  Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark " Default  how i can do this in java main and class point  " Watch " Default  how i can do this in java main and class point  " New topic
Author

Default how i can do this in java main and class point

ssssami ssssamy
Greenhorn

Joined: Sep 23, 2010
Posts: 1
write a class named Point that include two integer fields x and y and the following methods...
1. a constructor with no parameters that set both x=y=0
2. a constructor with one parameter a that sets x=y=a
3. a constructor with two parameters a,b that sets x=a and y=b
4. two get methods to return x and y
5. two set methods to set a new values to x and y
6. getLocation method which return a string of the location of the point

after that build a main method in which great three points from the three different constructors and print out its x-y values and location


please any one help me i need this program use netbeans
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1407

Help? Sure, what have you come up with so far?


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And welcome to JavaRanch!

We're more than happy to help, but we ask that people ShowSomeEffort first, particularly when it's an assignment. Thanks!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

""ssssami ssssamy",", please check your private messages for an important administrative matter. Thanks.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Already answered in cross-post: http://www.java-forums.org/new-java/32784-how-i-can-do-java-main-class-point.html

OP, please read: BeForthrightWhenCrossPostingToOtherSites in the FAQ's.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Default how i can do this in java main and class point
 
Similar Threads
how can 300 be the answer
June Newsletter Puzzle
HELP
Why final constants won't take the default values?
My very first assignment in Java, did I do ok ?