Skip to content

DeltechJavaAcademy/CLI-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 

Repository files navigation

CLI-Calculator

You and a teammate will build a calculator in the command line. One team member should fork this repo and both team members will work off the formed repo.

Part One

Requirements

  • The user can view a menu of operations
  • The system prompts the user for their choice
  • The system prompts the user for two integers
  • The system performs the chosen operation on the two numbers provided
  • The system displays the integer result
  • The system should display an error if the user tries to divide by zero

Mock Ups

Example One

Welcome to the CLI Calculator

Operations:
1: Addition
2: Subtraction
3: Multiplication
4: Division

Choose your operation: 3

First Number: 6
Second Number 2

Result: 12

Example Two

Welcome to the CLI Calculator

Operations:
1: Addition
2: Subtraction
3: Multiplication
4: Division

Choose your operation: 4

First Number: 10
Second Number 0

Result: Cannot divide by 0

Part 2

Requirements

All part one requirements plus
  • The user can view an updated menu of operations (See mockups below)
  • The system should display the answer to a division problem with two decimals
  • The program will run until the user chooses to exit

Mock Ups

Example One

Welcome to the CLI Calculator

Operations:
a: Addition
s: Subtraction
m: Multiplication
d: Division
e: Exit

Choose your operation: d

First Number: 4
Second Number 3

Result: 1.33

Welcome to the CLI Calculator

Operations:
a: Addition
s: Subtraction
m: Multiplication
d: Division
e: Exit

Choose your operation: e

Goodbye!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •