Modify the pseudocode and optimize it
Not what you're looking for?
Easy Credit evaluates the credit limit of people based on their income and past credit limits. Based on these inputs, calculations are performed to ascertain the credit worthiness of the customer. The following is a pseudocode that will help them automate the system of checking the credit worthiness and then printing out the results so that Easy Credit's manager can make a decision on the limit to be given to the customer:
start
read Customer_Name
perform Calculate_SafetyLevel()
perform Evaluate_History()
print Customer_Name
print 'Credit History of' Client_Name 'is' History
print 'Safety Level of' Client_Name 'is' Safety_Level
stop
Calculate_SafetyLevel()
read Customer_Income
if Customer_Income >= $5000
Safety_Level = Excellent
elseif Customer_Income >= $3000
Safety_Level = Good
elseif Customer_Income >= $1500
Safety_Level = Ok
endif
return
Evaluate_History()
read Customer_History
if Customer_History = Clean
History = Good
elseif Customer_History = Pending_Balance
History = OK
elseif Customer_History = Defaulted
History = Risky
endif
return
* Modify the pseudocode and optimize it.
*Provide valid reasons why the pseudocode is now more efficient.
Purchase this Solution
Solution Summary
There is not much that you can do to optimize the given pseudocode to speed it up or reduce the space requirement, as the code is already quite simple and straightforward. However you can optimize it in sense of completeness (handling all the possibilities), and that is what this solution deals with.
Solution Preview
There is not much that you can do to optimize the given pseudocode to speed it up (the normal sense of optimization is optimizing the code for speed and/or space requirement) or reduce space requirement, as code is already quite simple and straightforward.
However you can optimize it in sense of completeness (handling all the possibilities). In the existing code, Safety_Level is undefined if read ...
Purchase this Solution
Free BrainMass Quizzes
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.
Javscript Basics
Quiz on basics of javascript programming language.
C# variables and classes
This quiz contains questions about C# classes and variables.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.