You're welcome to post your pseudocode and ask specific questions so we know where help would be needed.
I need some help and guidance to solve this problem.
Week 4 CheckPoint – Repetition and Decision Control Structures
In one of the week 3 discussion questions we discussed the algorithm that would be required to make a peanut butter sandwich. In this CheckPoint you will need to take that one step further and create a program design to make a peanut butter sandwiches. Below you will find a partial program design; you need to complete it by adding the pseudocode in the required areas. You need to add one repetition (loop) control structure and one decision control to complete the program design. The user will decide how many sandwiches are made; this is where the loop will be used. The user will decide if the sandwich includes jelly, and, if it does, what flavor of jelly; to keep it simple we are only allowing grape or strawberry jelly.
1. Ask user how many sandwiches to make
2. Ask user if they want jelly on their sandwich
3. If jelly is requested, ask user what flavor (grape or strawberry) of jelly they would like
4. Make peanut butter and, if required, jelly sandwiches
IncludeJelly (string; values Yes/No)
TypeOfJelly (string; values Grape/Strawberry)
Declare NumberOfSandwiches as integer
Declare IncludeJelly as string
Declare TypeOfJelly as string
Declare Continue as Boolean
Set Continue to true
Do While Continue = true
End Main Module
Display "How many sandwiches would you like to make? Enter 0 to end program."
If NumberOfSandwiches = 0
Set Continue = false
Display "Do you want jelly on your sandwiches?"
If IncludeJelly = “Yes”
Display “What type of jelly; Grape or Strawberry?”
**** Students – add a loop here to create the number of sandwiches requested by the user – within the loop you need to invoke (call) the SandwichModule to create the sandwiches. Do not over think this one; the loop should loop over the NumberOfSandwiches and reduce the value each time a sandwich is made until NumberOfSanwiches is equal to zero.
Make sure you review the given code in this assignment, you do not want to repeat steps that are already done.
Spread peanut butter on bread
**** Students – add decision control structure here to add jelly to the sandwich if the user requested it. Hint: you will want to use a nested decision control structure.
Answer this Question
programming - user to enter the student’s marks on four exams (use double and ...
programming c - Write a c program that will declare two dimensional array called...
visual basic programming - Write a Visual Basic program that will calculate the...
Programming - I need your help to write a program using visual basic 2010 for ...
Programming - Here is the question that I need help to write the code for the ...
Applied Programming - APPLIED PROGRAMMING (APR520S) ASSIGNMENT 1 Problem Solving...
programming - Create the logic for a program that prompts a user for three ...
Programming - I suppose to write a program that calculates the average of up to ...
c++ - C++ Program to read, print name and other details of 50 students ? Problem...
Programming in c++ - Draw a flow-chart and Write a program that asks the user ...