Project 0: Pocket Calculator (Intro to C++)

Due September 22nd, 2022 at 11:59 PM.

Table of Contents

  1. Project Description
  2. Getting the Code
  3. Grading Breakdown
  4. Advanced Extensions

Project Description

The project description is available on the Robotics 102 main website: Project 0: Pocket Calculator

Getting the Code

We will use Replit for Project 0. To accept the assignment, navigate to the ROB 102 Replit team and open Project 0: Pocket Calculator.

Follow the Replit Instructions to learn how to write, run, test, and submit your code.

Grading Breakdown

Grades will be assigned as follows.

  • P0.0 (1 point): In the file LICENSE.txt included in the project template, replace <COPYRIGHT HOLDER> with your name. Replace <YEAR> with the current year.

  • P0.1 (3 points): Perform arithmetic operations for addition, subtraction, multiplication, and division for two numeric values and print the values, the operation, and their result to the screen.

  • P0.2 (3 points): Prompt a user to enter values and operators to the calculator. The program should take as input real valued numbers for the operands, and a character for the operator, and store these values in variables.

  • P0.3 (3 points): Create a function that computes a single arithmetic operation. The function should be given as input two floating point operands and a character that specifies the operation to be performed.

  • P0.4 (3 points): Iterate over an execution loop that performs an infinite number of subsequent arithmetic operations given from user input, until the user specifies the operator ‘q’ for quit. Output the result accumulated over subsequently performed operations.

  • P0.5 (2 points): Check whether the user has provided valid input for the operator. If the input is invalid, display an error message and request the input again.

Advanced Extensions

Advanced extensions are optional features which you may complete for up to 4 additional points total in the course. They are due by the final grading deadline (December 9, 2022). They do not need to be completed by the deadline for this project. See the syllabus for details.

Each extension described in the Project 0 Instructions is worth 1 advanced extension point.