作者Oonagh ( )
看板NTUBIME-99
標題[學業] [計程] 作業二 程式逼 課本習題3.15的題目
時間Thu Oct 12 23:33:40 2006
沒有買課本的同學們有福了
這裡有助教親手排版的題目原文
當然,如果跟課本有什麼不同,一切以課本為主
大家要準時交作業喔
3.15 (Date Class)Create a class called Date that includes three pieces of
information as data members - a month (type int), a day (type int) and a
year (type int). Your class should have a constructor with three parameters
that uses the parameters to initialize the three data members. For the
purpose of this exercise, assume that the values provided for the year and
day are correct, but ensure that the month value is in the range 1-12; if
it is not, set the month to 1. Provide a set and a get function for each
data member. Provide a member function displayDate that displays the month,
day and year separated by forward slashes(/). Write a test program that
demonstrates class Date's capabilities.
如果有什麼問題
要趕快跟助教們約時間好好問一問
規則跟之前一樣 找子誠助教問問題 就有糖果吃喔
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.94.127
推 Uccq:哇塞 助教你好帥 穿制服看起來跟大一新生幾乎沒兩樣呀!!! 10/13 00:03
推 yourway2034:助教你好帥 沒穿制服時看起來也跟大一新生一樣耶!!! 10/13 00:34
推 chenghao: 助教你好帥 有穿跟沒穿制服時看起來都跟講歸一樣帥! 10/13 00:40
推 geniuswang35: 教你好帥 沒穿衣服時看起來也跟大一新生一樣耶!!! 10/13 00:40
推 ilgafu: 助教你好帥 穿制服看起來跟大一新生幾乎沒兩樣呀!!! 10/13 20:05