Aug 23, 2012 at 11:46pm UTC
I am having some trouble figuring out how to make this pseudo-code more efficient for the subject could someone please help in figuring this out.
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
I have done research and what not to see how to make it more efficient but one way was to make it a switch structure so could someone please help me with this in giving me an example of the switch structure or show me how to do it with this?
Last edited on Aug 24, 2012 at 12:16am UTC