Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

Help needed!

Thread view: 
danny.p-87@hotmail.com - 01 Mar 2007 12:57 GMT
Hi basically im building a program for universtity and i am still very
rusty when it comes to programming using java, ive been ok up to now
but this exercise i need assistance. I have basically got to work out
the length of the longest side of a triangle when given the other two
shorter sides measurements. Then the program must also workout the
area of the triangle. Can anyone help?

The results from once i ahve compiled and ran the program in command
prompt is suposed to look like this....

***TRIANGLE***

Side A = 3.00 cms
Side B = 4.00 cms
Side C = 5.00 cms
Area = 6.00 sq cms

Please any assistance would be brilliant thanks.
Gordon Beaton - 01 Mar 2007 13:24 GMT
> The results from once i ahve compiled and ran the program in command
> prompt is suposed to look like this....
[quoted text clipped - 7 lines]
>
> Please any assistance would be brilliant thanks.

Your program appears to work just fine. Apparently you have no
problems implementing the Pythagorean theorem.

/gordon

Signature

[ don't email me support questions or followups ]
g o r d o n  +  n e w s  @  b a l d e r 1 3 . s e

Patricia Shanahan - 01 Mar 2007 15:16 GMT
> Hi basically im building a program for universtity and i am still very
> rusty when it comes to programming using java, ive been ok up to now
[quoted text clipped - 14 lines]
>
> Please any assistance would be brilliant thanks.

You need three facts, such as two lengths and the angle between those
sides, to define a triangle.

The example is a right angled triangle, and the problem is much simpler
(Pythagoras' theorem vs. general trigonometry) if you are allowed to
assume right angled.

For general advice on getting started see
http://home.earthlink.net/~patricia_shanahan/beginner.html

For more specific advice, you will need to give more information about
what you have done so far and where you are stuck. For example, can you
read in the two shorter lengths and produce the first two lines of output.

Patricia
murari garg - 04 Mar 2007 08:38 GMT
On Mar 1, 5:57 pm, danny.p...@hotmail.com wrote:
> Hi basically im building a program for universtity and i am still very
> rusty when it comes to programming using java, ive been ok up to now
[quoted text clipped - 14 lines]
>
> Please any assistance would be brilliant thanks.

i think you have not specify your problem correctly.
two condition arise.

1. if you triangle is right angle trianle then it very simple
programme.
you can use pythgorus theorem to know length of third side.
and for area you can use this formul
(1/2)*a*b
where a , b are side having angle in between 90.

2. if triangle is not right angle trieanglr then one more parameter
must be given that is the angle b/w the side.
so you check it out if you find that you have forgotten to write
something and it should be corrected then mail me . i will going to
write java prg for it and mail to you.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.