|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ChoiceInterface;
using Choice;
namespace FactoryClass
{
public class FactoryChoice
{
static public IChoice getChoiceObj(string cChoice)
{
IChoice objChoice=null;
if (cChoice.ToLower() == "car")
{
objChoice = new clsCar();
}
else if (cChoice.ToLower() == "bike")
{
objChoice = new clsBike();
}
else
{
objChoice = new InvalidChoice();
}
return objChoice;
}
}
}
|
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.
Experienced Lead developer having 17+ years with a passion for developing innovative programs that expedite the efficiency and effectiveness of organizational success. Well-versed in technology and writing code to create systems that are reliable and user-friendly. A skilled leader who has the proven ability to motivate, educate, and manage a team of professionals to build software programs and effectively track changes. Confident communicator, strategic thinker, and innovative creator to develop software that is customized to meet a company’s organizational needs and further its success.