Criteria (used as a guide only) Mouse adapter being used for dragging points DrawTriangle class was created with appropriate parameters and used; The use of inheritance from JPanel Screenshots of...
































Criteria (used as a guide only)
Mouse adapter being used for dragging points
DrawTriangle class was created with appropriate parameters and used; The use of inheritance from JPanel
Screenshots of evidence of trial runs & output

All questions answered
Source codes and NetBeans project folder
Code indentation
Code with comments
All source codes and screenshots of application in one Word document
Table of Contents of the document.



MITS4002 Major Assignment Criteria (used as a guide only) Level of Performance 0 1 2 3 4 5 Mouse adapter being used for dragging points             DrawTriangle class was created with appropriate parameters and used; The use of inheritance from JPanel             Screenshots of evidence of trial runs & output             All questions answered             Source codes and NetBeans project folder             Code indentation             Code with comments All source codes and screenshots of application in one Word document Table of Contents of the document.             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 DrawTriangle 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: Note, acos(x) is cos-1(x) What to submit: Submit the 5 screenshots of the output along with a check list of the following steps using this word document and full NetBeans Project folder. Note, your project should be developed using NetBeans otherwise your work will not be marked. Copy and paste your code into this word document too. Put this word document in your NetBeans project folder and then zip before submission. Your code: 1. Can your program display a circle in the centre of the frame, if not, why? Write your answer here: 2. Can your program display three points on the circle, if not, why? Write your answer here: 3. Can your program draw a triangle using these three points, if not, why? Write your answer here: 4. Can your program compute the angles in the triangle, if not, why? Write your answer here: 5. Can your program display the angles in the triangle, if not, why? Write your answer here: 6. Note that three points are three small circles. Can your program detect which small circle is pressed by the mouse, if not, why? Write your answer here: 7. Can your program drag a small circle that has been pressed, if not, why? Write your answer here: 8. Can your program drag a small circle along the perimeter of the circle, if not, why? (Hint: Ignore the mouse drag if it is not along the perimeter of the circle.) Write your answer here: 2 65 55 60 65 55 60 A B C a b c A = acos((a * a - b * b - c * c) / (-2 * b * c)) B = acos((b * b - a * a - c * c) / (-2 * a * c)) C = acos((c * c - b * b - a * a) / (-2 * a * b)) x1, y1 x2, y2 x3, y3 A B C a b c A = acos((a * a - b * b - c * c) / (-2 * b * c)) B = acos((b * b - a * a - c * c) / (-2 * a * c)) C = acos((c * c - b * b - a * a) / (-2 * a * b)) x1, y1 x2, y2 x3, y3
May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here