Define a class called Counter whose objects count things. An object of this class records a count that is a nonnegative integer. Include methods to set the counter to 0, to increase the count by 1, and to decrease the count by 1. Include an accessor method that returns the current count value and a method that outputs the count to the screen. Write a program to test
counter.reset();
counter.inc();
counter.inc();
counter.dec();
counter.output();
電子二丙9526358張譽融
回覆刪除電子四丙 方彥順 9326351
回覆刪除資工二甲9527118張哲銘
回覆刪除電子三乙9426261徐瑞嘉
回覆刪除資工二甲 9527129 陳晏禎
回覆刪除電子二乙9526248蔡泓修
回覆刪除電子二丙 9526359 王仁澤
回覆刪除電子二乙 9526240 游耀鴻
回覆刪除電子二乙9526208羅沛緹
回覆刪除電子二乙 9526243 吳聖源
回覆刪除電子二乙9526214許祐齊
回覆刪除資工二甲 9527158 張懷仁
回覆刪除9526349李昌訓電子二丙
回覆刪除資工二甲 9527131 施宇涵
回覆刪除電子二丙 9526362 馮文甫
回覆刪除電子二丙 9526353 沈韋豪
回覆刪除電子二乙9526224范丞儀
回覆刪除電子二丙 9526319 鍾宜展
回覆刪除
回覆刪除電子三乙 9426231 吳奕欣
電子二丙 9526302 周崇曄
回覆刪除電子二丙 9526350 莊安富
回覆刪除9226119 電子四甲 許成輔
回覆刪除