Skip to content

vasyllaba/supercalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SuperCalculator

GitHub last commit Postgres Thymeleaf Bootstrap SpringBoot

This is a test task for GeeksForLess

Description

Web calculator implemented on Spring Boot. It contains a main page with an input field and validation of the entered expression. If the expression is correct, the calculation is performed and saved to the database. You can edit database records on the history page

                         Instruction

                         Validation

Task

Develop an application that will provide the followingcapabilities:

  1. ✅ Enter arithmetic expressions containing integers and fractions numbers, as well as mathematical operations +, -, *, / and parentheses, nesting level of parentheses is arbitrary.
  2. ✅ Check the entered expression for the correct placement of brackets
  3. ✅ Check the correctness of the entered expression (should not be 2 signs of mathematical operations in a row, for example, it is not allowed expression 3 * +4, at the same time, expression 4 * -7 is allowable)
  4. ✅ If the expression is correct, calculate its value and store the expression and the calculated value in the database.
  5. ✅ Provide the ability to view and edit expressions in DB. If the expression remains correct after editing, resave its value in the database.
  6. ✅ Implement search functions for expressions in the database based on their results. For example, a query is possible: find all expressions whose values are equal to (and also greater than, less than...) the specified value.
  7. ✅ The project must be implemented using a build system Maven in one of the development environments: IntelliJ IDEA or Eclipse.
  8. ✅ The project must be uploaded to the GitHub repository and provided link to get it. It is also possible to send an archive with project.

Notes.

  • Use Java 11 or Java 17 at work.
  • Recommended DBMS: MySQL, MariaDB or PostgreSQL.
  • The use of JUnit and other testing tools is encouraged.
  • It is allowed to use files (instead of a database) to store information about entered and edited arithmetic expressions.
  • Paragraphs 1-3 and 8 are mandatory. If paragraphs 4-7 are not are executed, then perform an additional task:
    • count the number of numbers in the string entered by the user.

Technology list

  • Java 17
  • Maven 4.0.0
  • Spring Boot 2.7.4
  • PostgreSQL 13
  • JUnit 4.13.2
  • Thymeleaf
  • Bootstrap
  • Deploy on heroku

About

Web calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •