Starting from:
$35

$29

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

Problem Statement




Design a program that will make algebra fun. This program will start by asking the user how many “floors” to have, then will prompt the user to to answer an algebra problem for each floor. If they succeed on all “floors”, they win, and get to the top, while if they fail, they descend a level. There will be two modes: difficult and easy. Easy mode will allow the user to choose what operations they are required to conduct, while difficult mode will choose randomly for the user. In easy mode, numbers generated to fill the equations will be on [0..100], while in difficult mode, these numbers will be on [-100..100]. ASCII art must be used to represent the building progress.




More Requirements:




Must use at least three functions



Must use self made function to check and convert input (str) to signed int.



If the str contains illegal characters, return INT_MAX from <climits



Must use a self made function to print the image of an elevator using ASCII characters.



This should accept two parameters: current level, max level



Must use a self made function to print the math problem to screen.



Must be named display_equation()



Must accept three parameters: (type of problem, lowest acceptable random number, highest acceptable random number)



1 for addition, 2 for subtraction, 3 for multiplication, 4 for division (canvas)



Must return answer as a signed int



MUST USE: ​int display_equation(int eq_type, int range_low, int range_high);



Must catch all bad input



Math answers should always be ints



Elevator cannot go below the first floor...



User must be able to choose to repeat.



Understanding the Problem




The problem is asking me to develop an algebra game, the exact intricacies of which are listed above. This game will include as many (up to 10) floors as the user decrees and each floor will have an algebra problem with randomly generated values (and thus answer) and user input will be checked to make sure that it is indeed an int, otherwise, MAX_INT will be returned.

More products