下面是一个计算器类的定义,请完成该类的实现。classcounter{intvalue;public:counter(intnumber);voidincrement;//给原值加1voiddecrement;//给原值减1intgetvalue;//取得计数器值voidprint;//显示计数器值}
classcounter{intvalue;public:counter(intnumber);voidincrement;//给原值加1voiddecrement;//给原值减1intgetvalue;//取得计数器值voidprint;//显示计数器值}counter::counter(intnumber){value=number;}voidcounter::increment{value++;}voidcounter::decrement{value--;}intcounter::getvalue{returnvalue;}voidcounter::print{cout<