Design an application for Domcile Designs that gets sales transaction data, incl
ID: 3568127 • Letter: D
Question
Design an application for Domcile Designs that gets sales transaction data, including an account number, customer name, and purchase price. The store charges 1.25 percent interest on the balance due each month. Output the account number and name, then output the customer's profected balance each month for he next 12 months. At the beginning of every month, 1.25 percent interest is added to the balance, and then the customer makes a payment equal to 7 percent of the current balance. Assume that the customer makes no new purchases.
I need the psuedocode for this. We haven't learned any languages so please don't put it in java or anything. Just plain pseudocode.
Explanation / Answer
[PseudoCode below]
print("Account Number?")
accountNumber = getNumberInput()
print("Customer Name?")
customerName = getStringInput()
print("Price?")
price = getNumberInput()
balance = price
for i= 1 to 12
if (balance <=25)
print("Balance less than $25, after "+i+" months")
end if
balance = balance * 1.0125
balance = balance * 0.93
print(i + " " accountNumber + " " + customerName + " " balance)
end for
[End of PseudoCode]
For part b we need to keep running this loop until we get some terminate value for account number, in this code it will be 0.
[PseudoCode below]
print("Enter Sales Transaction Data. Enter 0 for account number to terminate.")
while(true)
print("Account Number?")
accountNumber = getNumberInput()
if (accountNumber == 0)
print("Program ended")
terminate while
print("Customer Name?")
customerName = getStringInput()
print("Price?")
price = getNumberInput()
balance = price
for i= 1 to 12
if (balance <=25)
print("Balance less than $25, after "+i+" months")
terminate for
end if
balance = balance * 1.0125
balance = balance * 0.93
print(i + " " accountNumber + " " + customerName + " " balance)
end for
end while
[End of PseudoCode]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.