DesignPattern/23.TemplateMethodPattern/2.Code/main.cpp

22 lines
322 B
C++
Raw Normal View History

2019-11-10 02:50:30 +00:00
#include "FingerprintModule.h"
#include <Windows.h>
int main()
{
FingerprintModule *fp = new FingerprintModuleA();
fp->algorithm();
2020-11-29 02:02:40 +00:00
delete fp;
2019-11-10 02:50:30 +00:00
fp = new FingerprintModuleB();
fp->algorithm();
2020-11-29 02:02:40 +00:00
delete fp;
2019-11-10 02:50:30 +00:00
fp = new FingerprintModuleC();
fp->algorithm();
2020-11-29 02:02:40 +00:00
delete fp;
2019-11-10 02:50:30 +00:00
printf("\n\n");
system("pause");
2020-11-29 02:02:40 +00:00
2019-11-10 02:50:30 +00:00
return 0;
}