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):

665_area.png

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
What are program visible and invisible resisters? A4) Program visible is those registers that can be programmed by the users, or which are customizable, whereas Program invisible

HOW CAN I DESIGN A MOBILE WEB BROWSER LIKE OPERA MINI. USING VISUAL BASIC? HELP ME.

Is it possible to get an assignment done within 2 hours

Object-oriented languages Languages that support OOP features can be classified into the following two categories: 1.    Object-based programming languages, and 2.      O

You have been asked to set up a project plan for developing a mobile phone application for London Olympics. Major tasks include conducting some research into different mobile ph

Board Coloring Problem Description In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color.

(a) Write a procedure called (lookup n t). This procedure has 2 arguments: n is the value being looked up, t is the AVL tree. The subtree with n as its root is returned (or '() if

For the following Code answer the following questions-: .STACK 100H .DATA COUNT DB 10 TOTAL DW 4126H .CODE MAIN PROC MOV BX, 3F20H MOV AL, BL MOV BL, COUNT MOV

Your task for this project is to develop a system that would provide the following features: 1. Register new student 2. Drop student from university 3. Add a course and gr

BACKGROUND: This assignment illustrates the power of mobile applications. OBJECTIVES: 1. Mobile applications DESCRIBED TASK: This is a single part assignment.