needs to be in basic pseudocode. with no specific language. I am looking for the
ID: 3869285 • 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.
4) Plan the logic for an airport services company program to determine service fees. The program prompts the user for their name and the type of service needed—parking or shuttle. Depending on the service type, the main program gets additional information from the user and then calls one of the methods described below, to determine their fee, and then displays the user’s name, the service type and the fee. The methods are:
a) calculateParkingFee method
i) requires to be passed information (“Y” or “N”) that indicates whether the user is a member of the company’s frequent parker program, and the number of days of parking required
ii) if the user is a member, they receive a 10% discount on the regular parking fee of $12 per day
iii) the method returns the total parking fee
b) calculateShuttleFee method
i) requires to be passed the number of passengers and the total number of bags being brought by the passengers
ii) determines the shuttle fee as follows:
(1) a base fee of $29 per passenger
(2) the base fee includes one free bag per passenger; any additional bags are charged a fee of $2 each
iii) the method returns the total shuttle fee
Explanation / Answer
PseudoCode for airport service company :
Start
Declarations
char name
char serviceType
if (serviceType = parking) then fee = calculateParkingFee()
else fee = calculateShuttleFee()
output “The total fee , for” name ", for service,“ serviceType “, is $”, fee
Stop
num calculateParkingFee()
Declarations
char frequentParkerProgramMember
num noOfDays
fee = 12*noOfDays
if (frequentParkerProgramMember = Y) then
finalFee = fee - fee*10/100;
return finalFee
else return fee
num calculateParkingFee()
Declarations
num numberOfPassengers
num numberOfBags
fee = 29 + (numberOfBags - 1)*2
return fee
Please upvote if you found it useful
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.