i am creating a console app that makes use of inheritance to access methods in an interface which i am also creating. This will be the interface with the methods. (Code still to be added.) EDIT: I am creating an application that captures transport booking info for aircraft and trains. CAircraftBookings, CTrainBookings are booking classes that will contain and manage bookings made for Aicraft/Trains.
namespace Vehicle_Bookings
{
public interface IVehichlesBookings : CAircraftBookings, CTrainBookings
{
public int Add
{
}
public int Update
{
}
public int Delete
{
}
public int Retrieve
{
}
}
}
Now in my console app, the user selects the appropriate choice which will be Adding, Updating, Deleting and Retrieving. The choices will then go as follows:
switch (choice)
{
case "1":
break;
case "2":
break;
case "3":
break;
case "4":
break;
}
while (choice != "5")
How would i go about implementing specific methods from that interface. If the user presses 1 for choice 1, the method Add will be used. If they press 2 the update method will be used etc.