Beruflich Dokumente
Kultur Dokumente
Computer Project
On
QBASIC
(Algorithm)
Step9. Stop
2. Algorithm of Drinks
Step1. Start
Step2. Call background
Step3. Display menu options
Step4. Declare and input variable
Step5. Read variable
[If input out of range then go to Step 2]
Step6. Go to requested case
Step7. Assign food name and price to variable
Step8. Write variable in the data file
Step9. Stop
3. Algorithm of Snacks
Step1. Start
Step2. Call background
Step3. Display menu options
Step4. Declare and input variable
Step5. Read variable
[If input out of range then go to Step 2]
Step6. Go to requested case
Step7. Assign food name and price to variable
Step8. Write variable in the data file
Step9. Stop
4. Algorithm of Meal
Step1. Start
Step2. Call background
Step3. Display menu options
Step4. Declare and input variable
Step5. Read variable
[If input out of range then go to Step 2]
Step6. Go to requested case
Step7. Assign food name and price to variable
Step8. Write variable in the data file
Step9. Stop
5. Algorithm of Dessert
Step1. Start
Step2. Call background
Step3. Display menu options
Step4. Declare and input variable
Step5. Read variable
[If input out of range then go to Step 2]
Step6. Go to requested case
Step7. Assign food name and price to variable
Step8. Write variable in the data file
Step9. Stop
6. Algorithm of Look
Step1. Start
Step2. Call background
Step3 Close the data file
Step4. Declare and assign value to variable
Step5. Display Food items purchased
Step6. Open hotel.exe in input mode
Step7. Read hotel.exe and assign a variable to the content
of the file
Step8. Print variable
[go to step6 till end]
Step9. Close the data file
Step10. Stop
7. Algorithm of Edit
Step1. Start
Step2. Call look
Step3. Create a data file new.exe in append mode and open
hotel.exe in input mode
Step4. Input which to cancel?; variable
Step5. Read variable
Step6. a$= read hotel.exe
Step7. Is variable=a$?
[Yes then go to Step5]
[No then write a$ in new.exe Go to Step5 till end of
file]
Step8. Kill hotel.exe, rename new.exe as hotel.exe
Step9. Stop
8. Algorithm of Bill
Step1. Start
Step2. Call look
Step3. Display The Pradhan Hotel
Step4. Declare and assign value to variable
[final=total+(13*total)/100]
Step5. Display With 13% VAT: Rs, variable
Step6. Display Final cost: Rs, variable
Step7. Input amount
[q=final-amount]
[dec=int(q*100+.5)/100]
Step8. Is dec less than 0?
[Yes then go to step2]
[No then calculate returned amount]
Step9. Display returned amount
Step10. Call continue
Step11. Stop
/
9. Algorithm of Continue
Step1. Start
Step2. Call background
Step3. Input variable
[want to order again? (y/n);order$]
Step4. Lower case variable order$
Step5. Read variable order$
Step6. Is variable y or n.
[Y then call main menu]
[N then display thank you, kill the data file and exit]
[Else display out of range, go to Step2]
Step7. Stop