Write a graphics program that prompts the user to enter
graphics objects using the mouse or/and the keyboard. Make
the
calculations, output the results and draw the graphics objects. Your
program must be tested with an example given after every task.
The number of your particular task is the value of the
expression
faculty_number%25.
0. Enter a triangle and calculate its area.
(2, 3); (5, 2.5); (1, -1)
1. Enter a convex quadrilateral with vertexes in different quadrants
and calculate its area.
(2, 3); (-5, 2.5); (-1,-1); (2, 3.5)
2. Enter a triangle and calculate its perimeter.
(-2,3); (5,4); (1,0)
3. Enter a triangle and calculate the radius of its circumscribed
circle.
(2,2.1); (-3,2.5); (0,0)
4. Enter a triangle and calculate the radius of its inscribed circle.
(2,2.1); (-3,2.5); (0,0)
5. Enter a triangle and determine the type of the triangle -
acute-angled, obtuse-angled or right-angled.
(0,0); (25,0); (0,50)
6. Enter a triangle and calculate of the bisector length of its
maximal angle.
(3,1); (-1,2.5); (0,0.5)
7. Enter a triangle and calculate the sine of its
maximal angle.
(-2.0,4.0); (-3.0,2.5); (0.0,2.0)
8. Enter a triangle and calculate the cosine of its
minimal angle.
(-2.0,4.0); (-3.0,2.5); (0.0,2.0)
9. Enter a triangle and calculate its perimeter and
calculate its the minimal altitude.
(3,1); (-1,2.5); (0,0.5)
10. Enter a triangle and calculate its perimeter and
calculate its minimal median.
(31,30); (-10,1); (0,55)
11. Enter a triangle and calculate the ratio
of its maximal and minimal sides.
(35,0); (-12,5); (0,0)
13. Enter a triangle and find a point placed inside it.
(3,4); (-3,2.5); (0,-4.2)
14. Enter a triangle and calculate the distance between its
mass center (the center of gravity) and the origin of the coordinate
system.
(3,0); (-1.5,2.5); (0,0)
15. Enter four points and find two of them with the maximal
distance.
(30,10); (-10,0); (20,20); (-10,0)
16. Enter four points and calculate the length of the sum of segment
lines,
connecting these points successively.
(0,0), (0.12, 0.01), (-0.19,0); (0.10,0.15)
17. Enter four points and calculate the sum of the lines length,
connecting each two points.
(0,0), (0.12, 0.01), (-0.19,0); (0.10,0.15)
18. Enter a segment line and check whether it intersects the
coordinate axes.
(-3,4), (4,1)
19. Enter a circle and a segment line. Check whether the line lies
into the circle.
(0.022,0.023), 0.1; (-0.01,0), (0,0)
20. Enter a circle and a segment line. Check whether the circle
intersects the line at only one point.
(0.022,0.023), 0.1; (-0.01,0), (0,0)
21. Enter a circle and a point. Check whether the point lies into
the circle.
(0.2,0.2), 1; (-0.1,0)
22. Enter a circle and a triangle. Check whether the triangle lies
into the circle.
(0.2,0.2), 1; (-0.1,0); (0.01, 0.1); (0.1, -0.1)
23. Enter five points and find a circle containing all these points.
(3,1); (-1,0); (-2,2); (-1,2); (1,-1)
24. Enter two circles and determine whether they intersect or not.
(-2,4), 5; (-3,2), 6