Starting from:
$35

$29

Program Design & Testing Document for Program 4 Lyell C Read Solution




Problem Statement




The problem asks me to create a program that can fulfil the following requirements: (source:




canvas / Justin Goins):




Clarification (10/23/18): Your code should detect cases where the number or ordering of operands is incorrect. For example, the calculation "6 + 4.125 + 7 9" would display an error, as would "6 + / 6".



There should be spaces between each operand and operator.



The input should be taken as a string.



There should not be competing precedence. Everything will be calculated left to right.



The binary conversions will only handle unsigned, positive values.



The grade calculator should prompt for the number of grades to be entered, collect those grades



from the user and average them. The user should also be given an option to calculate a weighted



average. For this option the program will need to take a weight from the user and multiply it by



the average. If you are unfamiliar with weighted averages, see the introduction at: https://www.wikihow.com/Calculate-Weighted-Average (Links to an external site.)Links to an external site.



Your program should handle all input errors such as a user putting in an invalid character or



number.



All function bodies must be 15 lines of code or less, including main(). Whitespace and



lines with just curly braces do not count in the line count.



No global variables or goto functions.



To summarize the above, the program will have to evaluate and error check an input in the form 4 - 2 / 44 - 2.3 as a string. The program will also convert unsigned binaries, and calculate grades using a weighted average. Also, there will be an option to average the grades in an unweighted manner (could just substitute 1/grade_num for weight).



More products