473,385 Members | 1,218 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Java beginner needs help

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 1683
r035198x
13,262 8TB
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
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
r035198x
13,262 8TB
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
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
r035198x
13,262 8TB
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

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Cherrish Vaidiyan | last post by:
Hello Pals, I am very much interested to master java. i know C and C++. I can handle programming to certain level in either language.I beleieve java is the king in OOP. i need to learn it from the...
5
by: Thomas G. Marshall | last post by:
This message is sent to these newsgroups because they are no longer valid: comp.lang.java comp.lang.java.api comp.lang.java.bugs comp.lang.java.misc comp.lang.java.setup comp.lang.java.tech ...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
3
by: Dave128 | last post by:
Let me first start off by saying I am a beginner at Java. I need help on an assignment to produce a loop which I believe for this particular assignment would be the for loop. The output needs to look...
17
by: JD | last post by:
hi, i m new to java, i want to know if there is a good and free Java IDE that i can use that'll help me, i dont care if its complicated , i just want it to be good, i tried netbeans which comes...
6
crystal2005
by: crystal2005 | last post by:
Hello guys, I'm a beginner in Java application programming. I started to write a Java application in which link to MS Access database. I encountered a problem in deletion function. E.g. I would...
29
by: s0suk3 | last post by:
Hello, I was hoping to get some opinions on a subject. I've been programming Python for almost two years now. Recently I learned Perl, but frankly I'm not very comfortable with it. Now I want to...
22
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.