c++ BST and file handling
<p>i am interested in creating a car register program:</p>

<p>menu for user to add, delete, find, edit(change a particular detail about the car) a car and view all the cars. this is then stored in memory using a binary search tree. all the cars are to be written out from memory into a csv file. also when loading the system it should read all the cars back in</p>

<p>car has 2 types petrol and electric. 
every car has attributes car id, owner, make, model, numberplate
a petrol car has attributes miles, topup
an electric car has attributes power, miles</p>

<pre><code>class car
{
string id
string owner
string make 
string model
string numberplate
virtual getkey()//gets key being searched etc.
readfile();
writefile();
};

class petrol : public car
{
string miles 
string topup
};

class electric : public car
{
string power
string miles
};


data structure:

class node
{
car *ptr
node *left
node *right
};

class tree
{
///insert delete etc.
};
</code></pre>

<p>would this be a practical class design and what functions might need to be included?</p>
