Java Build a Complex JavaScript Calculator

Click For Summary
A mechanical engineering undergraduate is seeking assistance in developing an interactive calculator for their website using JavaScript. They aim to create a tool that allows users to input specifications, such as current and resistance, to calculate power loss in a circuit. The user is looking for resources or examples beyond basic arithmetic calculators to help with the coding process. A suggestion was made to refer to "Data Structures & Problem Solving Using Java," specifically chapter 11, which covers parsing strings for calculations. A link to the book's source code was provided, along with a recommendation to acquire an older edition of the textbook for better understanding.
koolraj09
Messages
166
Reaction score
5
Hi guys.
I am mechanical engineering undergraduate and we have a website. Now we want to put up an interactive calculator on our website.
So we are trying JavaScript. Though we tried writing a code for our calculator it didn't work. At this time we're getting confused because of level of involvement of the code.
So can anyone point out to resources or examples (definitely not the easy arithmetic one's) for building up a calculator. For example if we want to calculate power loss in a circuit the input the user would give(in the form of FORM or submit command) is current I and resistance R. So we'd calculate the power loss for them.
We want input from users, where user will type his specifications(whatever they might be) and calculate the required things for him. Here are many examples of what type of calculator we'd like to build.
http://www.engineersedge.com/calculators/section_square_case_9.htm"
Any help would be greatly appreciated.
Thanks.
 
Last edited by a moderator:
Technology news on Phys.org
"Data Structures & Problem Solving Using Java" in chapter 11 shows how to take apart strings of characters and turn them into a calculation with precedence, parentheses, etc.

The source for that is available on the web at http://users.cis.fiu.edu/~weiss/dsj2/code/code.html but I think that might be rough sledding for an ME without the textbook to back it up. There are old editions of the book available at bargain prices http://www.bestwebbuys.com/Data-Str...g-Using-Java-ISBN-9780201549911?isrc=b-search I would certainly grab a copy of that if I were trying to use that source.
 
Last edited by a moderator:
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
24
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 22 ·
Replies
22
Views
2K