Answer by candied_orange for How should I implements functions which are used...
Here is what I am asking. BeautifulFilter and UglyFilter has many common methods such as read image, write image, convolution and display... So far this sounds fine. and there also some methods that...
View ArticleAnswer by Mateusz for How should I implements functions which are used for...
From what you describe context class should be concerned with loading/writing image and filter should be concerned only with changing image data. I believe image manipulation code will be complex...
View ArticleAnswer by MysticVagabond for How should I implements functions which are used...
I would implement a parent class for your filters eg FilterBaseThis FilterBase would implement the read, write, convolution and display methods. Then when your classes BeautifulFilter and UglyFilter...
View ArticleHow should I implements functions which are used for the same purpose when...
First of all I am going to give you a brief explanation of what i am after doing. I want to write a program that applies filters to an image using a strategy design pattern. I have read some...
View Article
More Pages to Explore .....