Question

3. Online Purchase ─ Pseudocode: Provide a solution to the below problem in the form of...

3. Online Purchase ─ Pseudocode: Provide a solution to the below problem in the form of pseudocode.

Online Purchase ─ Flowchart: To get your personal budget under control, you need to know how much you pay for each of your online purchases. To help with your calculations, you decide to draw a flowchart. Your flowchart should read the price of an item and read the quantity you want to purchase of that item. Your flowchart should then calculate the sales tax and shipping cost, and print the shipping cost and total cost. Every purchase is charged a 5% sales tax. After tax has been added, if the cost is less than $50, then shipping is $6. Otherwise, shipping is free. Sample session: Enter price of purchase item: 8 Enter quantity of items purchased: 3 Your shipping cost is $6. Your total payment is $31.2. Another sample session: Enter price of purchase item: 30.2 Enter quantity of items purchased: 2 Your shipping is free! Your total payment is $63.42. As always, make sure your print statements generate output that matches the sample session’s format. Use the words shown. Don’t forget the colons, spaces, the $, and the closing punctuation. 3. Online Purchase ─ Pseudocode: Provide a solution to the previous problem in the form of pseudocode.

Homework Answers

Answer #1

PSEUDOCODE:

function main()
    priceOfItem = input('Enter price of purchase item: $')
    qty = input('Enter quantity of items purchased: ')
    costOfPurchase = priceOfItem * qty
    salesTax = costOfPurchase * 5 / 100
    costOfPurchaseWithTax = costOfPurchase + salesTax
    if costOfPurchaseWithTax < 50
        output('Your shipping cost is $6.')
        totalCost = costOfPurchaseWithTax + 6
    else
        output('Your shipping is free!')
        totalCost = costOfPurchaseWithTax
    end
    output('Your total payment is $' + totalCost + '.')
end
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
JAVA public class Purchase { private String name; private int groupCount; //Part of price, like the...
JAVA public class Purchase { private String name; private int groupCount; //Part of price, like the 2 in 2 for $1.99. private double groupPrice; //Part of price, like the $1.99 in 2 for $1.99. private int numberBought; //Total number being purchased. public Purchase () { name = "no name"; groupCount = 0; groupPrice = 0; numberBought = 0; } public Purchase (String name, int groupCount, double groupPrice, int numberBought) { this.name = name; this.groupCount = groupCount; this.groupPrice = groupPrice; this.numberBought...
This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program). Extend...
This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program). Extend the ItemToPurchase class per the following specifications              Private fields string itemDescription - Initialized in default constructor to "none" Parameterized constructor to assign item name, item description, item price, and itemquantity (default values of 0).             Public instance member methods setDescription() mutator & getDescription() accessor (2 pts) printItemCost() - Outputs the item name followed by the quantity, price, and subtotal printItemDescription() - Outputs the...
Write a C++ program that processes orders for our company Widgets and More. Your program will...
Write a C++ program that processes orders for our company Widgets and More. Your program will read the product code and quantity for all the products in an order from a file, order.txt. You will be given a sample order.txt with the starter code. There are two items on each line of the file the first is a letter that represents the product and the second is an integer representing the number bought. Based on the product and quantity, you...
NAME: MATH125: Unit 3 Individual Project Answer Form Logic, Decision Making, and Introduction to Statistics ALL...
NAME: MATH125: Unit 3 Individual Project Answer Form Logic, Decision Making, and Introduction to Statistics ALL questions below regarding BUYING and LEASING a car must be answered. Show ALL step-by-step calculations, round all of your final price answers correctly to the nearest cent, and include the units of measurement. Submit this modified Answer Form in the Unit 3 IP Submissions area. Being well-informed, or at least knowing the right questions to ask, can save you from being taken advantage of....
Question 1 of 15 Linsay’s Landscaping wants to make notes in QuickBooks each time she services...
Question 1 of 15 Linsay’s Landscaping wants to make notes in QuickBooks each time she services a client to streamline the invoicing process at the end of the month. She does not want these records to affect any month or year to date financial reports throughout the month until she invoices the client. Which of the following transaction types do you recommend she uses to achieve this goal? A. Invoice B. Credit Memo C. Sales Receipt D. Delayed Charge E....
**[70 pts]** You will be writing a (rather primitive) online store simulator. It will have these...
**[70 pts]** You will be writing a (rather primitive) online store simulator. It will have these classes: Product, Customer, and Store. All data members of each class should be marked as **private** (a leading underscore in the name). Since they're private, if you need to access them from outside the class, you should do so via get or set methods. Any get or set methods should be named per the usual convention ("get_" or "set_" followed by the name of...
Assumptions: At the beginning of 2009, CanGo purchased the online gaming company. This purchase was for...
Assumptions: At the beginning of 2009, CanGo purchased the online gaming company. This purchase was for cash, paid for through the proceeds of the IPO and results in goodwill. 90% of the online book sales comes from JIT, the other 10% through the inventory which CanGo possesses. 100% of the CD/DVD/MP3 come through CanGo inventory. The result is that 80% of ALL sales is JIT and 20% is inventory. Student Name: Instructions: Go to the CanGo intranet found in the...
Festive Floral is gearing up for online carnation sales this Mother’s Day. They specialize in selling...
Festive Floral is gearing up for online carnation sales this Mother’s Day. They specialize in selling organic extra-large red and pink carnations. The price is $0.7 per stem, which includes free one-day shipping to the customer. Festive Floral pre-orders carnations directly from a certified organic farm at the cost of $0.15 per stem. The order is made prior to the growing season and flowers are grown accordingly, so the pre-order quantity cannot be changed. However, if Festive Floral runs out...
Required information Chapter 8: Applying Excel [LO8-2, LO8-3, LO8-4] The Chapter 8 Form worksheet is to...
Required information Chapter 8: Applying Excel [LO8-2, LO8-3, LO8-4] The Chapter 8 Form worksheet is to be used to create your own worksheet version of the Review Problem in the text. Chapter 8: Applying Excel: Excel Worksheet (Part 1 of 2) Download the Applying Excel form and enter formulas in all cells that contain question marks. For example, in cell B26 enter the formula "= B5". Check your worksheet by changing the budgeted unit sales in Quarter 2 of Year...
What is the purpose of entering historical invoices and payments for suppliers – Select one: a....
What is the purpose of entering historical invoices and payments for suppliers – Select one: a. to allow tracking of discounts taken b. to total all purchases for the supplier this year c. to allow the supplier balance field to be updated d. all of the above What step is not involved in setting up the receivables ledger – Select one: a. setting the receivables bank and accounts receivable linked accounts b. receivables ledger amounts must match the general ledger...