Question: The program must be done using Java Object Oriented and the program must include the following.. 1.Mouse adapter being used for dragging points 2.DrawTriangle class

The program must be done using Java Object Oriented and the program must include the following..

1.Mouse adapter being used for dragging points

2.DrawTriangle class was created with appropriate parameters and used; The use of inheritance from JPanel

3.Code with comments

The program must be done using Java Object Oriented and the program

Problem Description Draw a circle with three random points on the circle. Connect the points to form a triangle. Display the angles in the triangle. Use the mouse to drag a point along the perimeter of the circle. As you drag it the triangle and angles are redisplayed dynamically as shown in Figure 1. You will need to create a DrawTriangle class (not main class) which takes some appropriate parameters in one of its methods to draw the triangle within the circle as shown in Figure 1. Your will not get full marks if Draw.Triangle class is not created nor used as it as part of Object-Oriented Software Development. Figure 1: Sample output Here is the formula to compute angles: 22. y2 A = acos((a -bb-cc) / (-2* bc)) B = acos(( bo-aa-cc) / (-2* ac) C = acos(( cc-bb-a* a)/(- 2ab)) C c 23.98 21. y1 Note, acos(x) is cos(x) Problem Description Draw a circle with three random points on the circle. Connect the points to form a triangle. Display the angles in the triangle. Use the mouse to drag a point along the perimeter of the circle. As you drag it the triangle and angles are redisplayed dynamically as shown in Figure 1. You will need to create a DrawTriangle class (not main class) which takes some appropriate parameters in one of its methods to draw the triangle within the circle as shown in Figure 1. Your will not get full marks if Draw.Triangle class is not created nor used as it as part of Object-Oriented Software Development. Figure 1: Sample output Here is the formula to compute angles: 22. y2 A = acos((a -bb-cc) / (-2* bc)) B = acos(( bo-aa-cc) / (-2* ac) C = acos(( cc-bb-a* a)/(- 2ab)) C c 23.98 21. y1 Note, acos(x) is cos(x)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!