Build a Complex JavaScript Calculator

  • Context: Java 
  • Thread starter Thread starter koolraj09
  • Start date Start date
  • Tags Tags
    Calculator Javascript
Click For Summary
SUMMARY

The discussion focuses on building a complex JavaScript calculator for a mechanical engineering website, specifically to calculate power loss in a circuit using user inputs for current (I) and resistance (R). Participants recommend utilizing resources such as "Data Structures & Problem Solving Using Java," particularly chapter 11, which covers parsing strings for calculations. Additionally, a source code repository is provided for further reference, although it may be challenging for those without the accompanying textbook. The conversation highlights the need for more advanced examples beyond basic arithmetic calculations.

PREREQUISITES
  • Proficiency in JavaScript programming
  • Understanding of electrical engineering concepts, specifically power loss calculations
  • Familiarity with string manipulation and parsing techniques
  • Access to "Data Structures & Problem Solving Using Java" for advanced algorithm insights
NEXT STEPS
  • Research JavaScript libraries for building interactive calculators
  • Explore advanced string parsing techniques in JavaScript
  • Learn about user input handling in web forms using JavaScript
  • Investigate existing engineering calculators for design inspiration
USEFUL FOR

This discussion is beneficial for mechanical engineering students, web developers creating interactive tools, and anyone interested in advanced JavaScript applications for engineering calculations.

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:

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · 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