Programming Fundamentals Assignment 3: Deadline: Monday, 9-3-2020, Before Class
Programming Fundamentals Assignment 3: Deadline: Monday, 9-3-2020, Before Class
Programming Fundamentals Assignment 3: Deadline: Monday, 9-3-2020, Before Class
Assignment 3
Dated: 6-3-2020 BS-SE’19, Morning
Submission guidelines:
• No assignment will be accepted after due date.
• Plagiarism and copy will be dealt strictly (zero will be marked in that case).
• No second attempt will be entertained
• Write code with proper indentation and comments, without proper comments code will not be
evaluated
• Read the complete statement carefully before starting the implementation
• Paste your submission (source code .cpp) into the following folder on \\printsrv:
\\printsrv\Teacher Data\Natalia Chaudhry\PF \Submissions\Assignment3\
Write access to these folders will be disabled after the submission deadline.
The source code file should have the following naming convention: RollNumber.cpp. Files will
invalid name will not be evaluated.
Problem
You are required to design a calculator with following functionalities using switch statement.
1. xy
2. Arithmetic operations (+,-,/,x,%)
3. Factorial
4. Trigonometric identities: cos, sin, tan
5. Vertical and Horizontal Histogram of a number
6. Vertical and Horizontal Double-Histogram of a number
7. Postmortem float
Vertical:
* Horizontal:
* **********
*
*
*
*
*
*
*
*
This is the same as part 5 with one change only. Instead of finding the histogram of an entered number.
It first doubles the number and then display the histogram of the result. For example, if a user enters
5 then the resultant histograms would be:
Vertical:
* Horizontal:
* **********
*
*
*
*
*
*
*
*
7: Postmortem float
This part takes a double/float number as an input from the user. You must not take integer number
as an input. Your task is to extract the part before and after decimal from a float number and store it
in left and right variables, respectively. Display the value of these variables. You MUST NOT use
typecasting or any built-in function otherwise zero will be granted.