Page 1 of 1

File handling and Case study....

Posted: Mon Nov 26, 2007 4:41 am
by Karl
Hi, gud day!!! I need help we have 2 weeks left. Can you help me??? We need to make case study in Qbasic. ANd I think my program is About the "AIRPORT BOOKING", I have some idea but I need to improve it. Our prof said that we must save the data in notepad. We use a file handling, you know about that??? Plz help me, thnks.............

-Karl

Posted: Mon Nov 26, 2007 4:44 am
by bungytheworm
A homework then.

Explain better, try atleast something yourself, post code here and we will help you but we do not make your homeworks.

Re: File handling and Case study....

Posted: Mon Nov 26, 2007 9:59 am
by Mac
Karl wrote:Our prof said that we must save the data in notepad
He/she probably meant to save the data in a file that NOTEPAD can OPEN, since there is no such concept as "save the data in notepad".

Here is a routine that creates a simple 2-line file that NOTEPAD can OPEN:

OPEN "MyStuff.txt" FOR OUTPUT AS #1
PRINT #1, "First line"
PRINT #1, "Last line"
CLOSE #1

If you look at that and hit yourself in the head, saying "I should have figured that out myself! How did I miss that!", then you are in good shape. Do as E.K.Virtanen said and make your best try. Ask specific questions such as "Why does this stop with this error message...", not general questions such as "What else do I have to do?".

If you have no idea what the OPEN/CLOSE stuff above means and how it fits into your assignment, just turn in a sheet to your professor saying "I have no idea how to write this program" and maybe you can get some person-to-person help.

Mac

Posted: Mon Nov 26, 2007 2:27 pm
by burger2227
I think he needs help using a DOS SHELL to open his file IN Notepad!

Your professor

PS: What do you mean by "I think my program is about AIRPORT BOOKING"? I sure could not tell you!

All who answer my post

Posted: Mon Dec 03, 2007 4:52 am
by Karl
You guys, I said help me. But some of you didn't help on my program. This is my layout: Airport Booking
-Menu-
1.)Inputting/Booking
2.)Searching
3.)Deleting/Cancelling the flight
4.)Exit

Sub Book
Enter name?
Enter address?
Enter Age?
Status:
Nationality:
Contact No:
Company:
Occupation:

Type
1.)VIP
2.)Tourist
3.)OFW
Are you a..(1-3)
Destination (press enter)
end sub

Sub typ
VIP=3000
Trst=2000
OFW=0
end sub

Sub Dest
-Menu-
1.)Asia 4.)South America
2.)Australia 5.)Europe
3.)North America 6.)Africa
choose (1-6)

Sub Asia
-Directory-
1.)Brunai
2.)Japan
3.)Malaysia
4.)Singapore
5.)Thailand
6.)Vietnam
7.)China
8.)indonesia
9.)marshall island
10.)guam

(Note: this will apply to other subroutines of continents)

Also we have a searching and deleting....

(You get my logic???)

Plz. Help me...........

Posted: Mon Dec 03, 2007 7:42 pm
by burger2227
That is NOT CODE! That is an outline of your freaking assignment! We don't write code for people that is homework and you seem like a smart ass anyhow!

Finally, out of the goodness of your heart, you give us your assignment! And you banter us for not writing it for you? Ooops, where did I put my crystal ball? Your not worth my time smarty pants!

Perhaps Mommy or Daddy can help.

Posted: Tue Dec 04, 2007 5:04 am
by nkk_kan
well...assuming that u KNOW some qbasic commands..

u need some simple commands and loads of logic...
you'll find SELECT CASE command useful..
just print out the menu and get the number using INPUT command..
and print that in ur notepad file as shown by Mac..
and searching and deleting is harder and you cannot learn it in 2 weeks but atleast u can program it so that it prints the inputted data in notepad file..
hope i helped you..but u can't expect people to do your homework/assignment...they'll never write the whole program for you..that's what u r expecting i think...
and if you don't have any programming knowledge of qbasic..you should really try out Mac's idea..