Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 6th, 2006, 02:05 PM
sunny
Guest
 
Posts: n/a
Default A sample program to implement a factory design pattern

Hai,

can anyone implemen this problem.I am unable to implement.i tried but i
am going out of the design pattern.

Implement the Factory Design Pattern for the following scenario:
Base class = Quad
Derived classes = Square, Rectangle
Take command line arguments for length & width. Depending upon no. of
arguments,
create and return the object of appropriate derived class. Each class
should have a
function named "desc" to print the class name. Base class should be
abstract.

Kindly find me the solution for this problem

Thanking You,
K.RajaSekhar

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles