[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-314868-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-314868-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","beijing-national-day-school-department-of-mathematics-computer-science-apc-computer-science-a-semester-1-exam","Beijing National Day School Department of Mathematics & Computer Science - APC Computer Science A - Semester 1 Exam","","Semester 1 AP Computer Science A exam from Beijing National Day School, Department of Mathematics & Computer Science. The paper includes an exam record section with point breakdowns for multiple choice, free response, and practical coding, followed by Section I Multiple Choice (20 questions). Questions evaluate Java fundamentals such as class design, constructors, getters/setters, conditional logic, string manipulation with substring, nested loops and output behavior, array updates, 2D array indexing, and accumulator-based methods with return values or printed results.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/beijing-national-day-school-department-of-mathematics-computer-science-apc-computer-science-a-semester-1-exam/314868/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/beijing-national-day-school-department-of-mathematics-computer-science-apc-computer-science-a-semester-1-exam/314868.png","ImageObject",300,407,{"name":42,"@type":43},"Sarah ","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-04","2026-09-20",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",11,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is the grading breakdown shown in the exam record?","Question",{"text":63,"@type":64},"The exam record lists Multiple Choice (20 points), Free Response (18 points), and Practical Coding (2 points), for a Total of 40 points.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How are multiple-choice answers intended to be submitted?",{"text":68,"@type":64},"The instructions indicate selecting the correct option by filling in the corresponding bubble on a separate answer sheet.",{"name":70,"@type":61,"acceptedAnswer":71},"What Java topics are assessed in the multiple-choice section?",{"text":72,"@type":64},"The questions cover class fields and methods (getters/setters and constructors), conditional statements, string substring operations, nested loops and printed output, array and 2D array computations, and method return values.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},314868,1789981513,{"code":4,"msg":82,"data":83},"success",[84,88,92,95,100,105,110,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":93,"slug":94},70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":102,"show_sort_weight":103,"slug":104},6,"Technology",50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":96,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":33,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":146,"preview_page_count":4},962085320529,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","Beijing National Day School Department of Mathematics & Computer Science  \nAP Computer Science A  \nSemester 1 Exam  \nEnglish Name:  \nPinyin Name:  \nMr. Alwin Tareen, January 2020  \nExam Record  \nMultiple Choice  / 20 pts Free Response  / 18 pts Practical Coding  / 2 pts Total:  / 40 pts  \nGrade:  \nAPCSA/S1E { Page 2 of 22 {  \nSection I: Multiple Choice (20 points)  \n􀀏 Number of questions: 20 . Percent of total grade: 50% .  \n􀀏 Determine the answer to each of the following questions, using the available space for any necessary scratchwork.  \n􀀏 Decide which is the best of the choices given, and select the correct answer by 􀀌lling in the corresponding bubble on the separate answer sheet.  \n􀀏 Assume that the classes in the Java Quick Reference have been imported where needed.  \n􀀏 Assume that variables and methods are declared within the context of an enclosing class.  \n(1pt) 1. Consider the following class declaration.  \npublic class Person {  \nprivate String myName;  \nprivate int myYearOfBirth;  \npublic Person(String name, int yearOfBirth){  \nmyName = name;  \nmyYearOfBirth = yearOfBirth;}  \npublic String getName()  \n{ return myName; }  \npublic void setName(String name)  \n{ myName = name; }}  \nAssume that the following declaration has been made.  \nPerson student = new Person(\"Thomas\", 1995);  \nWhich of the following statements is the most appropriate for changing the name of student from \"Thomas\" to \"Tom\"?  \nA  student = new Person(\"Tom\", 1995);  \n B  student .myName = \"Tom\";  \n C  student .getName(\"Tom\")  \n D  student .setName(\"Tom\");  \n E  Person .setName(\"Tom\");  \n\n|  |\n| --- |\n| 1 pt |\n\nAPCSA/S1E { Page 3 of 22 {  \n(1pt) 2. What is printed when the following code segment executes, and we have x = 4 and y = 3?  \nif (!(x \u003C 3 || y > 2))  \nSystem .out .println(\"first case\"); else  \nSystem .out .println(\"second case\");  \nA  first case  \n B  second case  \n C  first case second case  D  Nothing is printed out.  \n E  It will give a run-time error.  \n(1pt) 3. Consider the following method:  \npublic static String scramble(String word, int howFar){  \nreturn word .substring(howFar+1,word .length()) + word .substring(0,howFar);}  \nWhat value is returned as a result of the call scramble(\"compiler\", 3)?  A  \"compiler\"  \n B  \"pilercom\"  \n C  \"ilercom\"  \n D  \"ilercomp\"  \n E  No value is returned because an IndexOutOfBoundsException will be thrown.  \n(1pt) 4. Consider the following method:  \npublic String mystery(String input){  \nString output = \"\";  \nfor (int k = 1; k \u003C input.length(); k = k+2){  \noutput += input .substring(k, k+1);}  \nreturn output;}  \nWhat value is returned as a result of the call mystery(\"computer\")?  A  \"computer\"  \nB \"cmue\"  \nC \"optr\"  \n D  \"ompute\"  \n E  Nothing is returned because an IndexOutOfBoundsException is thrown.  \n|  |\n| --- |\n| 1 pt |\n\n\n|  |\n| --- |\n| 1 pt |\n\n\n|  |\n| --- |\n| 1 pt |\n\nAPCSA/S1E { Page 4 of 22 {  \n(1pt) 5. How many asterisk characters(*) are printed to the display, when the following code segment is executed?  \nfor (int i = 0; i \u003C 5; i++){  \nfor (int j = 0; j \u003C 5; j++){  \nSystem .out .println(\"*\");}  \n}  \nA  10  \n B  5  \n C  25  \n D  50  \n E  30  \n\n|  |\n| --- |\n| 1 pt |\n\n(1pt) 6. What does the following code segment print to the display?  \nfor (int k = 0; k \u003C 20; k += 2){  \nif (k % 3 == 1)  \nSystem .out .println(k + \" \");}  \n A  4 16  \n B  4 10 16  \n C  0 6 12 18  \n D  0 1 4 7 10 13 16 19  E  10 16 18  \n\n|  |\n| --- |\n| 1 pt |\n\n(1pt) 7. Given the following values of nums and the method doubleLast, what will the array nums contain after you execute doubleLast() ?  \nprivate int[] nums = {-10, -5, 1, 4, 8, 30};  \npublic void doubleLast(){  \nfor (int i = nums.length/2; i \u003C nums.length; i++){  \nnums[i] = nums[i] * 2;}  \n}  \nA  f-20, -10, 2, 8, 16, 60g  B  f-20, -10, 2, 4, 8, 30g  C  f-10, -5, 1, 8, 16, 60g  D  f-10, -5, 1, 4, 8, 30g  E  f4, 8, 30, -10, -5, 1g  \n\n|  |\n| --- |\n| 1 pt |\n\nAPCSA/S1E { Page 5 of 22 {  \n(1pt) 8. Given the following code segment, what is the value of sum after this code execute","cbCailEO1YTeFXds","https://ap.wps.com/l/cbCailEO1YTeFXds","pdf",247352,22,"English","# Section I: Multiple Choice\n## Questions (1-12 and beyond)","[{\"question\":\"What is the grading breakdown shown in the exam record?\",\"answer\":\"The exam record lists Multiple Choice (20 points), Free Response (18 points), and Practical Coding (2 points), for a Total of 40 points.\"},{\"question\":\"How are multiple-choice answers intended to be submitted?\",\"answer\":\"The instructions indicate selecting the correct option by filling in the corresponding bubble on a separate answer sheet.\"},{\"question\":\"What Java topics are assessed in the multiple-choice section?\",\"answer\":\"The questions cover class fields and methods (getters/setters and constructors), conditional statements, string substring operations, nested loops and printed output, array and 2D array computations, and method return values.\"}]","Beijing National Day School Department of Mathematics & Computer Science - APC Computer Science A - Semester 1 Exam | PDF",1789901986,55]