Skip to content

EncompassingResidential/John-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

John Ritz, BS in CS, Oregon CADC II, National NCAC II

This is a Calculator App with basic calculation features. Sorry desktop users, no keyboard entry at this time, only mouse.

This is the 3rd project created for Software Developer Mastermind (SDMM).

Go to this www to get the source code: https://github.com/EncompassingResidential/John-Calculator.git

Run the project at: https://encompassingresidential.github.io/John-Calculator/

App Should look like this:

Calculator_Basic_Look

You can find my CV Resume at https://www.linkedin.com/in/johntritz/

My personal life coach website is https://www.soberjourneycopilot.com/

Feature clarification:

Currently this calculator does not follow operator precedence when doing a multiple operator sequence. This calculator: 4 + 8 / 2 = 6 brownDown(4 + 8 = 12 / 2 = 6) Calculator follow operator precedence: 4 + 8 / 2 = 8 brokenDown(8 / 2 = 4 + 4 = 8 due to divison and multiplication are done before Addition and Subtraction operations)

This was started on 1/16/22, but main push started on 2/02/2022 and fully completed on 2/11/2022 at around 4 to 5 focused in depth hours a day execept weekends. 40 hours on the nose.

Rules

  • Project will be written in: :+ HTML :+ CSS :+ Javascript

  • No Javascript libraries or frameworks are allowed

  • Do not use the eval() function in Javascript : It is considered unsafe: Article https://www.digitalocean.com/community/tutorials/js-eval "Reasons Why You Should Never Use eval() in JavaScript" By William Le Published on August 25, 2019

  • No following tutorials of calculator apps/projects

  • No copying code of other existing calculator apps/projects

Deliverables for this Calculator

A user can add two numbers together:

  • 1 + 1 = 2
  • 11 + 2 = 13
  • 11 + 22 = 33

Subtract two numbers

  • 3 - 2 = 1
  • 33 - 2 = 31
  • 33 - 22 = 11
  • 22 - 33 = -11

Multiply two numbers

  • 2 x 3 = 6
  • 22 x 3 = 66
  • 22 x 33 = 726

Divide two numbers

  • 6 / 3 = 2

  • 66 / 3 = 22

  • 66 / 33 = 2

  • 10 / 3 = 3.3333

  • 10 / 4 = 1.5 wrong (actual answer is 2.5)

  • Display at least 10 digits on the screen

  • Display decimals to at least the thousandth (.001)

  • on results and calculator history

Perform continuous functions:

  • 1 + 1 + 1 + 1 = 4

  • 1 + 2 + 3 + 4 = 10

  • 11 + 22 + 33 + 44 + 55 = 165

  • 100 - 50 - 20 - 10 = 20

  • 2 * 3 * 4 * 5 = 120

  • 22 * 33 * 44 = 31,944

  • 100 / 5 / 4 = 5

  • 1000 / 50 / 10 = 2

  • 100 / 5 / 4 / 2 = 2.5

  • 4 + 3 * 7 - 14 / 7 = 5 (doesn't have to hold to operator precedence. Thank You says this developer.

If operator precedence was held to then: 4 + (3 * 7 = 21) means 4 + 21 means 25 - (14 / 7 = 2) means 25 - 2 = 23

  • Pressing the clear button resets screen to 0

Optional added features:

  • Added Calculation history
  • Added +/-

Possible future feature additions Add Clear History button which clears on screen Calculator History and also Local Storage Add a memory save button (M+) Add a memory clear button (M-) Add a memory recall button (MR)

(EOL) End of Line <Name the 1982 movie where the villian made this statement>

About

SDMM 3rd project started 1/16/22 for basic Calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published