Question: Please help with code that works with MSP430 Test your functions to make sure they work properly and none of them writes or reads non-allocated

 Please help with code that works with MSP430 Test your functions

to make sure they work properly and none of them writes or

Please help with code that works with MSP430

Test your functions to make sure they work properly and none of them writes or reads non-allocated memory. Make sure that UART_getLine inserts the null character at the end of the output string, and does not exceed the limit, including the null character. You will write MarketBot, an interactive chat bot program, that will help the user generate a fruit order. The program should work as follows: Initially display the following message in HyperTerminal (You may use Putty, MobaXterm, etc). a. MarketBot greets the user with the following initial message: " Hi,I am Market Bot! What is the name for your order?" b. After the user has responded with a name for the order, MarketBot should print out a message that reads as follows: "Today we have apples, bananas, and oranges. What would you like to order?". c. If the user responds with an invalid option, the MarketBot replies: " are not available today.". Then it should loop back to part b. The cycle of entering input should repeat until the user enters a correct input name. d. Once the user input is accepted, the bot should state "> cost each. How many would you like?". The cost for an apple should be $2, a banana $1, and an orange $3. e. For this program, the user may be expected to only write a four-digit integer in response to part d. This response is used to calculate the price of the order. MarketBot will say "The total for > is $. Thank you for shopping with me !" and then restart the loop. The following screenshot demonstrates the functionality of the MarketBot program: Market Bot: Hi, I am Market Bot! What is the name for your order? User: Nathan Market Bot: Today we have apples, bananas, and oranges. What would you like to order? User: Pineapples Market Bot: Pineapples are not available today. Market Bot: Today we have apples, bananas, and oranges. What would you like to order? User: oranges Market Bot: oranges cost $3 each. How many would you like? User: 7 Market Bot: The total for 7 oranges is $21. Thank you for shopping with me Nathan! Market Bot: Hi, I am Market Bot! What is the name for your order? Hints - You can use snprintf function to concatenate strings and convert numbers to strings. Make sure you do not overflow any buffers when you use it. - Use strcmp function to compare strings. - Use atoi function to convert a string to a number. - Echo characters back if you want to see what you type. - Use the sequence to properly start a new line. - The escape sequence for the backspace character is \b. Test your functions to make sure they work properly and none of them writes or reads non-allocated memory. Make sure that UART_getLine inserts the null character at the end of the output string, and does not exceed the limit, including the null character. You will write MarketBot, an interactive chat bot program, that will help the user generate a fruit order. The program should work as follows: Initially display the following message in HyperTerminal (You may use Putty, MobaXterm, etc). a. MarketBot greets the user with the following initial message: " Hi,I am Market Bot! What is the name for your order?" b. After the user has responded with a name for the order, MarketBot should print out a message that reads as follows: "Today we have apples, bananas, and oranges. What would you like to order?". c. If the user responds with an invalid option, the MarketBot replies: " are not available today.". Then it should loop back to part b. The cycle of entering input should repeat until the user enters a correct input name. d. Once the user input is accepted, the bot should state "> cost each. How many would you like?". The cost for an apple should be $2, a banana $1, and an orange $3. e. For this program, the user may be expected to only write a four-digit integer in response to part d. This response is used to calculate the price of the order. MarketBot will say "The total for > is $. Thank you for shopping with me !" and then restart the loop. The following screenshot demonstrates the functionality of the MarketBot program: Market Bot: Hi, I am Market Bot! What is the name for your order? User: Nathan Market Bot: Today we have apples, bananas, and oranges. What would you like to order? User: Pineapples Market Bot: Pineapples are not available today. Market Bot: Today we have apples, bananas, and oranges. What would you like to order? User: oranges Market Bot: oranges cost $3 each. How many would you like? User: 7 Market Bot: The total for 7 oranges is $21. Thank you for shopping with me Nathan! Market Bot: Hi, I am Market Bot! What is the name for your order? Hints - You can use snprintf function to concatenate strings and convert numbers to strings. Make sure you do not overflow any buffers when you use it. - Use strcmp function to compare strings. - Use atoi function to convert a string to a number. - Echo characters back if you want to see what you type. - Use the sequence to properly start a new line. - The escape sequence for the backspace character is \b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!