文档详情

2013上半年软考程序员下午试题以与答案.doc

发布:2017-06-14约1.05万字共16页下载文档
文本预览下载声明
2013年上半年 程序员 下午试题参考答案与评分标准 程序员下午试题共六题,试题一至试题四为必答题,试题五至试题六选择一题解答。每题15分,满分75分。 若解答正确给满分;若答出部分要点,可酌情给分,但不给满分。 试题一(共15分) (1)0 或 任意一个负数 (3分) (2)(u(i,j+1)+u(i,j-1)+u(i-1,j)+u(i+1,j))/4 或等价表示 (3分) (3)max (3分) (4)new 或 ((u(i,j+1)+u(i,j-1)+u(i-1,j)+u(i+1,j))/4 或等价表示 (3分) (5)max (3分) 试题二(共15分) (1)date.month (3分) (2)date.month 2 或其等价形式 (3分) (3)DATE (3分) (4)theyear (3分) (5)days_month[i-1] 或其等价形式 (3分) 试题三(共15分) (1)i N+1 或其等价形式 (3分) (2)k++ 或 ++k 或其等价形式 (3分) (3)k N 或k = N+1 或其等价形式 (3分) (4)i+k 或其等价形式 (3分) (5)sieve[i] = 0 或其等价形式 (3分) 试题四(共15分) (1)1 (3分) (2)q-next 或 p-next-next (3分) (3)0 (3分) (4)p-next (3分) (5)p-code (3分) 试题五(共15分) (1)virtual double getGPA()=0 (3分) (2)Student(stuNo,name, gs) (2分) (3)computeWg() + Apoints 或Student::computeWg() + Apoints (3分) (4)Student(stuNo,name, gs) (2分) (5)computeWg() + Awards 或 Student::computeWg() + Awards (3分) (6)students[i]-getGPA() (2分) 试题六(共15分) (1)abstract double getGPA() (3分) 注: 考生若在上述答案之前加public 或 protected不扣分 (2)super(stuNo, name, grades) (2分) (3)computeWg() + Apoints 或 puteWg() + Apoints (3分) (4)super(stuNo, name, grades) (2分) (5)computeWg() + totalAwards或puteWg() + totalAwards (3分) (6)students[i]. getGPA() (2分)
显示全部
相似文档