Click here to Skip to main content
15,881,644 members
Articles / Web Development / ASP.NET

From No Factory to Factory Method

Rate me:
Please Sign up or sign in to vote.
4.88/5 (161 votes)
23 Nov 2012CPOL11 min read 240K   2.8K   228  
This article will tell about the very known design pattern "Factory Pattern" used in the programming.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CourseLibrary
{
	public class CBICourse:AbstractCourse
	{
		public CBICourse()
		{
			this.CourseDuration = 1;
			this.CourseName = "A fast track BI course for working professionals";
		}
		public override void CreateSchedule()
		{
			Console.WriteLine("[BI Corporate Course - course schedule created]");
		}
		public override void CreateCourseMaterial()
		{
			Console.WriteLine("[BI Corporate Course - course materials created]");
		}		
	}
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Just Compile
India India
Learning is fun but teaching is awesome.

Who I am? Trainer + consultant + Developer/Architect + Director of Just Compile

My Company - Just Compile

I can be seen in, @sukeshmarla or Facebook

Comments and Discussions