473,473 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

scientific calculator

1 New Member
I have an assignment that am struggling with. Im new to the java language and i have no ideas how to start this. plse help me in any way u can. Here's what i need:
Java source code of a scientific calculator,with the following functions:
-addition
-substraction
-division
-multiplication
-sin,cos,and tan
-square and square root
-pi
-log

requirements:
-users should work with the calculaor in text mode only(no GUI components required)
-By default,all inputs and outputs should be in decimal format. However,the user should have an option to switch to binay and hexadecimal input/output.
-design ur application in such a way,that additional components(e.g functions, input/output format converters) can easily be added to the system.


thank u for ur help.
i need this as soon as possible.
Apr 12 '08 #1
5 3687
sukatoa
539 Contributor
Here's what i need:
Java source code of a scientific calculator,with the following functions:
-addition
-substraction
-division
-multiplication
-sin,cos,and tan
-square and square root
-pi
-log
..........OMG...........
Apr 12 '08 #2
JosAH
11,448 Recognized Expert MVP
A while ago I wrote a 10 part article about compilers. In detail are the lexical
analyzer, the parser, code generator and the (minimal) interpreter described.
The entire article comes with complete source code. It implements an expression
parser and evaluator. You can easily build a scientific calculator out of it.

Just check the Java 'Howtos' articles section.

kind regards,

Jos
Apr 12 '08 #3
sukatoa
539 Contributor
A while ago I wrote a 10 part article about compilers. In detail are the lexical
analyzer, the parser, code generator and the (minimal) interpreter described.
The entire article comes with complete source code. It implements an expression
parser and evaluator. You can easily build a scientific calculator out of it.

Just check the Java 'Howtos' articles section.

kind regards,

Jos
Nice article.... for me it's interesting to read.....
I thought HowTo's were just bunch of simple codes for newbies, im wrong....

Jos, do you have an authority to post a sticky thread?
Like other forums, they have sticky threads.... ( Newbie guidance thread )....

So that, they may aware of asking a complete code which is not allowed in this forum....
Apr 12 '08 #4
JosAH
11,448 Recognized Expert MVP
Nice article.... for me it's interesting to read.....
I thought HowTo's were just bunch of simple codes for newbies, im wrong....

Jos, do you have an authority to post a sticky thread?
Like other forums, they have sticky threads.... ( Newbie guidance thread )....

So that, they may aware of asking a complete code which is not allowed in this forum....
The Java 'howtos' (articles) are a bit more reading material and a bit more
complicated than the usual stuff; I used to write one article every week but
I stopped writing them. Maybe I'll take that up some time later if there are
a bit more facilities present for the articles at this site.

Stickies are sort of useless because almost nobody reads them and they're
always on top of the list. People are already notified about the spoonfeeding
code in the forum guidelines but they don't read those either ;-)

kind regards,

Jos
Apr 12 '08 #5
acoder
16,027 Recognized Expert Moderator MVP
Padelia, just so you're aware:

The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

Please read the Posting Guidelines and particularly the Coursework Posting Guidelines.

Then when you are ready post a new question in this thread.

You also posted a duplicate thread in the JavaScript howto/articles section which I have deleted. Not only is Java not JavaScript, questions do not belong to the articles section.

MODERATOR
Apr 12 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Rafael | last post by:
Hi Everyone, I need some help with my calculator program. I need my program to do 2 arguments and a 3rd, but the 3rd with different operators. Any help would be great. Here is my code.... ...
3
by: Paul | last post by:
I want to make a simple calculator program but dont know where to get started. This is not GUI but a simple terminal program. It would get input like this Enter number: 5 + 10
24
by: firstcustomer | last post by:
Hi, Firstly, I know NOTHING about Javascript I'm afraid, so I'm hoping that someone will be able to point me to a ready-made solution to my problem! A friend of mine (honest!) is wanting to...
2
by: Greg | last post by:
I am working on an application that requires working with numbers in scientific notation. I am using SqlServer as the database and I have created strongly typed data adapters and datasets. The...
19
by: TexasNewbie | last post by:
This was originally just a calculator without a decimal point. After I added the decimal, it now tells me invalid second number. //GUI Calculator Program import javax.swing.*; import...
5
by: Kuldeep | last post by:
Hi All, Platform: Visual Studio 2005 Language: C#.NET Could you please help me find a pretty good component which can act as an Add-In to Visual Studio 2005 to carry out "Scientific...
3
by: itsmichelle | last post by:
This is a very primative code of a java swing calculator. I have assigned all the number buttons and the operator buttons and I can add, subtract, multiply, and divide two numbers together. However,...
4
by: bravephantom | last post by:
hi first how can i design the interface of a calculator similar to that of windows? i'll add some functions later to work as scientific calculator. the question now is how to implement the panel....
3
by: mandy335 | last post by:
public class Calculator { private long input = 0; // current input private long result = 0; // last input/result private String lastOperator = ""; // keeps track of...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.