Skip to content

AshlynHanson/Calculator-GUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Calculator-GUI

output.mov

Calculate (=)

The calculator should be able to run the calculation whenever the user hits the ‘=’ button. Everything the user entered should be calculated and the result should be displayed to the screen on the calculator. Example: 4-1=3; 5+7=12; 9/3=3; 8*8=64; 16sqrt=4

AC (reset)

Screen Shot 2021-10-26 at 2 26 00 PM

The calculator should be able to reset the text whenever the AC button is pressed. This will cause everything that has been entered or calculated to disappear from the display screen so that the text field is now blank.

Addition (+)

Screen Shot 2021-10-26 at 2 25 36 PM

The Calculator should be able to take two numbers and add them together. Example: 3+4 = 7

  1. A number should be entered that could be as long as the user wants it to be.
  2. Then the plus (‘+’) button should be entered
  3. Followed by another number that can be as long as the user wants it to be.
  4. The ‘=’ button is hit.
  5. The two numbers should be added together.
  6. The resulting text should be the first number, ‘+’, the second number, ‘=’, and the sum of those two numbers.

Subtraction (-)

Screen Shot 2021-10-26 at 2 25 17 PM

The Calculator should also be able to run the subtraction function which works similarly to the addition function but with a different operator. Example: 7-3 = 4

  1. One number is entered first, as long as the user wants it to be.
  2. Then the ‘-’ operator would be entered by the user hitting the button.
  3. Another number would be entered.
  4. The whole operation is run as soon as the user hits the ‘=’ button.
  5. The second number is then subtracted from the first.
  6. The resulting text displayed on the calculator is the first number, ‘-’, the second number, ‘=’, and the resulting subtracted number.

Multiplication (*)

Screen Shot 2021-10-26 at 2 24 14 PM

The calculator should be able to multiply two numbers together. Example: 4*3=12

  1. First, the user enters a number of any length into the text field.
  2. Then the user hits the multiplication button, which enters in the ‘*’ operator.
  3. Another number is then entered.
  4. Once the user hits the ‘=’ button, the text field will display the first number, the ‘+’ operator, the second number, the ‘=’ button, and the sum of the two numbers.

Division (/)

Screen Shot 2021-10-26 at 2 24 37 PM

The calculator should also be able to divide two numbers. Example: 9/3=3

  1. The user enters the first number.
  2. The ‘-’ operator is entered.
  3. The second number is entered.
  4. In order to calculate the quotient, the user hits the ‘=’ button. The display text field will then display the first number, the ‘-’ operator, the second number, the ‘=’ number, and the resulting quotient.

Square root

Screen Shot 2021-10-26 at 2 24 59 PM

The calculator should be able to calculate the square root of a number. Example: 64sqrt=8

  1. First, the user types in a number of any length.
  2. Then the sqrt button is hit.
  3. Once the user hits the ‘=’ button, the text field will be updated to display the first number, the sqrt operator, the ‘=’ operator, and the resulting square root of the number. Backspace The calculator should also be able to perform the backspace functionality. When the ‘<-” operator button is clicked, the last character or number in the text field is deleted.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published