Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 409 Weeks Ago, 1 Day Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Management Posted 06 Jul 2017 My Price 15.00

Discount product Price

Examine the pseudocode sample provided, and explain what it does line by line.

 

Unit 5 Pseudocode Sample

Description: This function applies discount percentage on an item price unless the item price is less than the whole sale price. For example, a product at $10 with a wholesale price of $5 and a discount of 10% returns $9.

function applyDiscount(productPrice : Double,

wholesalePrice : Double,

discount : Double)

Return Double

Create variable discountedPrice as double

discountedPrice = productPrice * (1 – discount)

if (discountedPrice

discountedPrice = wholesalePrice

end if

return discountedPrice

End function

 

Present a solution using pseudocode similar to what you saw above.

  • Identify the logic needed to create a Boolean function to determine if free shipping will be applied based on the total order amount (e.g., free shipping for orders over $75). The function is expected to return TRUE or FALSE depending on the free shipping criteria.

  • Present a second pseudocode solution that will call the function and print whether the user will get free shipping.Examine the pseudocode sample provided, and explain what it does line by line. 

     

     Unit 5 Pseudocode Sample 

    Description: This function applies discount percentage on an item price unless the item price is less than the whole sale price. For example, a product at $10 with a wholesale price of $5 and a discount of 10% returns $9. 

    function applyDiscount(productPrice : Double, 

    wholesalePrice : Double, 

    discount : Double) 

    Return Double 

    Create variable discountedPrice as double 

    discountedPrice = productPrice * (1 – discount) 

    if (discountedPrice < wholesalePrice) 

    discountedPrice = wholesalePrice 

    end if 

    return discountedPrice 

    End function

     

    Present a solution using pseudocode similar to what you saw above.

    Identify the logic needed to create a Boolean function to determine if free shipping will be applied based on the total order amount (e.g., free shipping for orders over $75). The function is expected to return TRUE or FALSE depending on the free shipping criteria. 

    Present a second pseudocode solution that will call the function and print whether the user will get free shipping.

  •  

Answers

(5)
Status NEW Posted 06 Jul 2017 12:07 PM My Price 15.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â-----------  -----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)