Question
Can you help me find any errors by pointing them out and writing the right way in this debug
/ This pseudocode should create a ILst that describes records contain a departrent nane (for exasple. "cosaetics") and profits for each auarter for /7 the // the pr(year 7 for this ful1 year eompared to the last full year tast to years. The string department nun salesQuarteriThisrear num salesquarter2Thisyear nun salesquarter3Thisyear nun salesquarter3ThisYear nun salesquarteriLastyear nun salesQuarter2Lastyear num salesquarter3ThisYear nun salesQuarteraLastYear nun totalThisYear nun totallastYear string status nun QUIT "ZZzZ" housekeeping) while department
Explanation / Answer
The mistakes are within compareProfit method
Solution:
if totalThisYear = totalLastYear then
status = "same"
else
if totalThisYear < totalLastYear then
status = "Lower"
else
status ="Higher".