954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Plz Plz Help!! C++ parking program

Parking Software

Parking software is to be installed on parking areas P1 and P2 at Centurion Plaza.

Parking P1: Only for VIPs.
Free of Charge
Available Area for: 10 cars

Parking P2: For Public use
VIPs can Park if P1 is FULL
Charging Rs. 05 / hour
VIPs will park Free of Charge
Minimum Charges: Rs. 05
Available Area for: 30 cars

Software should be able to store the following data of each car of P1 and P2.

i. Registration No.
ii. Vehicle Type (i.e. VIP or Public)
iii. Entrance Time
iv. Exit Time
v. Charges
vi. Revenue

abbasi89
Newbie Poster
3 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

Welcome to DaniWeb. You should be aware that doing homework for someone else is discouraged, though occasssionally someone gets lucky.

Based on the stated requirements you have a wide array of options. Since I don't know what you know it's hard to say what might work best for you. Arrays of structs comes to mind though, since you know the maximum number of cars in each lot, etc. There are many other ways to approach this type of problem, too, so don't think this is THE way to do it.

The struct might be something like:

class slot
{
  bool available;
  Vehicle car;
}

and an array of slots would look like this:

slot P1[10];

But enough help already. Go off and try to work it out for yourself. Remember that pencil and paper are the most important tools a programmer has, short of their imagination. Return when you have specific questions and include appropriate code, error messages, and what not if you expect to receive answers to specific questions. Please read about using code tags before posting any code!

Lerner
Nearly a Posting Maven
2,382 posts since Jul 2005
Reputation Points: 739
Solved Threads: 396
 

nice

jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
 

Thank you sir for helping me little bit but this program is an assignent for me i m tring to do for last 5 or 6 day but i am not able to do Plz can u write the whole code for me once...plz... and you can use inheritance and arrayas well plz use the easiest way and reply as soon as possile

abbasi89
Newbie Poster
3 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

Any one PLZZZZZZ Provide the code i beg of you!!!!!!!

abbasi89
Newbie Poster
3 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 
can u write the whole code for me once...plz... and you can use inheritance and arrayas well plz use the easiest way and reply as soon as possile


I think that will not happen, see here http://www.daniweb.com/forums/announcement8-2.html

If you post your effort (the code you've done this far), then you'll probably get help with it. If you post it, try explaining/pin-pointing the difficulties you have with it.

mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You