|
using System;
using System.Collections.Generic;
using System.Text;
namespace Patterns_Decorator
{
/// <summary>
/// Provides a concrete implementation of the Leather car option.
/// </summary>
class OptionLeather : CarOption
{
double _cost = 1000;
string _description = "Leather Seats, ";
Car _car;
public OptionLeather(Car car)
{
_car = car;
}
public override double Cost
{
get
{
return _car.Cost + _cost;
}
}
public override string Description
{
get
{
return _car.Description + _description;
}
}
}
}
|
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.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Currently, Eric lives in Birmingham, Alabama where he works for EBSCO Industries as Web Developer/Analyst