Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

MITS4002 OBJECT-ORIENTED SOFTWARE DEVELOPMENT Major Assignment Weightage: 25% Dragging Points on a Circle Submission deadline: Friday Lesson 12 5PM Late penalty applies on late submission, 10% per...

1 answer below »

MITS4002

OBJECT-ORIENTED SOFTWARE DEVELOPMENT

Major Assignment

Weightage: 25%

Dragging Points on a Circle

Submission deadline: Friday Lesson 12 5PM

Late penalty applies on late submission, 10% per day would be deducted

0 mark for LATE Submission more than one week

0 mark for DUPLICATED Submission or Shared Work

You will be marked based on your submitted zipped file on Moodle. You are most welcome to check your file with your lab tutor before your submission. No excuse will be accepted due to file corruption, absence from lecture or lab classes where details of lab requirements may be given.

Make sure that you attend Lecture EVERY WEEK as low attendance may result in academic penalty or failure of this unit.

Student full name:

Student ID:

This assessment item relates to the unit learning outcomes as in the unit descriptors.

This checks your understanding about object-oriented software development.

This assessment covers the following LOs.

LO1 Demonstrate understanding of classes, constructors, objects, data types and instantiation; Convert data types using wrapper methods and objects.

LO2 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.

LO3 Demonstrate adaptability in building control and loop structures in an object-oriented environment; Demonstrate use of user defined data structures and array manipulation.

LO4 Create object hierarchies using additional utility methods, application programming interfaces (API) and interfaces, in conjunction with existing classes and objects.

LO5 Demonstrate usage of collection to access data structures effectively and compose full-fledged object-oriented applications.

LO6 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.

Rubrics for MITS4002 Project

Criteria (used as a guide only)

Level of Performance

0

1

2

3

4

5

Mouse adaptor being used

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

Total: /25 marks


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.

Put this word document in your NetBeans project folder and then zip before submission.

  1. Can your program display a circle in the centre of the frame, if not, why?

Write your answer here:

  1. Can your program display three points on the circle, if not, why?

Write your answer here:

  1. Can your program draw a triangle using these three points, if not, why?

Write your answer here:

  1. Can your program compute the angles in the triangle, if not, why?

Write your answer here:

  1. Can your program display the angles in the triangle, if not, why?

Write your answer here:

  1. 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:

  1. Can your program drag a small circle that has been pressed, if not, why?

Write your answer here:

  1. 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:

Answered Same Day May 25, 2021 MITS4002

Solution

Kshitij answered on May 27 2021
152 Votes
Assignment.zip
Assignment
uild.xml

Builds, tests, and runs the project Assignment.


Assignment
uild/classes/.netbeans_automatic_build
Assignment
uild/classes/.netbeans_update_resources
Assignment
uild/classes/assignment/Assignment.class
package assignment;
public synchronized class Assignment {
public void Assignment();
public static void main(String[]);
}
Assignment
uild/classes/assignment/DragTrianglePoints$1.class
package assignment;
synchronized class DragTrianglePoints$1 extends java.awt.event.MouseMotionAdapter {
void DragTrianglePoints$1(DragTrianglePoints);
public void mouseDragged(java.awt.event.MouseEvent);
}
Assignment
uild/classes/assignment/DragTrianglePoints$2.class
package assignment;
final synchronized class DragTrianglePoints$2 implements Runnable {
void DragTrianglePoints$2();
public void run();
}
Assignment
uild/classes/assignment/DragTrianglePoints.class
package assignment;
public synchronized class DragTrianglePoints extends javax.swing.JFrame {
private javax.swing.JPanel bigCircle;
public void DragTrianglePoints();
private void initComponents();
private void bigCircleMouseDragged(java.awt.event.MouseEvent);
public static void main(String[]);
}
Assignment
uild/classes/assignment/DragTrianglePoints.form






















































Assignment
uild/classes/assignment/DrawTriangle.class
package assignment;
synchronized class DrawTriangle extends javax.swing.JPanel {
int r;
int x;
int y;
java.awt.Graphics2D g2d;
SmallCircle[] points;
public void DrawTriangle();
protected void paintComponent(java.awt.Graphics);
}
Assignment
uild/classes/assignment/smallCircle$1.class
package assignment;
synchronized class SmallCircle$1 extends java.awt.event.MouseAdapter {
void SmallCircle$1(SmallCircle);
public void mousePressed(java.awt.event.MouseEvent);
}
Assignment
uild/classes/assignment/smallCircle$2.class
package assignment;
synchronized class SmallCircle$2 extends java.awt.event.MouseAdapter {
void SmallCircle$2(SmallCircle);
public void mouseDragged(java.awt.event.MouseEvent);
}
Assignment
uild/classes/assignment/SmallCircle.class
package assignment;
synchronized class SmallCircle extends javax.swing.JPanel {
public int pno;
public int xloc;
public int yloc;
public int[] getLocOnScreen(int, int);
public void SmallCircle();
protected void paintComponent(java.awt.Graphics);
}
Assignment/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Assignment/nbproject
uild-impl.xml















































































































































































































Must set src.di
Must set test.src.di
Must set build.di
Must set dist.di
Must set build.classes.di
Must set dist.javadoc.di
Must set build.test.classes.di
Must set build.test.results.di
Must set build.classes.excludes
Must set dist.ja




































































































Must set javac.includes
































































































































No tests executed.



























































...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here