Sie sind auf Seite 1von 2

Programming Fundamentals: Assignment 02

Calculator
The main aim of this assignment is to implement almost all basic concepts of
Programming Fundamentals till loops so that you become familiar with programming.
To complete the assignment you must have installed Dev C++ or Visual studio C++
(it’s on your choice).
Assignment: Implement a calculator software that include all operators (Arithmetic,
Assignment, Comparison and Logical). Other requirements are given below.
Task 1:
1.1 It will get input of operands (valid data type) and operators from user as follows
for all arithmetic, assignment and comparison operators.
First operand
Operator
Second operand
1.2 For increment/decrement operators it will get first operand and then operator.
1.3 For logical operators it will get first conditional expression then logical operator
and at third second conditional expression.
Task 2:
First of all get input from user if he/she wants to start calculator enter “s” otherwise
“end”.
When user Enter “C” it will clear all variables values and ready to get new operator
and operands. Also clear the output screen.
Task 3:

When user enter the word “end” it will close the program.

Concepts use in this assignment:

Input output streams, escape sequences, string library, data types, operators, activity
or workflow diagram, conditional statements, and repetition structure.
Hand-in and Assessment:
Upload your report that contains activity diagrams of one arithmetic, one assignment,
one comparison and one logical operator. Draw these diagrams on paint and then
insert with explanation into pdf complete report.
1. Pdf complete report:
a. Title page
b. Activity or workflow diagrams
c. Read me heading (how your software works)
d. Add at least one screenshot for each operator types. Try to show different
values and operators.
2. Attach your code in .cpp or .C file with it and also upload your code in a notepad
file (.txt) file. Meaning full comments should be given in code.
Note: This assignment is worth 5 marks. Assessment will be based on the accuracy
of your answers to the tasks, given the approach you have taken and on the
quality of the observations you make concerning the concepts used in this
assignment.
Due date is Thursday 28 November 2019, 11:59pm. Note that there will be
deduction of 5% marks (per day) on late submission. Note that if you submit the
assignment three days after the deadline it will be considered unsubmitted and
you will be given 0 marks.

Das könnte Ihnen auch gefallen