Problem 7a and 7b on page 224 in this book: ISBN 13: 978-0-538-74476-8. I need h
ID: 3640095 • Letter: P
Question
Problem 7a and 7b on page 224 in this book: ISBN 13: 978-0-538-74476-8. I need help with the pseudo code: The question 7a is this: The Some Interest Credit Company provides loans to customers at 1.5 percent interest per month. Design an applicaiton that gets customer account data, including an account number, customer name, and balance due. Output the account number and name; then output the customers projected balance each month for the next 10 months. Assue that when the balance reaches $10 or less, the customer can pay off the account. At the beginning of every month, 1.5 percen interest is added to the balance, and then the customer make a payment equal to 5 percent of the current balance. Assume the customer makes no new purchases.7b. Modify the Some Interest Credit Company application so it executes coninuously for any number of customers until a sentinel value is supplied for the account number.
Explanation / Answer
1.
Pseudo-code :
Make a class BANK having the following data types:
int Account_Number[10];
char Customer_Name[30];
int Balance_Due;
int Current_Balance;
For every record 'i' fetched ,
if(i.Current_Balance - i.Balance_Due <= 10)
print "You can pay off the account";
else
count <- 0;
Declare a temporary variable 'Temp_Balance'
Temp_Balance <- i.Current_Balance;
repeat till count != 10;
Temp_Balance <- Temp_Balance + (1.5 * Temp_Balance)/100;
print "The projected value for month i + 1 is:" Temp_Balance;
count <- count + 1;
count <- 0;
repeat till count != 10
i.Current_Balance <- i.Current_Balance + (1.5 * i.Current_Balance)/100;
i.Balance_Due <- i.Balance_Due + (5 * i.Current_Balance)/100;
count <- count + 1;
if(i.Current_Balance - i.Balance_Due <= 10)
print "You can pay off the account";
2.
Pseudo-code :
Make a class BANK having the following data types:
int Account_Number[10];
char Customer_Name[30];
int Balance_Due;
int Current_Balance;
Declare and Initialize a variable 'Special_Account_Number' with an account number
For every record 'i' fetched ,
if(i.Account_Number != Special_Account_Number)
if(i.Current_Balance - i.Balance_Due <= 10)
print "You can pay off the account";
else
count <- 0;
Declare a temporary variable 'Temp_Balance'
Temp_Balance <- i.Current_Balance;
repeat till count != 10;
Temp_Balance <- Temp_Balance + (1.5 * Temp_Balance)/100;
print "The projected value for month i + 1 is:" Temp_Balance;
count <- count + 1;
count <- 0;
repeat till count != 10
i.Current_Balance <- i.Current_Balance + (1.5 * i.Current_Balance)/100;
i.Balance_Due <- i.Balance_Due + (5 * i.Current_Balance)/100;
count <- count + 1;
if(i.Current_Balance - i.Balance_Due <= 10)
print "You can pay off the account";
else
print "The program is terminating!!!";
-------------------------------------------------------------------------------------
Hope this helps!!!
All The Best!!!
Please do rate me!!!
Thanks!!!