Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PURPOSE: To demonstrate the ability to create an accurate flowchart to illustrate the logic of a task involving an array. PROBLEM: The Sundown Yoga Studio
PURPOSE: To demonstrate the ability to create an accurate flowchart to illustrate the logic of a task involving an array. PROBLEM: The Sundown Yoga Studio offers five types of classes, as shown in the table below. Design the logic for a program that accepts a number representing a class and then displays the name of class. If a bad entry is made, display the message "No such class" from the array. Design the program to accept entries over and over again until -1 is entered for the class number. Name your array classArray and be sure to define and initialize it in your flowchart. The only other variable you should need in the number entered by the user. Use the value entered by the user as the subscript value for the array, as long as it is a valid entry. Use priming read logic to obtain the first class number before the loop begins and input another class value at the bottom of the loop. Again, your loop should terminate when -1 is entered for the class number. Don' t forget to prompt for input values. 0 No such class 1 Yoga 1 2 Yoga 2 3 Children' s Yoga classArray values: 4 Prenatal Yoga 5 Senior Yoga 5 No such class Proqramming Concepts Used: Input Validation Loopin Array variables decision/selection nested structures
Step 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