Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, I am in the process of implementing this in Prolog but have no prior knowledge in the language and hoping someone will guide me towards the right direction. This is the situation: Bus station that issues bus pass for a certain number of seats on a particular bus schedule. anyone can purchase them. The passenger can also pass his/her pass to others. That case, they loose the right to board the bus but the new person should be allowed to board the bus. when they enter the station, with a valid pass, the station should allow them to use the bus Assume no one is doing anything unlawful. Everyone obeys the rules. So no need to worry about someone sneaking into the station. I just need some help as I have no idea how to come up with the passing of the pass to others. How would the pass be validated at the end? What would be the rules? Any guidance or path would be much appreciated. Thank you all in advance.
Post Follow-up to this message"Showman" <pg242w@hotmail.com> wrote in message news:c34e9af6-2108-46e4-9f97-160f5b2b4fbd@i36g2000prf.googlegroups.com... > Hi, > > I am in the process of implementing this in Prolog but have no prior > knowledge in the language and hoping someone will guide me towards the > right direction. > > This is the situation: > Bus station that issues bus pass for a certain number of seats on a > particular bus schedule. > anyone can purchase them. > The passenger can also pass his/her pass to others. That case, they > loose the right to board the bus but the new person should be allowed > to board the bus. > when they enter the station, with a valid pass, the station should > allow them to use the bus > Assume no one is doing anything unlawful. Everyone obeys the rules. So > no need to worry about someone sneaking into the station. > > I just need some help as I have no idea how to come up with the > passing of the pass to others. How would the pass be validated at the > end? What would be the rules? Any guidance or path would be much > appreciated. > > Thank you all in advance. From the standpoint of requirements (software), my first question would be, what exactly is the program supposed to do? That is, what are the inputs and outputs? As far as the "passing of the pass", I don't see how it matters. Based on your description, the pass is like a bearer bond. It's the pass that matters, not the person who has it. The pass is presumably valid for a specific set of circumstances (bus route(s), times, # of seats) but the identity of the pass holder is irrelevant. AHS
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.