Monday, April 19, 2010

Learning & Assessment Activity 1.5

Describe how the algorithms you developed in 1.1 and 1.2 end.

Publish your descriptions to your assessment document.

To indicate that the program has ended it requires the display to close.
The algorithm must end in an approriate manner. In my algortithms below you can see that after the result has been desplayed i have put display close,this is so that the user is not left with the results on the screen.

Calculate the cost of the parcel
Prompt the user for the parcel weight
Get the parcel weight
Validate parcel weight
Prompt the user for the standard charge
Get the standard charge
Validate standard charge
Parcel weight x Standard charge
Display the cost of the parcel
Close Display
End

Calculate the hours

Prompt the user for the number of levels
Get the number of levels
Validate number of levels
Prompt the user for the past performance
Get the past performance
Validate past performance
Number of levels x Past performance
Display the number of hours that it will take to finish all of the levels
Close Display
End

No comments:

Post a Comment