Zoklet.net

Go Back   Zoklet.net > Technology > Technophiles and Technophiliacs > Codes of all kinds

Reply
 
Thread Tools
  #1  
Old 12-07-2009, 06:45 PM
DrunkOnAluminium DrunkOnAluminium is offline
Baron
 
Join Date: Mar 2009
Thanks: 362
Thanked 117 Times in 61 Posts
Default Vb.Net Airport Reservations

For the record I am NOT asking for help with my homework

Its a pretty standard project for a final assignment for anyone in first programming or final year highschool.

The basic concept is having a set of arrays that write to a file, that instruct the user what seats are avalible on a plane.

the grid is 4*10

Any advice?
__________________
http://soundcloud.com/darthbeaver/the-red-pill-1
Reply With Quote
  #2  
Old 12-07-2009, 10:10 PM
sevenTwo sevenTwo is offline
Super Novice
 
Join Date: Feb 2009
Location: Bay life
Thanks: 73
Thanked 121 Times in 97 Posts
Default Re: Vb.Net Airport Reservations

set up a 4x10 boolean array. if a user claims seat[i][j], make that seat[i][j] = taken. Should be pretty obvious from there.
Reply With Quote
  #3  
Old 12-28-2009, 01:57 PM
coolstorybro coolstorybro is offline
Peasant
 
Join Date: Jun 2009
Location: England, United States of Euro
Thanks: 7
Thanked 3 Times in 3 Posts
Default Re: Vb.Net Airport Reservations

If you are using multiple planes, use multiple records in a random access file storing a fixed array in each file.
Code:
dim plane as boolean(3,9)

sub saveaplane()
	fileopen(1,"planes.bin",openmode.random,,,len(plane))
	dim rnum as integer = 0
	do while not eof(1) 'this just gets the record number at the end of the file, theres faster ways to do it but i really can't be bothered
		fileget(1,plane,rnum)
		rnum += 1
	loop
	rnum += 1

	if 00.checked = true then 'checkbox
		plane(0,0) = true
	else
		plane(0,0) = false
	end if
	if 10.checked = true then 'do all of these for a "checkbox array" on a form
		plane(1,0) = true
	else
		plane(1,0) = false
	end if
	fileput(1,plane,rnum)
	fileclose(1)
exit sub
humm 4 capitalisation
__________________
Ox29A confessions
23:07 -!- ^ is now known as He
23:07 * He ^ craves big black penises

Last edited by coolstorybro; 12-28-2009 at 02:09 PM.
Reply With Quote
  #4  
Old 12-29-2009, 10:29 PM
Aragami Aragami is offline
Member
 
Join Date: May 2009
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via AIM to Aragami Send a message via MSN to Aragami
Default Re: Vb.Net Airport Reservations

You're going to have to write to either a database or a file so you can record what seats are actually taken. database is easy, but because you're not doing an online program (i assume...) then you're going to have to write to a file.

the file should be setup with each possible combination of a seat, which will have a corresponding place in the array.

ie. [i][a].[i][b].[i][c].[i][d]. etc.

Then again I know nothing about VB so you may be able to skip this and use an internal program memory.
Reply With Quote
Reply

Bookmarks

Tags
airport, reservations, vbnet

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MW2 Airport scene -- thoughts? underOATH Fragyard 19 11-27-2009 07:29 PM
airport freakout. Ping Crosby LOL, Internet 3 10-10-2009 02:23 PM
Driving to the airport on terms Echidna Generally Speaking 10 09-05-2009 06:18 PM
Frankfurt Airport (FRA) stephan_jenkins Travel and World Language 0 02-24-2009 02:32 AM
Hi Drama @ Japanese airport IIIII LOL, Internet 3 02-16-2009 07:38 AM


All times are GMT. The time now is 04:42 AM.


Hot Topics
On IRC
Users: 4
Messages/minute: 0
Topic: "http://www.zoklet.net/..."
Users: 22
Messages/minute: 0
Topic: "buttpee"
Users: 10
Messages/minute: 0
Topic: "11:37 < mib_i8mfin> so wie ich die website hier sehe las..."
Advertisements
Your ad could go right HERE! Contact us!

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.