Program to calculate the triangle area, Programming Languages

Write a program that will allow the user to input the corners of a triangle. The program will draw small yellow circles for each input point, then draw the triangle and calculate the perimeter and area of the triangle. The program will also draw the "mirror image" of the triangle, formed by swapping the x and y coordinates of each point. This is sometimes called the "reflection" of an object.

These actions will then be repeated 4 more times for triangles in different colors.

The equation for the perimeter is length of each of the three sides added together. Use the distance formula from Program 1 (it was used for finding the radius there).

The area of a triangle can be calculated using these equations (a, b and c are the lengths of the three sides of the triangle):


The program should report the perimeter and area of each triangle and its reflection. It should also keep a total of each of those 2 measures and report the total when the program is about to end. The totals should include all triangles, including reflections. Note that the output samples also show a counter "Triangle 1", "Triangle 2", etc.

The list of colors it should use for triangles is ["red", "blue", "green", "pink", "black"].

Posted Date: 3/22/2013 3:38:45 AM | Location : United States

Related Discussions:- Program to calculate the triangle area, Assignment Help, Ask Question on Program to calculate the triangle area, Get Answer, Expert's Help, Program to calculate the triangle area Discussions

Write discussion on Program to calculate the triangle area
Your posts are moderated
Related Questions
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Dynamic Binding: - Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding (late binding) means that the code associa

I''m studying electrical engineering, and this semester im taking course that called Computer Design. in this course they need me to a final project about any thing we took during

Develop (i) a context diagram and (ii) a use case diagram to model the following functionalities of NetFlix. Netflix is an online video/DVD renting company. A customer desiring

Question: (i) All Security authentication mechanism that run on the TRU64 Unix Operating system run under the Security Integration Architecture (SIA ) layer. Explain with di


.NET class library .NET structure comes with just one category selection. And that all developers need to learn!! Whether they create the value in C# or VB.NET or J#, it doesn't

This is the programming language of the Web. It is mainly used for validating forms. JavaScript & Java can be associated to each other. There exist several other differences betwee

How and where to start to develop a preprocessor for java

Question 1- In engineering applications it is often necessary to fit a straight line to a set of N points with known coordinates (xi, yi), where i indexes the points (N in total).