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

I need this in a pseudocode heres an example of what pseudocode i need. start De

ID: 3869463 • Letter: I

Question

I need this in a  pseudocode

heres an example of what pseudocode i need.

start

     Declarations

          string customerName

          string serviceType

          num feeForService       

num calculateParkingFee

          num calculateShuttleFee

     output “Welcome to the airports service calculator”

     output “This program will help you calculate you fee”,

               “depending on what service you would you need.”

     output “Enter your name”

     input customerName

     output “What service will you be using today?”

     input seriviceType

         

     if (serviceType = parking) then

          fee= calculateParkingFee()

     else

          fee= calculateShuttleFee()

     endif

    

     output “The total fee for”, customerName, “for service,” ,

               serviceType, “, is $”, fee

stop

     num calculateParkingFee()

          Declarations

               string frequentParkerProgramMember

               num numOfDaysParking

               num finalFee

          output “Are you a frequent parking program member?”,

                    “Y or N”

          input frequentParkerProgramMember

          output “How many days will you be parked here?”

          input numOfDaysParking

    

          fee = 12 * numOfDaysParking

         

          if (frequentParkerProgramMember = Y) then

               finalFee = fee – (fee * (10/100))

          return finalFee

          else

               return fee

endif

     return

     num calculateShuttleFee()

          Declarations

               num numberOfPassengers

               num numberOfBags

               num finalFee

          output “How many passengers?”

          input numberOfPassengers

          output “How many bags will each passenger have?”

          input numberOfBags

          fee = 29 + (numberOfBags – 1)*2

          if numberOfPassengers >=2 then

               finalFee = fee * numberOfPassengers

          return finalFee

          else

               return fee

          endif

     return

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. Class Number Class Name Fee

1 Acrylic Painting for Beginners $79.00

2 Advanced Photography $115.00

3 Basic Photography $115.00

4 Blues and Boogie Woogie Piano $85.00

5 Public Speaking and Speech Giving $99.00

6 Sign Language Level I $49.00

Assume that the following declarations have already been made

num totalEnrollment

num averageEnrollment

num highestEnrollment

num lowestEnrollment

num indexOfHighest

num indexOfLowest

num classNumber

num desiredClassNumber

a) Declare any required variables and constants, and arrays for the class names, the fees and the enrollment count for each class. 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.

b) Assume that the class name and fee arrays have been filled. You do not have to write code to fill them.

c) The program should continuously accept a class number and then display 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.

d) Once the user decides to stop, the program should display

i) each class number, name and fee Page 2 of 3

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 2

Explanation / Answer

image is not cleear in end . If func2 has code

return 4 *ctr;

.Output ogf program will be 12.

As when u call func1. You pass 12 in it. And in func1 ,we have a for loop in which ctr is incremented each time the number(x) passes in If is divisible by 3.

As number passes in IF are 12,13,15,16,17,18. Out of these 3 are divisible by 3.

so when program will come out of for ctr will be equal to 3. As started as 0.

.Now this ctr is passes in func2. which just multiplies it with 4 and returnd hence 4*3=12

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