
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
Edition 7ISBN: 1285225562
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
Edition 7ISBN: 1285225562a. The Down dog Yoga Studio offers five types of classes, as shown in Table 6-2. Design a program that accepts a number representing a class and then displays the name of the class.
b. Modify the Down dog Yoga Studio program so that numeric class requests can be entered continuously until a sentinel value is entered. Then display each class number, name, and a count of the number of requests for each class.
Step 1 of 9
a.
The following is the program to accept a number representing a class and then displays the yoga class name:
Program:
start
Declarations
num classNum = 0
num SIZE = 5
num classNumbers[SIZE] = 1, 2, 3, 4, 5
string classNames[SIZE] = "Yoga 1", "Yoga 2",
"Children's Yoga",
"Prenatal Yoga",
"Senior Yoga"
getReady()
classNum = classNum - 1
finishUp()
stop
getReady()
output "Enter the class number between 1 to 5: "
input classNum
return
finishUp()
output "You have opted for the class: "
output classNames[classNum]
return
Step 2 of 9
Step 3 of 9
Step 4 of 9
Step 5 of 9
Step 6 of 9
Step 7 of 9
Step 8 of 9
Step 9 of 9
Why don’t you like this exercise?
Other