My Latest Java Project

Rarity

Onyx user!
Reputation
0
Just had finished my latest java project and am pretty proud of it, it mutha f'n graphs shit!

Anyways... I've put so much work into this after finally working out how to even have a y = statement, to having the friken slope be negative, I've had so many problems, but I have finally made it so its done.

Unfortunately there is one problem tho with the code, it doesn't print the origin correctly, however everything else I believe is flawless :D

This java program uses the gridworld.jar extension, this is a project for a class, therefore, that is the reason why I chose such a stupid and useless thing to create.


Soo... Here's the code:

Code1:
http://pastebin.com/dBZYXsLD

Code2:
http://pastebin.com/iWUFFDB9

Code3: (Client)
http://pastebin.com/tWRe14m6


Soo yea, tell me what you think guys :p

Worked really hard on this stuff.

Some results:

Settings for all of the graphs shown:

Equation line = new Equation(2, 2, 1, "Line");
Equation parabola = new Equation(1, 0, 0, 1, "Parabola");
Equation cubic = new Equation(1, 0, 0, 0, .75, "Cubic");
Equation exponential = new Equation(1, -2, 0, 1, "Exponential");

Pics:

Line:
lineresult.png


Parabola:
parabolaresult.png


Cubic:
cubicresult.png


Exponential:
exponentialresult.png


If you have any questions or ideas on what to implicate into this, please feel free and post below, post as well on how you think it came out, can't wait to find out what u guys think :D
 
In your constructor for your Equation, instead of having a type as a string, create an Enum of the types so you know what is supported.
 
Chewbaka said:
In your constructor for your Equation, instead of having a type as a string, create an Enum of the types so you know what is supported.

So change type to int, then have line be like 1, parabola be like 2, etc. then request user input for each corresponding piece of information required for that type of graph?

Not sure what you're saying, plz give example, that would help.
 
K, I see, I think its fine the way it is tho already.
 
Back
Top