Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code In C++ please 1.4 Tab sheet [Question 1.4) Button [1.4 - Enter line of instructions and display commands] A robot must receive a line
Code In C++ please
1.4 Tab sheet [Question 1.4) Button [1.4 - Enter line of instructions and display commands] A robot must receive a line of instructions to move out of a maze using no more than 10 steps forward in total. The robot reacts to the characters S, R and L, which represent the following commands: One step forward Turn right Turn left Example of a line of instructions: SSSRSLSLLSSR Write code to do the following: Have the user enter the line of instructions using an inputbox Display the line of instructions that has been entered in the output area redQ1_4, followed by a blank line. Decode the line of instructions into short descriptive commands indicating the movements of the robot. Display the descriptive commands in the rich edit component redQ1_4, as shown in the example that follows. As soon as the number of forward steps exceeds the value of 10, the message "Number of forward steps exceeds 10' must be displayed and none of the remaining commands contained in the line of instructions must be decoded. NOTE: Your code must be able to decode any line of instructions and not only the line of instructions shown in the examples that follow. Sample run - Example 1 1.4 - Enter line of instructions and display commands SSSRSLSLLSSR Step forward Step forward Step forward Tumight 1.4 - Enterine of instructions and display commands Robin Step forward Turn left p forward Turn left Turn left Step forward Step forward Turn rightStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started