ITSC121F2019Lab2

From BU Computer Science
Jump to navigation Jump to search

Simple Calculator: Lab 2 for Programming 1: Fall 2019

Description

The goal for this lab is a VERY simple calculator that can do +, -, *, and / on real numbers. It should first ask the user what operation they wish done, and then get the two operands. It should then output the results.

Details

The input should be:

  • The character representing the operation
  • two real numbers

The output should be:

  • The result or an error message (if appropriate)

What to turn in

A zip folder with:

  1. The java code
  2. A word document that includes the following sections
    1. Your name
    2. A description of the problem
    3. Time it took to right
    4. Testing Report (input with associated output that proves your program works). Include at least two different cases of weird input and what the program does

Additional notes

  • Don't forget to comment your code.
  • Watch your spacing and line length
  • Use good variable names
  • Use good prompts

Challenge

Be sure to get a complete, correct, working program first

  • Simple: Add additional operators
  • Advanced: Allow the user to use integers or floating point numbers (without specifying which) and do the appropriate operation.

Due Date is found on Canvas