needs to be in basic pseudocode. with no specific language. I am looking for the
ID: 3869280 • Letter: N
Question
needs to be in basic pseudocode. with no specific language.
I am looking for the pseudoccode to look just like this.
start
Declarations
num itemPrice
num salespersonCommission
num customerDiscount
output “Welcome to the sales price calculator.”
output “This program will help you calculate the final”,
"price of a product adding in all factors.”
finalPrice= calculatePrice()
output “The total price after Commission, $” salespersonCommission, “and customer discount,”
“ customerDiscount “%, is”, finalPrice
stop
Please. this is the 3rd time I've posted this trying to get someone to help with the answer that I need in the way I need it.
1) 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
Explanation / Answer
Pseudocode:
number acrylic, advPhoto , basicPhoto, piano , speech, sign
number numAcry, numadvPhoto, numbasicPhoto, numPiano, numSpeech, numSign
numAcry = acrylic
numbasicPhoto = basicPhoto
numadvPhoto = advPhoto
numPiano = piano
numSpeech = speech
numSign = sign
totalEnrollment = numAcry + numbasicPhoto + numadvPhoto + numPiano + numSpeech + numSign
output "totalEnrollment"
for(i =0; i < size ; i++){
if(highestEnrollment < arr[i])
highestEnrollment = arr[i]
}
output"highestEnrollment"
for(i =0; i < size ; i++){
if(lowestEnrollment > arr[i])
lowestEnrollment = arr[i]
}
output"lowestEnrollment"
averageEnrollment = numAcry + numbasicPhoto + numadvPhoto + numPiano + numSpeech + numSigns/6
output "averageEnrollment"
Please rate the answer if it helped......Thankyou
Hope it helps....
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.