English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi all.
I am making a project on airport management.
I am using file handling in my project.
here it is needed to allocate a pnr no to every traveller,here is where the problem comes alive.
could u plz tell me the way on how can I allocate pnr no to every visitor and check for its validity.........
reply fast I dont have time.............
I have to submit the project...............

2006-08-06 08:26:02 · 4 answers · asked by anuragarora_forever 1 in Education & Reference Primary & Secondary Education

4 answers

Sounds like you wated to the last minute to do this, bad move in the world of programming. However, it shouldn't be too hard. A PNR is a 10 digit alpha numeric string that is assigned to a person when they book. So use a random function to randomly pick letters and numbers to form this string, then store it with the persons name attached.

You can store this in a database or a file or whatever. Then for validity you have to do the following tests...

1) Does the string currently exist?
2) Does the PNR match the person's name who is providing the ticket?
3) Is the person trying to use the ticket really the person who is on the ticket (this is validated by passport or license of some kind with picture identification)

Then you could implement it like the response before by making traveller an object and populate it with the persons information, where PNR would be one of the objects attributes.

There are going to be many ways to implement this, but this is just one quick and dirty way that should only take you an hour or two to setup.

2006-08-06 08:41:25 · answer #1 · answered by Martyr2 7 · 0 0

How do you anticipate a route to get replaced by ability of a short answer the following? study your guide and ask better certain questions. There are some dozens of document purposes split in 2 modes, buffered and unbuffered. EDIT: in case you have ever used a workstation you need to comprehend what it truly is to keep a document. those operations in C are meant to provide that function, the potential of storing this methodology's output. for sure it truly is likewise sensible to apply latest information for enter besides, it truly is why there are document studying purposes.

2016-11-23 13:07:10 · answer #2 · answered by lefler 4 · 0 0

For file handling in C++, look up ofstream and ifstream.

2006-08-06 08:57:16 · answer #3 · answered by msabramo 2 · 0 0

Traveler* pTraveler = new Traveler();
pTraveler->validate();

2006-08-06 08:30:47 · answer #4 · answered by gjmb1960 7 · 0 0

fedest.com, questions and answers