Diameter - Corresponding Direction - Intersection - Coding - Java - Computer Science Assessment Answer

Download Solution Order New Solution
Assessment Task:
Diameter - Corresponding Direction - Intersection - Coding - Java - Computer Science Assessment Answer 

 

For a pass mark, there must be a display window of size (600, 360) containing a grid with the same number of columns and rows (10 in the video). Your program should work correctly with a different size and/or number of partitions. When you click anywhere on the display window, circle of diameter 10 (henceforth called a node) should be displayed at that point. Nodes from previous clicks should stay on the screen and there should be lines that join each node with the next one (and the last is joined to the first node). There should be no other lines besides these lines (and the grid lines of course).


For example, if the sequence of clicks is:
Time x: (200, 400)
Time x + 20: (300, 300)
Time x + 70: (60, 100)
There should be nodes drawn at the three points and lines from (200, 400) to (300, 300); (300, 300) to (60, 100); and (60, 100) to (200, 400).
IMPORTANT: You may assume that the maximum number of nodes is 100.
The most useful material for this part is compound data, in particular, arrays - and loops.
 

TASK 1
When an arrow key is pressed, all nodes must move up by 1 unit grid cell distance in corresponding direction.
Let's say the display window is of size (700, 500) such that each column is 35 pixels wide and each row is 25 pixels high.
Let's say the two nodes so far are at (240, 65) and (124, 75)
If the UP key is pressed, the two nodes should move to (240, 40) and (124, 50).
If the DOWN key is pressed (instead of UP key), the two nodes should move to (240, 90) and (124, 100).
If the LEFT key is pressed (instead of UP key), the two nodes should move to (205, 65) and (89, 75).
If the RIGHT key is pressed (instead of UP key), the two nodes should move to (275, 65) and (159, 75).
 

TASK 2
When you click at any location, the node should be generated at the closest grid intersection point.
The most useful material for this part is compound data.
Distinction Mark For each node, calculate the sum of distances of that node from every other node.

  • The node that has the lowest cumulative distance should be coloured red.
  • The node that has the highest cumulative distance should be coloured blue.
  • The most useful material for this part is compound data and functions.

 

You can pick-up a node (using mousePressed), drag it and drop it (using mouseReleased) to another point. The node must be dropped at the grid intersection point closest to the where the mouse is released. Going above-and-beyond

 

This Computer Science Assessment has been solved by our Computer Science experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

 

 

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.