/    Sign up×
Community /Pin to ProfileBookmark

I dont understand this assignment at all, and some help would be much appreciated.

Write an applet that lets the user draw quadrilaterals.
• As the user clicks a sequence of 4 points, count them and store their x- and y-coordinates in two arrays.
• These points will be the vertices of the polygon.
• When the user clicks the 4th time, draw the complete polygon.
• Draw it with a red interior and a black border.
• The user should then be able to start drawing a new polygon.
• Include a button the user can click to clear the applet or code so they can shift-click to clear it.
Your programs must:
 Be an applet
 Use classes and encapsulation to make your code more useful, readable, and modifyable.
 Implement at least one EventListener

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@xelawhoApr 28.2012 — I suspect that your program must also:

 Be written in java (not the subject of this forum)

but if I'm wrong, it shouldn't be too hard...
Copy linkTweet thisAlerts:
@JmastersamauthorApr 28.2012 — Sorry if this is the wrong forum just looking for help. I'm using BlueJ, and willing to pay 10 bucks for the help (i know it aint much, but its something).
Copy linkTweet thisAlerts:
@xelawhoApr 28.2012 — this is the javascript forum. I'm assuming your class is in java programming - if that's the case you should take your 10 bucks over to the java branch ?
×

Success!

Help @Jmastersam spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...