AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > Support > Tech Support


Thread Tools
Old 2012-09-12, 05:46   Link #1
Witch of Uncertainty
Senior Member
Join Date: Jun 2010
Java trouble

Hello again. I've been asking about Java 2 times before, here, and once agian, I am stuck on what to do.

Our task is to draw a circle using the parametric equation, and I don't even know where to begin on this task. Could anyone tell me? :d
Witch of Uncertainty is offline   Reply With Quote
Old 2012-09-12, 11:41   Link #2
Senior Member
Join Date: Oct 2007
Location: Philippines
Age: 41
As it's obviously a question in Java programming, have you asked the same question at Stack Overflow? Also, did you check your programming references (assuming that you have a book or two on Java)?
sa547 is offline   Reply With Quote
Old 2012-09-12, 16:15   Link #3
Witch of Uncertainty
Senior Member
Join Date: Jun 2010
Oh my god. I didn't even consider that. <_>
Thanks for reminding me lol, I'll look it through.
Witch of Uncertainty is offline   Reply With Quote
Old 2012-09-14, 15:31   Link #4
Flying Dagger
Join Date: Dec 2003
Your assignment is probably intended for you to familiarize on how to do some UI under awt/swing.

You probably want to find a range to display, then calculate the value for every pixel along the x axis (remember pixel, not along a discrete integer scale). Draw a line from (x,y) to (x,y) in order to make a dot appear (unless they added more to the API, I don't recall being able to paint a single point).

The most difficult part of the assignment is probabl
1) figuring out how to draw things (check out the graphics2d examples in something like this:

2) Figuring out which points to display.

3) if you have to, parse out the polynomial input from a string.
Flying Dagger is offline   Reply With Quote
Old 2012-09-14, 16:59   Link #5
Asuki-tan Kairin ↓
Join Date: Feb 2004
Location: Fürth (GER)
Age: 37
I assume you had some basic introduction to software development...

How to plan and design and architecture (well, thinking about architecture for something that trivial is certainly not required )

Anyway. You start with the assessment of what tools are available to you. The capabilities of the framework and so on.

Then you have two possibilities

1) You go for a quick and dirty hack that will satisfy the requirements.

2) Or you really try to write clean code, which will require refactoring and the abiding of several coding rules and best practices.

Since you are not too familiar with software development yet, you will certainly take the route 1).

Actually since this task is so common that even I remember it being part of my assignments in my studies 7 years ago, you can just copy and paste a nice example from the many sites that feature it (for example):

Then you need to manipulate uh customize it a little bit (use your own formatting and names). And you might need to add an algorithm... voila you got your assignment done but learned little in the process (which is the point of such assignments - I am serious btw.)

I dont know if you will need it, but the best way to learn, read, understand and write code is by trying to read and understand lots and lots of cleanly written code (cleanly because you don't want to absorb nasty coding habits right at the beginning).

And then you go and try to realize a little project of your own. Your affinity to the project will give the neccessary patience to endure the many hurdles you will face. But for practicing coding it will most perfect. After several little projects you can start to refine your coding (use of patterns, coding rules, best practices... ).
Folding@Home, Team Animesuki
Jinto is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 10:48.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
We use Silk.