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
File handling and Case study....
File handling and Case study....
KAAAAAAAAAAARRLL
-
- Veteran
- Posts: 288
- Joined: Sat Feb 18, 2006 4:02 pm
Re: File handling and Case study....
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".Karl wrote:Our prof said that we must 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
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
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!
Your professor
PS: What do you mean by "I think my program is about AIRPORT BOOKING"? I sure could not tell you!
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
All who answer my post
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...........
-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...........
KAAAAAAAAAAARRLL
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
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.
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.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
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..
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..