5 Reasons to Register with Johnny Two Shoes

 

Forgotten Password?

mk0092
1,038
  • 1

mk0092 — 4 Months ago

So Ive been learning Java. Our class has become really boring and easy (I have a 99.83% its so easy) that I decided to do a side project. That project was to build and awesome calculator in pure Java code.

So Ive played with it a little bit, getting it to do te basic stuff in v1 & v2. But Ive done V3 which now includes rounding, which expanded by code from 80 to 776 lines, and really tested my patience.

Now updated to v4. Now at 1422 lines of code.
It will run the following operations:

X to the power of 2
Square root
Absolute value

To run it, download the Calculator.java & Calculator.class file from the 1st link below.

If you have any recommendations, please tell me. Im trying to improve this a much as possible.

Thanks!

Calculator Java Files
Calculator (In .txt format)
1337man
391
  • 1

1337man — 4 Months ago

I read the text form, just to see what it was. It does a nice bit of functions. But I found this:
You fail! Read teh instructions!



It was mean. But here's a challenge: Get it to do the power of 2 for every number.
mk0092
1,038
  • 0

mk0092 — 4 Months ago

That is a very good idea. I'll do powers and square roots next.
1337man
391
  • 0

1337man — 4 Months ago

Wow. Have fun with that. That's a ton more typing for you in your Java class.
n1411
357
  • 0

n1411 — 4 Months ago

you posted this on twitter a while back!
toobatee
298
  • 1

toobatee — 4 Months ago

Woah, thats crazy.
meridimus
1,187
  • 1

meridimus — 4 Months ago

Nice one man!


Now for some OpenGL!
mk0092
1,038
  • 0

mk0092 — 4 Months ago

Thanks. Its just fun to screw around with stuff and see what happens.

Ive updated it with powers & square roots, expanding it at the same time to 1203 lines of madness. The one that is shown is 776. Ill upload it as soon as Im done with Dm.
SteveTheBad
508
  • 0

SteveTheBad — 4 Months ago

You are your DM...
1337man
391
  • 0

1337man — 4 Months ago

Whoa! Holy crap... That's crazy mad. -
mk0092
1,038
  • 0

mk0092 — 4 Months ago

Updated. Every update I do seems to add about 100 lines of code, basically because one method (selectRound) is basically four methods in one.
SteveTheBad
508
  • 0

SteveTheBad — 4 Months ago

What... What does this do?
mk0092
1,038
  • 0

mk0092 — 4 Months ago

Calculate. Hense the name calculator.
SteveTheBad
508
  • 0

SteveTheBad — 4 Months ago

Calculate what? The answer to the universe?
mk0092
1,038
  • 0

mk0092 — 4 Months ago

Fail. Actually try running it.

And its also to steal Topic #2222. which i add to my topic collection that includes topic #1337.

Please Login or Register to reply to this post

Sponsored by