AP计算机科学A简答题2019卷

更新时间:2023-07-16 05:48:55 阅读: 评论:0

2019
AP®          Computer Science A
Free-Respon Questions
© 2019 The College Board. College Board, Advanced Placement, AP, AP Central, and the acorn logo are
registered trademarks of the College Board. Visit the College Board on the web: collegeboard.
AP Central is the official online home for the AP Program: .

COMPUTER SCIENCE A
SECTION II
Time 1 hour and 30 minutes
Number of questions —4
Percent of total score —50
Directions:  SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA.
Notes:
    Assume that the interface and class listed in the Java Quick Reference have been imported where appropriate.
    Unless otherwi noted in the question, assume that parameters in method calls are not  null  and that methods are called only when their preconditions are satisfied.
    In writing solutions公证委托书模板 for each question, you may u any of the执子之手什么意思 accessible methods that are listed in class defined in that question. Writing significant amounts of code that can be replaced by a call to one of the methods will not receive full credit.
© 2019 The 腿无力是什么原因College Board.
Visit the College Board on the web: collegeboard.
GO ON TO THE NEXT PAGE.
-2-

1.  The  APCalendar  class contains methods ud to calculate information about a calendar. You will write two methods of the class.
public  class  APCalendar
{
/**  Returns  true  if  year  is a leap year and  fal  otherwi.  */
袁隆平作文素材
private  static  boolean  isLeapYear(int  year)
{    /*  implementation 海南省大学排名not shown  */      }
/**  Returns the number of leap years世界第一大党 between  year1  and  year2,  inclusive.
*    Precondition:  0  <=  year1  <=  year2
*/
public  static  int  numberOfLeapYears(int  year1,  int  year2)
{    /*  to be implemented in part (a)  */      }
/**  Returns the value reprenting the day of the week for the first day of在乎近义词  year,  *    where  0  denotes Sunday,  1  denotes Monday, ..., and  6  denotes Saturday. */
private  static  int  firstDayOfYear(int  year)
{面试步骤    /*  implementation not shown  */      }
/**  Returns n, where  month,  day,  and  year  specify the nth day of the year.  *    Returns  1  for January 1 (month  =  1,  day  =  1)  of any year.                      *    Precondition: The date reprented by  month,  day,  year  is a valid date. */
private  static  int  dayOfYear(int  month,  int  day,  int  year)
{    /*  implementation not shown  */      }
/**  Returns the value reprenting the day of the week for the given date
*    (month,  day,  year),  where  0  denotes Sunday,  1  denotes Monday, ...,
*    and  6  denotes Saturday.
*    Precondition: The date reprented by  month,  day,  year  is a valid date. */
public  static  int  dayOfWeek(int  month,  int  day,  int  year)
{    /*  to be implemented in part (b)  */      }
//  There may be instance variables, constructors, and other methods not shown. }

本文发布于:2023-07-16 05:48:55,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1099086.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:模板   无力   素材   近义词   面试   委托书   原因   作文
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图