Sunday, April 18, 2010

Learning & Assessment Activity 1.1

Using the five step process, develop an algorithm for the following problem:

You need to know the cost of sending a parcel to someone.the price of sending the item will depend upon its weight. The postal service has a standard charge per kilo of item weight.

Publish your findings and the resulting algorithm from the five-step process to your
assessment document.

Step One: Define the problem

Find out the parcels weight and the standard postal service charge in order to find out what the cost is to send the parcel.

Step Two: Define the inputs

The parcels weight
The postal service charge

Step Three: Define the outputs

The cost of the parcel

Step Four: Define processing

Get the parcels weight
Get the standard charge
Multiply the parcels weight by the standard charge

Step Five: Develop the algorithm

Calculate the cost of the parcel

Prompt the user for the parcel weight
Get the parcel weight
Prompt the user for the standard charge
Get the standard charge
Parcel weight x Standard charge
Display the cost of the parcel

End

No comments:

Post a Comment