Final Project

By:

Manuel Montiel

Allen Tan

Volodymyr Komendyak

#!/bin/bash
echo “List of Produce”
echo “1. Apple”
echo “2. Banana”
echo “3. Pear”
echo “4. Strawberry”
echo “5. Grape”
echo “6. Watermellon”
echo “999. Quit”
PNumber=0

while [ $PNumber -ne 999 ]; do
echo “Please Enter Produce Number or 999 to quit”
read PNumber

if [ $PNumber = 999 ]; then
echo “Finished”
elif [ $PNumber = 1 ]; then
echo “Apple Price is \$1.00”
elif [ $PNumber = 2 ]; then
echo “Banana Price is \$2.00”
elif [ $PNumber = 3 ]; then
echo “Pear Price is \$3.00”
elif [ $PNumber = 4 ]; then
echo “Strawberry Price is \$4.00”
elif [ $PNumber = 5 ]; then
echo “Grape Price is \$5.00”
elif [ $PNumber = 6 ]; then
echo “Watermellon Price is \$6.00”
else
$PNumber=999
echo “Finished”
fi
done

For this Final project what we did was just a catalog of produce with an addition of a loop, which at some point was helpful because it keeps the program more complex. What it does it replays back with answer based on the number that was introduce first. For instance when you press a number it shows the name of the product then it shows the price. I can see this project used in the telemarketers or maybe a super market and also available to the public that way they will be able to see the price with tax before they pay the items.

Leave a Reply

Your email address will not be published. Required fields are marked *