首页 > > 详细

C++辅导vector Homework 讲解C/C++、C/C++语言调试


Introduction
c++cs,vector,4,5,6,,c++vector
Requirement
Homework 9
The goal of this homework is to practice template method pattern. In the sorting algorithm
that we implement using the abstract factory pattern, the source code of which is in
AbstractFactorySorting.zip, recall that we implemented two algorithms sortDecreasing and
sortIncreasing in the algorithm class BubbleSort. In this homework, you are asked to use the
template method pattern to refactor (i.e., redesign) this algorithm class. You also need to
draw the UML diagram. You need to design classes so that the following main function will
output the following. Your program must use this main function.
int main(int argc, char argv) {
IntegerVectorSortable ivs;
ivs.insertInteger(5);
ivs.insertInteger(4);
ivs.insertInteger(6);
ivs.insertInteger(10);
cout<<”* Before Sorting Integers Decreasing”<

 

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!