How to make a calculator that can solve equations?
To get your head moving, something you can't overlook from the beginning is you're going to need some way for your calculator to determine WHAT formula is currently provided by the user input, because your parser is going to vary heavily as you get into different formulas. Regular Expressions are going to be your friend here, and learning those will absolutely help you down the road as a programmer. Once you can identify formulas from user input you'll then need to start building your methods to handle parsing out those formulas. Try to be as modular as you can, keeping certain chunks that you know will carry over to a number of formulas their own methods so you can re-use them.
From a Programming standpoint most of the basic math is going to be very simple, you're going to find determining what formula you're dealing with and parsing said formulas to be the hardest part, as you will need a deep understanding from a Mathematical point of view, and then you'll need to be able to put that understanding to code.
Good luck! And don't let the haters make it sound impossible, there are TONS of programs out their that charge a ton of money for their services, it doesn't mean its not approachable it just likely means it will take a good portion of time and knowledge.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now