1.1 Develop a software that produces a mathematical issue and prompts the user for a solution. Create a server class tha
Posted: Thu Jun 02, 2022 7:41 am
1.1 Develop a software that produces a mathematical issue and prompts the user for a solution. Create a server class that will do the following: • Generate two numbers in a range of 1 to 50. • Stores the following operators in a list, '+','', '', and '*. • Randomise the operators. • Generate a mathematical problem and send it to the client. • Generate a solution/answer for the problem and send it to the client. 1.2 Create a client class that will do the following: • Receives the mathematical problem sent from the server. • Receives the solution sent from the server. • Display the problem to the user e.g., '12 + 4 ='. Print this problem using CYAN colour. • Prompt the user to enter a solution for the problem. • A new problem must be generated each time the user solves the previous one. The following checks must be done on the client side: • Ensure that only numbers are entered, if not display a message informing the user of this. This message must be printed in RED. • Compare the user's response to the one given by the server. If the answers are equal, a BRIGHT Style 'Correct!' message must be written; otherwise, an 'Incorrect!' message must be shown beside the right answer, e.g., "Incorrect! The correct answer is 16'.. Verify that the phrase 'Incorrect' is printed in RED and that the solution/answer is presented in a BRIGHT style (from the given example 16 must be printed in a BRIGHT Style and not the whole message). • Ensure that the user's input is not empty, if it is displaying a warning message informing the user of this. This message must be printed on a RED background with a BRIGHT Style. [Sub Total 20 Marks]