wood burning stoves
The moose likes Beginning Java and the fly likes Hexadecimal Java Calculator, How to start??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Hexadecimal Java Calculator, How to start???" Watch "Hexadecimal Java Calculator, How to start???" New topic

Hexadecimal Java Calculator, How to start???

Loveen Jain
Ranch Hand

Joined: Jan 24, 2004
Posts: 35
Hello friends,
I am going to start of with my first ever project in the Java. I have selected the following project form http://mindprod.com but unfortunately because of no previous experience in Java, i am unable to decide that how shud i start the project, the following is the description of the project.
Hexadecimal Calculator for Java Programmers
My two hand-held hex calculators vanished. You can't buy hand held calculators anymore that do hexadecimal and octal. Your task is to create a Java programmer's calculator that functions as an Applet, application or Java Web Start weblet.
It has simulated buttons you click with the mouse.
It is aimed at Java programmers. It calculates in long, int, double or float. It lets you enter or view the display in 16-bit chars, 8-bit chars, hex, decimal, octal or binary.
An RPN (Reverse Polish Notation) calculator would be easiest to implement. Operands work on the top two elements of the stack and replace them with the answer. You need Forth-like operands DUP DROP SWAP OVER ROT -ROT as well as all the java operators. Since it is written in Java, it naturally produces the exact same results Java does.
You might create buttons for much of the Math library too.
You could have several named stores (variables) and allow the user to make up new varible names to store results under on the fly.
Your buttons could relabel themselves in the different modes. You can have almost all the buttons you want. You don't have to make buttons do quadruple duty the way they do in a hand-held.
Now comes the interesting part. The calculator is user-extensible. The end user can write his own functions in Java and create new buttons for them. All he has to do is write a class that implements your interface, and register it.
It could have an eval function that can evaluate any Java expression. You handle it by embedding it in some java source code, and invoking the Jikes or Javac compiler dynamically.

please help me out !!!
Thankyou very much...
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
OK, you have the functional requirements.
Phase 1 would be to create the technical requirements from these. These will define the major modules of the application.
Then start defining how those should work together and write their external interfaces.
After that's done, start working on the user interface, keeping in mind that it should be flexible.
No button should have hardcoded functionality, and new buttons should be able to be added on the fly (as per the specs).
Then it's time to write the mathematical and parsing engines.
Of course test each and every class or group of classes both separate and in conjunction with the entire application.

Loveen Jain
Ranch Hand

Joined: Jan 24, 2004
Posts: 35
Thanks Joeren for replying to my question....
I am thankful that u replied to my querry, i will proceed as u hvae adcived and than post u the work which i will do time to time so taht u can tell me how to proceed further...
Thanking u alot...
Loveen Jain
Ranch Hand

Joined: Jan 24, 2004
Posts: 35
sorry for my mistake i spelt ur name incorrectly
please forgive me Jeroen
I agree. Here's the link: http://aspose.com/file-tools
subject: Hexadecimal Java Calculator, How to start???
It's not a secret anymore!