Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Our college’s Workforce Solutions department offers non-credit classes in variou

ID: 3579535 • Letter: O

Question

Our college’s Workforce Solutions department offers non-credit classes in various areas of interest in the community, as shown below, along with their fees.

Using arrays where applicable, design one program in pseudocode(variables and constants must be in declarations like shown below) that

a) Continuously accepts a class number and then displays the class’s name, until the user enters an appropriate sentinel value to stop entering input. Each time the user enters a valid class number, the program asks the user if he/she wants to sign up for the class, and if they do, simply updates the count of people who have signed up for the class.

b) Once the user decides to stop, the program displays

i) each class number and name

ii) a count of the number of people signed up for each class

iii) the total number of people signed up for classes

iv) the average class enrollment

v) the names of the highest enrolling class and the lowest enrolling class – this should be done without any sorting The table above shows only the current group of classes that have been scheduled. The program must be capable of being modified to accommodate more or fewer classes later by editing only one line of code.

the pseudocode needs to look like this

start

declarations

num classNumber

string className

string highestEnroll

string lowestEnroll

Fee Class Number Class Name Acrylic Painting $79.00 for Beginners $115.00 Advanced Photography Basic Photography 115.00 Blues and Boogie 85.00 Public Speaking $99.00 and Speech Giving Sign Language $49.00

Explanation / Answer

Here goes the Pseudocode

Pseudocode:

*Start
number numberOfClasses
number cn
string ch
number classNumber[numberOfClasses]
string className[numberOfClasses]
number Enroll[numberOfClasses]
string highestEnroll
string lowestEnroll
number totalPeople=0
number avgEnroll
number i=1

Step 0:
print "Enter a class number"
store class number into "cn"
if cn is in classNumber
   print "Do you want to sign up for the class?"
   store choice in "ch"
   if(ch is yes)
       increase Enroll[ch] by 1
   else
        no change needed
else if cn does not exist
   print "Class number does not exist"

*Step 1
for i=1 to numberOfClasses
   print "class number: "+i+" class name: "+ className[i]

*Step 2
for i=1 to numberOfClasses
   print "class number: "+i+" class Strength: "+ Enroll[i]

*Step 3
for i=1 to numberOfClasses
   totalPeople=totalPeople+Enroll[i]

print "Total number of people signed up for the classes is "+totalPeople

*Step 4
avgEnroll=totalPeople/numberOfClasses

print "Average class Enrollment is "+ avgEnroll

*Step 5
highestEnroll=className[1]
high=Enroll[1]
lowestEnroll=1
low=Enroll[1]
for i=1 to numberOfClasses
   if(Enroll[i]>high)
       high=Enroll[i]
       highestEnroll=className[i]
   if(Enroll[i]<low)
       low=Enroll[i]
       lowestEnroll=className[i]

print "Highest Enrollment class is "+highestEnroll+"and lowest enrollment class is "+lowestEnroll

Explanation:

*The required display statements are provided in each of Step 1 to 5

*The above given code is just a pseudocode to do everything asked in the question

*By changing Single line "numberOfClasses" you can change the number of classes

*No sorting is being done to find the highest and lowest enrolled classes

*Arrays classNumber, className, Enroll are being declared to record the class numbers, class names and enrollment.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote