|
using System;
namespace ObserverPatternClassic
{
/// <summary>
/// Summary description for NationalTravels.
/// </summary>
public class NationalTravels:Observer
{
public NationalTravels()
{
//
// TODO: Add constructor logic here
//
}
public void UpdateBangaloreAirlinesRout(object Traveller)
{
if( Traveller is BangaloreAirlines)
{
AddRoutforBangaloreAirlines((BangaloreAirlines)Traveller);
}
}
private void AddRoutforBangaloreAirlines(BangaloreAirlines traveller)
{
//Code for adding the new rout to NationalTravel's Travel database.
Console.WriteLine("new rout No. " + traveller.TravelRout + " Added Sucessfully to National Travel's Database");
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Sunil Kumar Works for Wipro Technologies, one of the leading software services company in the world. He is a Microsoft Certified Solution Developer(MCSD) in .NET