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

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!

commented: i think i'll use this as a template :) +3

nice

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

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.