Question

In: Computer Science

Design the logic in pseudocode for Sign Over Your Money online bank check ordering company as...

Design the logic in pseudocode for Sign Over Your Money online bank check ordering company as follows: 1. The regular price is $6.95 per box of checks; if the customer orders at least 4 boxes, then the price is $4.95 per box. 2. Standard lettering is included in the price, but if the customer wants either calligraphy or elegant lettering, an additional charge of $3.95 applies. 3. If the customer wants a check register, then an additional charge of $2.95 applies. 4. Shipping and handling charges are $1.95 per box. 5. The program must allow the user to enter a. The number of boxes of checks the customer wants to order b. The type of lettering – standard/calligraphy/elegant (by entering a number from a list, e.g., enter 0 if they want standard lettering, and so on, as shown in the practice exercise solutions) c. Whether the user wants a check register (by responding yes/no to the question when asked) d. The program must output i. The price per box of checks ii. The total price for the number of boxes ordered iii. The type of lettering and the charge for it (if any) iv. Whether a check register is desired and if so, the charge for it v. Shipping and handling charges for the order vi. The total charge for the order Assume that the following constants and variables have been declared, and use them in your code where they apply.

num REGULAR_BOX_PRICE = 6.95 num DISCOUNT_MINIMUM_QUANTITY = 4 num DISCOUNTED_BOX_PRICE = 4.95 num STANDARD_LETTERING_PRICE = 0 num SPECIAL_LETTERING_PRICE = 3.95 num CHECK_REGISTER_PRICE = 2.95 num SHIPPING_HANDLING_PER_BOX = 1.95 num STANDARD_LETTERING = 0 num ELEGANT_LETTERING = 1 num CALLIGRAPHY_LETTERING = 2 string SPECIAL_LETTERING_TYPE_1 = "elegant" string SPECIAL_LETTERING_TYPE_2 = "calligraphy" num boxesOrdered num letteringChoice string letteringType num letteringCharge string registerDesired num registerCharge num boxPrice num totalForBoxes num shippingHandlingCharge num totalCharge

This should be done in pseudocode

Solutions

Expert Solution

// Pseudocode to calculate the total charge for the order in Sign Over Your Money online bank check ordering company
Declaration
   num REGULAR_BOX_PRICE = 6.95;
   num DISCOUNT_MINIMUM_QUANTITY = 4;
   num DISCOUNTED_BOX_PRICE = 4.95;
   num STANDARD_LETTERING_PRICE = 0;
   num SPECIAL_LETTERING_PRICE = 3.95;
   num CHECK_REGISTER_PRICE = 2.95;
   num SHIPPING_HANDLING_PER_BOX = 1.95;
   num STANDARD_LETTERING = 0;
   num ELEGANT_LETTERING = 1;
   num CALLIGRAPHY_LETTERING = 2;
   string SPECIAL_LETTERING_TYPE_1 = "elegant" ;
   string SPECIAL_LETTERING_TYPE_2 = "calligraphy" ;
   num boxesOrdered, letteringChoice, letteringCharge, registerCharge;
   string letteringType, registerDesired;   
   num boxPrice, totalForBoxes, shippingHandlingCharge, totalCharge;
  
Start
  
   Print("The number of boxes of checks the customer wants to order : ");
   Input boxesOrdered;
   Print("The type of lettering : 0 - standard, 1 - elegant, 2 - calligraphy : ");
   Input letteringChoice;
   Print("Do you want a check register (Yes/No) : ");
   Input registerDesired;
   boxPrice = REGULAR_BOX_PRICE;
  
   if(boxesOrdered >= DISCOUNT_MINIMUM_QUANTITY) then
       boxPrice = DISCOUNTED_BOX_PRICE;
   end if;
  
   totalForBoxes = boxPrice*boxesOrdered;
  
   if(letteringChoice == STANDARD_LETTERING) then
       letteringCharge = STANDARD_LETTERING_PRICE;
   else if((letteringChoice == ELEGANT_LETTERING) or (letteringChoice == CALLIGRAPHY_LETTERING)) then
       letteringCharge = SPECIAL_LETTERING_PRICE;
   else
       letteringCharge = 0;
   end if;
  
   if(registerDesired == "Yes") then
       registerCharge = CHECK_REGISTER_PRICE;
   else
       registerCharge = 0;
   end if;

   shippingHandlingCharge = SHIPPING_HANDLING_PER_BOX*boxesOrdered;
  
   totalCharge = totalForBoxes + letteringCharge + registerCharge + shippingHandlingCharge;
  
   Print("The price per box of checks : $",boxPrice);
   Print("The total price for the number of boxes ordered : $",totalForBoxes)
  
   if(letteringChoice == STANDARD_LETTERING) then
       Print("The type of lettering : STANDARD "," charge : $",STANDARD_LETTERING_PRICE);
   else if(letteringChoice == ELEGANT_LETTERING) then
       Print("The type of lettering : ELEGANT "," charge : $",SPECIAL_LETTERING_PRICE);
   else if(letteringChoice == CALLIGRAPHY_LETTERING) then  
       Print("The type of lettering : CALLIGRAPHY "," charge : $",SPECIAL_LETTERING_PRICE);
   end if;
  
   if(registerDesired == "Yes") then
       Print("Check register is desired. Charge : $",registerCharge);
   else
       Print("Check register is not desired");
   end if;

   Print('Shipping and handling charges for the order : $',shippingHandlingCharge);
   Print('The total charge for the order : $',totalCharge);

End  


Related Solutions

Design the logic in pseudocode for Bugz App software company that sells a software package as...
Design the logic in pseudocode for Bugz App software company that sells a software package as follows. 1. The retail price of the package is $99 2. Quantity discounts are given on purchases of 10 or more units as follows The program must allow the user to enter the customer’s name and number of units purchased, and output the original cost of the units purchased, the percentage discount given, the dollar amount of the discount given, and the final cost...
a.Create the logic for a program using pseudocode that calculates and displays the amount of money...
a.Create the logic for a program using pseudocode that calculates and displays the amount of money you would have if you invested $5000 at 2 percent simple interest for one year. Create a separate method to do the calculation and return the result to be displayed. b.Modify the program in Exercise 2a so that the main program prompts the user for the amount of money and passes it to the interest-calculating method. c.Modify the program in Exercise 2b so that...
Hi, is this correct? Firm Ltd is a company that specialises in online ordering and delivery...
Hi, is this correct? Firm Ltd is a company that specialises in online ordering and delivery of gift baskets. The firm’s CFO is currently considering a transaction to repurchase shares using excess cash of $800,000. The value of the firm’s other assets is $5,200,000. The firm has 600,000 shares outstanding and the total value of equity is worth $6,000,000. Assume the book value of assets equals the market value. The firm has a net income of $700,000. If the firm...
“Singleton design pattern provides stricter control over global variables.” Justify this statement with your own logic....
“Singleton design pattern provides stricter control over global variables.” Justify this statement with your own logic. Compare Singleton design pattern and global variable (similarities and differences) Implement any example (in JAVA), representing concept of global variable and Singleton design pattern, highlight the differences with coding and output.
Firm B Ltd is a company that specialises in online ordering and delivery of gift baskets....
Firm B Ltd is a company that specialises in online ordering and delivery of gift baskets. The firm’s CFO is currently considering a transaction to repurchase shares using excess cash of $800,000. The value of the firm’s other assets is $5,200,000. The firm has 600,000 shares outstanding and the total value of equity is worth $6,000,000. Assume the book value of assets equals the market value. The firm has a net income of $700,000. If the firm spends all of...
You are considering investing your money in a bank certificate of deposit (that is, lending money...
You are considering investing your money in a bank certificate of deposit (that is, lending money to a bank). You have received the following quotations from four banks. Which bank should you select? Bank A: APR of 3.48 percent compounded annually Bank B: APR of 3.44 compounded semi-annually Bank C: APR of 3.36 compounded monthly Bank D: APR of 3.38 percent compounded daily Bank E: APR of 3.41 compounded continuously Group of answer choices Bank C Bank E Bank D...
A company sells its products online and believes that a change in the design of the...
A company sells its products online and believes that a change in the design of the website and the quality of the photos of the products it exhibits, will increase its sales. So far, with the current design, the daily average of sales has been 9,300 UM (monetary units). Before making a decision, the company decides to do a test for 16 days, presenting its products with the new design of the website. The average sale of these 16 days,...
An online bank is offering to pay 0.25​% interest per month on deposits. Your local bank...
An online bank is offering to pay 0.25​% interest per month on deposits. Your local bank offers to pay 0.65​% interest quarterly​ (every 3​ months). Which is the higher interest​ rate?
In a modern money economy, the money supply is composed of central bank issued currency and certain privately issued bank deposits that are convertible into currency on demand and can be transferred as payments electronically or by check.
In a modern money economy, the money supply is composed of central bank issued currency and certain privately issued bank deposits that are convertible into currency on demand and can be transferred as payments electronically or by check. Thus, the stock of money is composed of both central bank notes (currency) and private bank debts (transaction or checkable deposits). There exists another class of government issued debts that are promises to pay fixed amounts of money at a specified time(s)...
Think back over your personal experiences with money and money management as an individual, a married...
Think back over your personal experiences with money and money management as an individual, a married person, a committee chair, or a business owner, for example. Recall advice you have received about handling money. Was it good advice – or poor advice? Share one lesson you have learned about money based on your personal experiences and the advice you have received.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT