Project
Smart Calculator with Java
Challenging
681 completions
~ 31 hours
4.2Apart from writing a useful program (everyone uses calculators!), you will learn a lot about arrays, strings, and other data types. You will also get closer experience with 2 important data structures: the stack and the queue.
Provided by
JetBrains Academy
About
Calculators are a very helpful tool that we all use on a regular basis. Why not create one yourself, and make it really special? In this project, you will write a calculator that not only adds, subtracts, and multiplies, but is also smart enough to remember your previous calculations. You will practice concepts frequently tested in technical interviews at top tech companies.
Training project
This project allows you to practice and strengthen your coding skills, helping you get ready for more advanced tasks ahead.
What you'll learn
Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Your calculator is taking its first steps: teach it to calculate the sum of two integers and display the result on the screen.
Enable your calculator to keep adding numbers in a loop until the user enters “exit”.
Using arrays and strings, make it possible to calculate sums of multiple integers.
Where there is a plus, there is a minus. Using your knowledge of arrays and strings, enable the calculator to deal with subtraction as well as addition.
There’s no math without errors: teach your program to alert the user to errors in the case of invalid input.
Working with Map class, enable the calculator to use variables.
Time to upgrade and add even more possible operations: multiplication, division, powers, and calculations in parentheses.
Get to know BigInterger class in order to manipulate big, large, long integers in calculations.
Reviews
U6
User 6203391604 months ago
I have learned to solve complex problems, find mistakes that I have made and refractor almost all of my code (which I found to be very annoying task). The bonus is that I am certain I will never forget what I have learned while working on this project.
TM
5 months ago
During this project, I learned about BigDecimal for precise calculations, discovered what prefix, postfix, and infix notations are and why they are used, practiced converting between them, used regular expressions for parsing input.
Ivan Zlobin
7 months ago
Good refresher on regex, good study case for the use of enums and binary operator functions.
4.2
Learners who completed this project within the Java Desktop Application Developer course rated it as follows: