464,692 Members | 1,186 Online
Need help? Post your question and get tips & solutions from a community of 464,692 IT Pros & Developers. It's quick & easy.

# Java beginner needs help

 P: 3 i'm new to java an have an assignment. i need to write a program that will calculate the sides of a triangle using x and y coordinates.also, it should provide the area, perimeter and lengths of the sides of the triangle as well as the angle in degrees. It's a monster to a beginner. we went from "Hello World" to this. please help! mac010904@yahoo.com Jan 26 '07 #1
5 Replies

 10K+ P: 13,262 i'm new to java an have an assignment. i need to write a program that will calculate the sides of a triangle using x and y coordinates.also, it should provide the area, perimeter and lengths of the sides of the triangle as well as the angle in degrees. It's a monster to a beginner. we went from "Hello World" to this. please help! mac010904@yahoo.com Deterimine the following first. What is the input to the program? Three x,y co-orninates? Two co-ordinates and their angle? Any one of the two? Then deterimine what you want as output. This is the process of specifying what the program will do and makes the rest of the program easier to code. Jan 26 '07 #2

 P: 3 The program must prompt for user input of the co-ordinates. how would i prompt for this? would i do one at at time or is there a way to prompt for both? Jan 26 '07 #3

 10K+ P: 13,262 The program must prompt for user input of the co-ordinates. how would i prompt for this? would i do one at at time or is there a way to prompt for both? You can use either way, Java can do both. It's up to you the programmer to decide which way would be easier for the users. Jan 26 '07 #4

 P: 3 could you give an example of what you mean. I can do the rest of the program it's just this part that has me confused. Jan 26 '07 #5

 10K+ P: 13,262 could you give an example of what you mean. I can do the rest of the program it's just this part that has me confused. Have a read about how to use the Scanner. Jan 29 '07 #6