9 a design an application for the homestead furniture

This preview shows page 15 - 22 out of 53 pages.

9.a. Design an application for the Homestead Furniture Store that gets sales transactiondata, including an account number, customer name, and purchase price. Output theaccount number and name, then output the customer’s payment each month for thenext 12 months. Assume that there is no finance charge, that the customer makes nonew purchases, and that the customer pays off the balance with equal monthlypayments.
We have textbook solutions for you!
/Programming-Logic-and-Design-Introductory-9th-Edition-9781337109635-772/
The document you are viewing contains questions related to this textbook.
Chapter 5 / Exercise 12
Programming Logic and Design, Introductory
Farrell
Expert Verified
Programming Logic and Design, 8eSolutions 5-16Pseudocode:startDeclarationsnum accountNumnum balanceDuenum monthnum paymentAmtstring custNamenum TOTAL_MONTHS = 12string PROMPT1 = “Enter an account number >> ”string PROMPT2 = “Enter the customer nameand purchase price (balance due) >> ”housekeeping()detail()finishUp()stophousekeeping()output PROMPT1input accountNumreturndetail()output PROMPT2
Programming Logic and Design, 8eSolutions 5-17input custName, balanceDueoutput accountNum, custNamemonth = 1paymentAmt = balanceDue/TOTAL_MONTHSwhile month <= TOTAL_MONTHSbalanceDue = balanceDue – paymentAmtoutput month, balanceDuemonth = month + 1endwhilereturnfinishUp()output “End of program”returnb. Modify the Homestead Furniture Store application so it executes continuously forany number of customers until a sentinel value is supplied for the account number.
Programming Logic and Design, 8eSolutions 5-18Pseudocode:startDeclarationsnum accountNumnum balanceDuenum monthnum paymentAmtstring custNamenum TOTAL_MONTHS = 12string PROMPT1 = “Enter an account number or999 to quit >> ”string PROMPT2 = “Enter the customer nameand purchase price (balance due) >> ”housekeeping()while accountNum <> 999detailLoop()endwhilefinishUp()
Programming Logic and Design, 8eSolutions 5-19stophousekeeping()output PROMPT1input accountNumreturndetailLoop()output PROMPT2input custName, balanceDueoutput accountNum, custNamemonth = 1paymentAmt = balanceDue / TOTAL_MONTHSwhile month <= TOTAL_MONTHSbalanceDue = balanceDue – paymentAmtoutput month, balanceDuemonth = month + 1endwhileoutput PROMPT1input accountNumreturnfinishUp()output “End of program”return10. a. Design an application for Domicile Designs that gets sales transaction data,including an account number, customer name, and purchase price. The store charges1.25 percent interest on the balance due each month. Output the account number andname; then output the customer’s projected balance each month for the next 12months. Assume that when the balance reaches $25 or less, the customer can pay offthe account. At the beginning of every month, 1.25 percent interest is added to thebalance, and then the customer makes a payment equal to 7 percent of the currentbalance. Assume that the customer makes no new purchases.
Programming Logic and Design, 8eSolutions 5-20Pseudocode:startDeclarationsnum accountNumnum balanceDuenum monthnum paymentAmt
Programming Logic and Design, 8eSolutions 5-21string custNamenum TOTAL_MONTHS = 12num PAY_RATE = 0.07num INTEREST_RATE = 0.0125

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 53 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A
Tags
NUM
We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
Programming Logic and Design, Introductory
The document you are viewing contains questions related to this textbook.
Chapter 5 / Exercise 12
Programming Logic and Design, Introductory
Farrell
Expert Verified

Newly Uploaded Documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture