Reference no: EM132750050
MITS4002 Object-Oriented Software Development - Victorian Institute of Technology
OBJECT-ORIENTED SOFTWARE DEVELOPMENT
Dragging Points on a Circle
Learning outcome 1: Demonstrate understanding of classes, constructors, objects, data types and instantiation; Convert data types using wrapper methods and objects.
Learning outcome 2: Independently analyse customer requirements and design object-oriented programs using scope, inheritance, and other design techniques; Create classes and objects that access variables and modifier keywords. Develop methods using parameters and return values.
Learning outcome 3: Demonstrate adaptability in building control and loop structures in an object-oriented environment; Demonstrate use of user defined data structures and array manipulation.
Learning outcome 4: Create object hierarchies using additional utility methods, application programming interfaces (API) and interfaces, in conjunction with existing classes and objects.
Learning outcome 5: Demonstrate usage of collection to access data structures effectively and compose full-fledged object-oriented applications.
Learning outcome 6: Extend the on object-oriented concepts and design patterns introduced in lectures to carry out further research on a chosen object-oriented design pattern or emerging recent programming languages.
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.
Your code:
1. Can your program display a circle in the centre of the frame, if not, why?
2. Can your program display three points on the circle, if not, why?
3. Can your program draw a triangle using these three points, if not, why?
4. Can your program compute the angles in the triangle, if not, why?
5. Can your program display the angles in the triangle, if not, why?
6. Note that three points are three small circles. Can your program detect which small circle is pressed by the mouse, if not, why?
7. Can your program drag a small circle that has been pressed, if not, why?
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.)
Attachment:- Object-Oriented Software Development.rar