working on a project - creating triangles

14 views
Skip to first unread message

New to Java

unread,
Nov 15, 2011, 5:53:52 PM11/15/11
to The Java Posse
Hey guys,

my first post! Anyway, I'm a CS major and I've been given a project
that requires a target that can be dragged (already created) and in
the center of that target each time the mouse is clicked a set of
points for a line is created, the second click creates the first line,
and the third click creates a triangle from the ends of the first
line.

I am not sure if I should create a vector of lines, or if just a loop
would work. The point of the project is to create a triangle and
calculate the area of the triangle, perimeter of the triangle, how
many triangles you have created, and the average area.

Each triangle needs to have a center referenced in a text box, I'm
also not to positive how to go about this. I've read all the necessary
chapters in the programming textbook but I still can't figure it out.

Thank you in advance for your help!

-new to java

Matthew Farwell

unread,
Nov 16, 2011, 8:14:28 AM11/16/11
to java...@googlegroups.com
Salut,

You may get better answers to this question using http://programmers.stackexchange.com/. But be prepared to ask a good question (http://programmers.stackexchange.com/faq).

This forum is more focused on debating patents and arguments about Scala and all of the other languages on the JVM, along with criticising/defending apple and/or Oracle. :-)

Please note the smiley.

Matthew Farwell.
Reply all
Reply to author
Forward
0 new messages