Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a situation where you are buying books online. The bookseller charges ( $ 19.95 ) as the price per book and ( $ 4.95

Consider a situation where you are buying books online. The bookseller charges \\( \\$ 19.95 \\) as the price per book and \\( \\$ 4.95 \\) as the handling cost for up to three books. For every book purchased in addition to three books, there is a handling charge of \\( \\$ 1.50 \\). In addition, there is a 7 percent tax on the cost of the books but not on the handlingcharges. Assuming that numBooks represents the number of books you are purchasing, which of the following is the correct algorithm for calculating the total cost of your purchase? Total charge for books \\( =19.95 * \\) numBooks Tax on the books = total charge for books * 07 if (books \\( <=3 \\) ) then handlingCharges \\( =4.95 \\) else handlingCharges \\( =4.95+1.50 \\) * (numBooks -3\\( ) \\) Total cost of order = total charge for books + tax + handlingCharges Total charge for books \\( =19.95 * \\) numBooks Tax on the books = numBooks * 07 if (books < 3) then handling Charges \\( =4.95 \\) else handling Charges \\( =4.95+1.50 * \\) (numBooks -3 ) Total cost of order

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago