Create a boolean function to determine if free shipping

Assignment Help PL-SQL Programming
Reference no: EM131049729

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

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

Click here to access the sample. (ATTACHED)

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.

Reference no: EM131049729

Questions Cloud

What is the foreign investment : The principle of comparative advantage states that individuals, firms, and national economies should produce _____, and Everything else held constant, when the price of a product increases _______ .
Conduct at least five interviews with uae-based hr managers : Conduct at least five interviews with UAE-based HR Managers regarding the items - Their recruitment and selection strategy.
The bonds price will still be somewhat greater : A 15-year bond with a face value of $1,000 currently sells for $800. One year later, if the discount rate is still the same, The bond’s price will still be exactly $800. The bond’s price will still be somewhat greater (perhaps by around $10 more). Th..
Specify the algorithm using a flowchart : Given M students, where M is a positive integer, develop an Algorithm to compute the numbers of 1st and 4th year students respectively. The students' years of study are provided, one at a time, as input to the algorithm. Specify the Algorithm usin..
Create a boolean function to determine if free shipping : 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 ..
Repay the loan in seven equal instalments starting : The Elkridge Bar & Grill has a seven-year loan of $23,200 with Bank of America. It plans to repay the loan in seven equal instalments starting today. If the rate of interest is 5.90 percent, how much will each payment be?
Issue more preferred shares paying the same dividend : Suppose a firm has a preferred stock that pays a $10 annual dividend (no growth expected in this payment) and currently sells for $90.00 per share. If it plans to issue more preferred shares paying the same dividend but also needs to incur a floatati..
Hard work is hidden in the derivation of the formula for ?2 : Prove the same result using the formula inside the back cover for ∇2 in spherical polar coordinates. (Obviously, this second proof is much simpler, but the hard work is hidden in the derivation of the formula for ∇2.)
Net present value-internal rate of return-payback : Healthcare Administrator makes $100,000 per year, borrowed $25000 from lenders to pay for Master's Program at 5.84%. the payback time that the school is giving is 20years but I plan on pay the $25000 back within 6years. Determine how much compensatio..

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Using the oracle developer data modeler tool

Credit will be given to queries that are not trivial, for example, "SELECT * FROM Tablename" is unlikely to gain more than one mark. SQL Developer can be used to produce the queries and populate the tables.

  Database in omnymbus

/*Using the STUDENT table in the MISLab1 database in Omnymbus, perform the following tasks: Note the first SELECT is there to label the output, DUAL is a "dummy" table. The second SELECT is the solution.

  Adjustment case study go to npr storycorps website

Assignment: Adjustment Case Study Go to NPR's StoryCorps Website, located at http:/www.npr.org/series/4516989/storycorps. Read two (2) articles that were published within the last two (2) months that focus on individuals with major adjustment issu..

  Part 1you are to write a 6 - 7page paper in the apa format

part 1you are to write a 6 - 7page paper in the apa format about a topic related to this course turn in the final copy

  Write a pl-sql block

Write a PL/SQ block - Select the average salary of all employees in department number 20.

  Installation of sql

Describe your experiences related to your setup of MySQL. Include any difficulties or issues that you had encountered during the installation.

  Assignment related to sql querries

Write a SELECT statement that returns these columns from the Products table: The DateAdded column, A column that uses the CAST function to return the DateAdded column with its date only (year, month, and day)

  Use the data modeler tool to map your entity relationship

Comment on any changes you made to the Relational diagram before mapping the final DDL script. Discuss why you had to make these changes (1 page maximum).

  Model layer takes advantage of a sql server database

Creation of a Model Layer that takes advantage of a SQL Server Database with at least new two tables conforming to the Entity Framework or a NoSQL solution using MongoDb. Creation of a ViewModel layer that supports your Views and and a repository l..

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Write a select statement that answers the problem

Write a SELECT statement that answers this problem - Which products have a list price that's greater than the average list price for all products?

  Write the sql code to perform the tasks

Write the SQL code to perform the tasks requested in each problem. Define a new containing the product number, name, price, and quantity on hand along with the number of orders in which the product appears.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd