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
Assignment 3 Chapter 2: Algorithm Discovery and Design More about Pseudocode Design an algorithm that is...
Assignment 3 Chapter 2: Algorithm Discovery and Design More about Pseudocode Design an algorithm that is given a positive integer N and determines whether N is a prime number, that is, not evenly divisible by any value other than 1 and itself. The output of your algorithm is either the message ‘not prime’, along with a factor of N, or the message ‘prime ‘ Many excellent simulations of sorting algorithms are available, examine them if they have questions about this...
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...
1. Create an ArrayListReview class with one data field of ArrayList and one with LinkedList with...
1. Create an ArrayListReview class with one data field of ArrayList and one with LinkedList with the generic type passed to the class. 2. Create a constructor that populate an array list and the LinkedList filled with the generic type through inserting new elements into the specified location index-i in the list. 3. You have been given the job of creating a new order processing system for the Yummy Fruit CompanyTM. The system reads pricing information for the various delicious...
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...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT