Solution required for Assignment #4, CS304 Spring 2014
dear fellow,View more random threads:
- Rules for virtual university bid for assignments forum
- Solutions available for assignments of MCS(1st semester)
- Write an essay on earthquake impact all over the world and...
- First eng201 assignment 1 Technical English Writing...
- Pay Less and get solution of Any assimnt 100% guarantee.
- Pay for assignment solution guarantee.
- cs614 web development and design assignment no 1 for sale
If you want to get the solution of an assignment pay for it. You will get a solution of this assignment it's guarantee. so just post your assignment and give the price.
Sponsored Links
Solution required for Assignment #4, CS304 Spring 2014
class Transport
{
private:
float Weight,Speed;
string Capacity;
public:
void Load()
{
cout"\nGoods are loaded successfully\n";
}
void Unload()
{
cout"Goods are Unloaded successfully\n";
}
virtual void Ship(){} OR virtual void Ship()=0;
};
class Land_Transport ublic Transport
{
private:
string Transportation_Mode;
string Vehicle_Type;
public:
void Ship()
{
cout"In land transport, shipping is done via Truck";
}
};
class Air_Transport ublic Transport
{
private:
string Aircraft_Type;
string Airline_Name;
public:
void Ship()
{
cout"\nIn air transport, shipping is done via air cargo\n\n";
}
};
int main(int argc, char *argv[])
{
char choice;
while(1)
{
cout"\n\nDo you want to transport your goods? <Press Y for YES, & N for NO>\n\n";
cout"*************************************\n\n";
choice = getch();
if(choice == 'y' || choice == 'Y')
{
Menu();
}
cout"\nThank You for using this Program...";
}
}
void Menu()
{
Transport *ptr=NULL;
char tpt;
cout"Press 'L' or 'l' to use Land Transport Service\n\n";
cout"Press 'A' or 'a' to use Air Transport Service\n";
cout"*************************************\n";
tpt = getche();
if(tpt == 'A' or tpt == 'a')
{
ptr=new Air_Transport();
ptr->Ship();
}
if(tpt == 'L' or tpt == 'l')
{
ptr=new Land_Transport();
ptr->Ship();
}
getch();
}
There are currently 1 users browsing this thread. (0 members and 1 guests)