Build a Complex JavaScript Calculator

In summary, the conversation discusses a group of mechanical engineering undergraduates trying to add an interactive calculator to their website using JavaScript. They are having trouble with the code and are looking for resources or examples to help them build a calculator that can take user input and calculate the desired values. One suggestion is to use the book "Data Structures & Problem Solving Using Java", which provides examples and source code for creating a calculator with advanced functions. The source code is available online, but it is recommended to have the textbook for better understanding.
  • #1
koolraj09
167
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
  • #2
"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:

Related to Build a Complex JavaScript Calculator

1. What is a complex JavaScript calculator?

A complex JavaScript calculator is a digital tool that allows users to perform a wide range of mathematical calculations using JavaScript programming language. It typically includes advanced features such as scientific functions, multiple operators, and the ability to handle complex equations.

2. How do I build a complex JavaScript calculator?

To build a complex JavaScript calculator, you will need to have a good understanding of JavaScript programming language and its syntax. You will also need to use HTML and CSS to create the user interface. You can start by defining the necessary variables and functions, and then use conditional statements and loops to handle different operations and user inputs.

3. What are the benefits of using a complex JavaScript calculator?

A complex JavaScript calculator offers a variety of benefits, such as a user-friendly interface, the ability to handle complex calculations, and the convenience of being able to access it from any device with an internet connection. It also allows for the creation of custom functions and formulas, making it a versatile tool for both personal and professional use.

4. Can I customize my complex JavaScript calculator?

Yes, you can customize your complex JavaScript calculator by adding new functions, changing the design and layout, and incorporating additional features according to your specific needs. You can also integrate it with other web applications to enhance its functionality.

5. Are there any resources available for building a complex JavaScript calculator?

Yes, there are many online resources available for building a complex JavaScript calculator. You can find tutorials, code snippets, and pre-made templates that you can use to create your own calculator. You can also refer to documentation and community forums for help and support from other developers.

Similar threads

  • Programming and Computer Science
Replies
10
Views
542
  • Programming and Computer Science
Replies
15
Views
2K
  • Programming and Computer Science
Replies
24
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
7
Views
2K
  • Programming and Computer Science
Replies
3
Views
474
  • Programming and Computer Science
Replies
2
Views
924
  • Programming and Computer Science
Replies
2
Views
937
  • Programming and Computer Science
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
6K
Back
Top