0% found this document useful (0 votes)
661 views

On Qbasic (Algorithm) : By: Nischit P.N. Pradhan Class: 10'B To: Prakash Pradhan

The document outlines the algorithms for a hotel management system created in QBASIC. It includes 10 algorithms: 1) Main Menu, 2) Drinks, 3) Snacks, 4) Meals, 5) Desserts, 6) Look, 7) Edit, 8) Bill, 9) Continue, and 10) Total. Each algorithm lists the steps to display menus, take user input, retrieve and write data to a file, perform calculations, and return output on food orders, purchases, cancellations, and total costs. The algorithms work together to allow users to order from menus, see past orders, edit orders, and view bills with totals and change returned.

Uploaded by

api-364271112
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
661 views

On Qbasic (Algorithm) : By: Nischit P.N. Pradhan Class: 10'B To: Prakash Pradhan

The document outlines the algorithms for a hotel management system created in QBASIC. It includes 10 algorithms: 1) Main Menu, 2) Drinks, 3) Snacks, 4) Meals, 5) Desserts, 6) Look, 7) Edit, 8) Bill, 9) Continue, and 10) Total. Each algorithm lists the steps to display menus, take user input, retrieve and write data to a file, perform calculations, and return output on food orders, purchases, cancellations, and total costs. The algorithms work together to allow users to order from menus, see past orders, edit orders, and view bills with totals and change returned.

Uploaded by

api-364271112
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

#18

Computer Project
On
QBASIC
(Algorithm)

By: Nischit P.N. Pradhan


Class: 10B
To: Prakash Pradhan
1. Algorithm for Main Menu
Step1. Start
Step2. Call background
Step3. Display Menu
Step4. Create a data file named Hotel.exe in append mode
Step5. Display main menu options
Step6. Declare and input variable
Step7. Read choice
Step8. Go to requested page
[if out of menu the go to Step3]

{For Case 5:-


Step1. Call look
Step2. Input want to cancel an order(y/n), variable and lower
case variable
Step3. Is variable y or n
[Y then call edit]
[N then close the data file][Else go to Step1]
Step4. Stop}

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

10. Algorithm of Total


Step1. Start
Step2. Close hotel.exe
Step3. Open hotel.exe in input mode
Step4. Read and store content of the data file in a variable
Step5. Declare a variable and add the price (a= a + b)
[go to step 4]
Step6. Close the data file
Step7. Stop

You might also like