-
JAVA ----- NEED HELP!!
Some specific problems I am having trouble with are:
1.) Define a method Hypotenuse that calculates the hypotenuse of a right
triangle when 2 sides are given. The method should take two arguments of
type Double and return the hypotenuse as Double. Incorporate this method
into an applet that reads integer values for side1 and side2 from JTextFields
and performs the calculation with the hypotenuse method.
If you can help me out with this I would greatly appreciate it. Thanks--
Please email me at jbruschi@ichtheos.com ...
Thanks
-
Re: JAVA ----- NEED HELP!!
What is your specific problem...this sounds more along the lines of, "Do
this for me".
"Jon" <jbruschi@ichtheos.com> wrote in message
news:3a958915$1@news.devx.com...
>
> Some specific problems I am having trouble with are:
>
> 1.) Define a method Hypotenuse that calculates the hypotenuse of a right
> triangle when 2 sides are given. The method should take two arguments of
> type Double and return the hypotenuse as Double. Incorporate this method
> into an applet that reads integer values for side1 and side2 from
JTextFields
> and performs the calculation with the hypotenuse method.
>
> If you can help me out with this I would greatly appreciate it. Thanks--
>
> Please email me at jbruschi@ichtheos.com ...
>
> Thanks
-
Re: JAVA ----- NEED HELP!!
Well.. my problem is that I need to see examples before I can write the program...
I am a novice, and no examples like this are in the book---
<tony> wrote:
>What is your specific problem...this sounds more along the lines of, "Do
>this for me".
>
>
>"Jon" <jbruschi@ichtheos.com> wrote in message
>news:3a958915$1@news.devx.com...
>>
>> Some specific problems I am having trouble with are:
>>
>> 1.) Define a method Hypotenuse that calculates the hypotenuse of a right
>> triangle when 2 sides are given. The method should take two arguments
of
>> type Double and return the hypotenuse as Double. Incorporate this method
>> into an applet that reads integer values for side1 and side2 from
>JTextFields
>> and performs the calculation with the hypotenuse method.
>>
>> If you can help me out with this I would greatly appreciate it. Thanks--
>>
>> Please email me at jbruschi@ichtheos.com ...
>>
>> Thanks
>
>
-
Re: JAVA ----- NEED HELP!!
There are several sites out there with examples. Just go to www.google.com
and do a search there. A couple of sites that may help are:
http://java.sun.com/docs/books/tutorial/index.html and http://www.jars.com
A general function works something like this:
access_modifier return_type function_name (parameter_type parameter_name,
parameter_type parameter_name, n...) {
return value;
}
An example might be:
public int Addition (int v1, int v2) {
int sum;
sum = v1 + v2;
return sum;
}
Once you have a more specific question then I will do my best to help.
Good Luck!
"Jon" <jbruschi@ichtheos.com> wrote in message
news:3a95ddc2$1@news.devx.com...
>
> Well.. my problem is that I need to see examples before I can write the
program...
> I am a novice, and no examples like this are in the book---
>
>
>
> <tony> wrote:
> >What is your specific problem...this sounds more along the lines of, "Do
> >this for me".
> >
> >
> >"Jon" <jbruschi@ichtheos.com> wrote in message
> >news:3a958915$1@news.devx.com...
> >>
> >> Some specific problems I am having trouble with are:
> >>
> >> 1.) Define a method Hypotenuse that calculates the hypotenuse of a
right
> >> triangle when 2 sides are given. The method should take two arguments
> of
> >> type Double and return the hypotenuse as Double. Incorporate this
method
> >> into an applet that reads integer values for side1 and side2 from
> >JTextFields
> >> and performs the calculation with the hypotenuse method.
> >>
> >> If you can help me out with this I would greatly appreciate it.
Thanks--
> >>
> >> Please email me at jbruschi@ichtheos.com ...
> >>
> >> Thanks
> >
> >
>
-
Re: JAVA ----- NEED HELP!!
"Jon" <jbruschi@ichtheos.com> wrote:
>
>Some specific problems I am having trouble with are:
>
>1.) Define a method Hypotenuse that calculates the hypotenuse of a right
>triangle when 2 sides are given. The method should take two arguments of
>type Double and return the hypotenuse as Double. Incorporate this method
>into an applet that reads integer values for side1 and side2 from JTextFields
>and performs the calculation with the hypotenuse method.
>
>If you can help me out with this I would greatly appreciate it. Thanks--
>
>Please email me at jbruschi@ichtheos.com ...
>
>Thanks
If you are using the Dietel book, then the program you need to use is the
second one in the second edition book. 90% of the work is already done for
you. It seems like agony when you first learn it but that's why he gave
you that assignment and not something easier. I just learned java this trimester
at school and let me reassure you, it takes five minutes to do this problem
once you are used to java. Actually, your problem is not completely presented.
Return the result to what; obviously he means return it to the status bar
but this is supposed to be stated in the problem. In reality, the result
could be returned to another textbox or a sequential file or another applet,
but you aren't there yet.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks