?
Solved

Java calculator

Posted on 2009-02-18
5
Medium Priority
?
207 Views
Last Modified: 2013-12-29
hi I was wondering if somebody could givew me a few pointers as to how a i could implements a calculator in java
I have to be able to take in some data in file format
a b
1 2
3 2
.
.
.
1 6
and processes it by the application of functions as chosen by the user from a button panel.
0
Comment
Question by:greenhal
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 total points
ID: 23671524
First you need to read the file and parse out the operands

See http://www.exampledepot.com/egs/java.io/ReadLinesFromFile.html

and String.split
0
 

Author Comment

by:greenhal
ID: 23671722
Thanks could you help me with this though its
just i need a way to do this
so for example the user chooses the following (1) ( sin a)  ( cos a) and then this is applied so that
b = B1(1) + B2(sin a) + B3(cos a) where i have to solve for B1 B2 B3 so its a system of matrix equataions could you help me with logic of how to do this?
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 2000 total points
ID: 23672191
Sounds like you might need  something more elaborate. Check out the Jep expression parser e.g
0
 
LVL 4

Expert Comment

by:ramu_src2k
ID: 24839103
Elaborate more, what are B!,B2 & B3.
Can you post whole problem statment
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month15 days, 18 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question