M11/5/COMSC/HP2/ENG/TZ0/XX/M MARKSCHEME. May 2011 COMPUTER SCIENCE. Higher Level. Paper pages

Similar documents
Do not open this examination paper until instructed to do so. Answer all the questions.

N08/5/COMSC/HP2/ENG/TZ0/XX/M+ MARKSCHEME. November 2008 COMPUTER SCIENCE. Higher Level. Paper pages

N02/650/H(2)M+ MARKSCHEME. November 2002 COMPUTER SCIENCE. Higher Level. Paper pages

MARKSCHEME. May 2007 COMPUTER SCIENCE. Higher Level. Paper 2 M07/5/COMSC/HP2/ENG/TZ0/XX/M+ 15 pages

Markscheme November 2016 Computer science Higher level Paper 1

About this exam review

Do not open this examination paper until instructed to do so. Answer all the questions.

Dynamic Data Structures

Example Candidate Responses. Cambridge International AS & A Level Computer Science. Paper 3

CS61BL Summer 2013 Midterm 2

GCE Computing. COMP3 Problem Solving, Programming, Operating Systems, Databases and Networking Summer Version: 1.0

Pace University. Fundamental Concepts of CS121 1

CSE373 Fall 2013, Second Midterm Examination November 15, 2013

Solution for Data Structure

Multiple choice questions. Answer on Scantron Form. 4 points each (100 points) Which is NOT a reasonable conclusion to this sentence:

Student Performance Q&A:

The combination of pointers, structs, and dynamic memory allocation allow for creation of data structures

Programming 2. Topic 8: Linked Lists, Basic Searching and Sorting

MARK SCHEME for the May/June 2006 question paper 9691 COMPUTING

Section 1: True / False (2 points each, 30 pts total)

DEEPIKA KAMBOJ UNIT 2. What is Stack?

Assignment 8 CSCE 156/156H/RAIK 184H Spring 2017

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT COMPUTER NETWORKS APRIL 2015 EXAMINERS REPORT

QUIZ. What is wrong with this code that uses default arguments?

COMP171. Hashing.

CS 3114 Data Structures and Algorithms DRAFT Project 2: BST Generic

Computer Science E-22 Practice Final Exam

Arrays and Linked Lists

Classes, interfaces, & documentation. Review of basic building blocks

Computer science Higher level Paper 1

MARK SCHEME for the November 2005 question paper 9691 COMPUTING

QUIZ on Ch.5. Why is it sometimes not a good idea to place the private part of the interface in a header file?

CS314 Exam 1 - Fall Suggested Solution and Criteria 1

Chapter 20: Binary Trees

BBM 201 DATA STRUCTURES

Introduction to Programming Using Java (98-388)

CMSC 341 Lecture 7 Lists

Chapter 6 Introduction to Defining Classes

UNIT 6A Organizing Data: Lists Principles of Computing, Carnegie Mellon University

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT OBJECT ORIENTED PROGRAMMING

COMP3 (JUN13COMP301) General Certificate of Education Advanced Level Examination June 2013

Autumn 2012 November 7 th 9 th, 2012 Section Solution

CS2110 Assignment 2 Lists, Induction, Recursion and Parsing, Summer

Midterm Exam #2 Solutions October 25, 2016 CS162 Operating Systems

That means circular linked list is similar to the single linked list except that the last node points to the first node in the list.

CS32 Discussion Sec.on 1B Week 2. TA: Zhou Ren

MARK SCHEME for the October/November 2012 series 9691 COMPUTING. 9691/33 Paper 3 (Written Paper), maximum raw mark 90

Java objects: a first view [Reading: chapters 1 & 2] CSC 142 B 1

Object Oriented Programming

EXAMINATION INSTRUCTIONS

Section 1: True / False (1 point each, 15 pts total)

CS 231 Data Structures and Algorithms, Fall 2016

CSE030 Fall 2012 Final Exam Friday, December 14, PM

CSCI E-119 Section Notes. Section 5 Solutions

UNIT 6A Organizing Data: Lists. Last Two Weeks

l Determine if a number is odd or even l Determine if a number/character is in a range - 1 to 10 (inclusive) - between a and z (inclusive)

Programming for the Web with PHP

Largest Online Community of VU Students

CS2210 Data Structures and Algorithms

Data Structure Series

Answer key SUBJECT : COMPUTER SCIENCE Time : 3 hour 15 min Max. marks : 70

Final Examination CS 111, Fall 2016 UCLA. Name:

CSE 332 Winter 2015: Midterm Exam (closed book, closed notes, no calculators)

Do not start the test until instructed to do so!

Department of Computer Science Admission Test for PhD Program. Part I Time : 30 min Max Marks: 15

WYSE Academic Challenge Computer Science Test (State) 2015 Solution Set

HASH TABLES. Hash Tables Page 1

Summer Final Exam Review Session August 5, 2009

Memory Management Prof. James L. Frankel Harvard University

Points off Total off Net Score. CS 314 Final Exam Spring Your Name Your UTEID

Standard 2: Problem Solving

Students received individual feedback throughout year on assignments.

CSE wi Midterm Exam 2/8/18. Name UW ID #

Algorithms and Data Structures

King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department

BAHAUDDIN ZAKARIYA UNIVERSITY Department of Information Technology

Computer Science 62. Bruce/Mawhorter Fall 16. Midterm Examination. October 5, Question Points Score TOTAL 52 SOLUTIONS. Your name (Please print)

B-Trees. Based on materials by D. Frey and T. Anastasio

CS 171: Introduction to Computer Science II. Linked List. Li Xiong

Computer Science 302 Spring 2007 Practice Final Examination: Part I

NATIONAL UNIVERSITY OF SINGAPORE

OCR H446 A-Level Computer Science

Ashish Gupta, Data JUET, Guna

Midterm #2 Exam Solutions April 26, 2006 CS162 Operating Systems

DIPLOMA IN PROGRAMMING WITH DOT NET TECHNOLOGIES

ECE 190 Final Exam. Practice exam

INSTRUCTIONS TO CANDIDATES INFORMATION FOR CANDIDATES. Computer Science (A Level)

Unit 1 Computer Systems, Programming and Networking Concepts

CS314 Fall 2011 Midterm 1 Solution and Grading Criteria.

Midterm Exam (REGULAR SECTION)

Midterm Exam Solutions Amy Murphy 28 February 2001

Aggregation. Chapter 8. Java By Abstraction Chapter 8. Outline. 8.1 What is Aggregation? Copyright 2006 Pearson Education Canada Inc.

Trees 2: Linked Representation, Tree Traversal, and Binary Search Trees

CS201 ArrayLists, Generics, and Dynamic Data Structures (Chapters 14, 15)

Ticket Machine Project(s)

Communication technologies

CS 315 Data Structures mid-term 2

UNDERSTANDING CLASS DEFINITIONS CITS1001

MARK SCHEME for the October/November 2013 series 9691 COMPUTING. 9691/31 Paper 3 (Written Paper), maximum raw mark 90

(VERSION WITH ANSWERS) CORE EXAMINATION Department of Computer Science New York University September 26, 2008

Transcription:

M11/5/COMSC/HP2/ENG/TZ0/XX/M MARKSCHEME May 2011 COMPUTER SCIENCE Higher Level Paper 2 13 pages

2 M11/5/COMSC/HP2/ENG/TZ0/XX/M This markscheme is confidential and for the exclusive use of examiners in this examination session. It is the property of the International Baccalaureate and must not be reproduced or distributed to any other person without the authorization of IB Cardiff.

3 M11/5/COMSC/HP2/ENG/TZ0/XX/M General Marking Instructions Subject Details: Computer Science HL Paper 2 Markscheme Mark Allocation Candidates are required to answer ALL questions [20 marks] for question 1, [20 marks] for question 2, [20 marks] for question 3 and [40 marks] for question 4. Maximum total = [100 marks]. General A markscheme often has more specific points worthy of a mark than the total allows. This is intentional. Do not award more than the maximum marks allowed for that part of a question. When deciding upon alternative answers by candidates to those given in the markscheme, consider the following points: Each statement worth one point has a separate line and the end is signified by means of a semi-colon (;). An alternative answer or wording is indicated in the markscheme by a / ; either wording can be accepted. Words in ( ) in the markscheme are not necessary to gain the mark. If the candidate s answer has the same meaning or can be clearly interpreted as being the same as that in the markscheme then award the mark. Mark positively. Give candidates credit for what they have achieved, and for what they have got correct, rather than penalising them for what they have not achieved or what they have got wrong. Occasionally, a part of a question may require a calculation whose answer is required for subsequent parts. If an error is made in the first part then it should be penalized.

4 M11/5/COMSC/HP2/ENG/TZ0/XX/M 1. (a) Award up to [3 marks max]. Encapsulation; Data hiding; This data cannot be (directly) changed / accessed outside of this class (as the data is private ); As data can only be changed via the transformer methods / viewed using the accessor methods; Thus preventing accidental alteration of data; Creates abstraction of the object; Enhances security / protects the integrity of the data; (b) (c) (d) Award marks as follows up to [3 marks max]. Award [1 mark] for signature line with 2 parameters; Award [1 mark] for of type String; Award [1 mark] for correct assignments (with or without this) allow use of transformer methods); Example answer: public Seat(String x, String y) this.seatname = x; this.passengername = y; Two-dimensional array; Of Seat objects; With 4 rows and 10 columns / 4 10 / 10 4 ; Also, award for code that sufficiently shows the above, such as Seat[][] seatarray = new Seat[4][10];. Award marks as follows up to [5 marks max]. Award [1 mark] for initializing and incrementing the counter; Award [1 mark] for correct nested loops; Award for correct comparison, award only [1 mark] if accessor is not used (do not allow if (seatarray[x][y] == null); Award [1 mark] for returning the counter; Example answer: public int seatsremaining() int count = 0; for (int x = 0; x < 10; x = x + 1) for (int y = 0; y < 4; y = y + 1) if (seatarray[x][y].getpassengername() == null) count = count + 1; return count; Indices can be reversed in parts (d) and (e). [5 marks] continued

5 M11/5/COMSC/HP2/ENG/TZ0/XX/M Question 1 continued (e) Award marks as follows up to [4 marks max]. Award [1 mark] for initializing the reply / returning no seats message; Award [1 mark] for correct loop; Award for correct comparison for both window seats, award only [1 mark] if accessor is not used; Award [1 mark] for returning the seat name; Note: For parts (d) and (e) only penalise once if the accessor methods are omitted. Example answer: public String freewindowseat() String reply = "No Seats Remaining"; for (int x = 0; x < 10; x = x + 1) if (seatarray[x][0].getpassengername() == null) return seatarray[x][0].getseatname(); if (seatarray[x][3].getpassengername() == null) return seatarray[x][3].getseatname(); return reply; Full marks can also be gained using a nested loop. [4 marks] (f) Award up to [2 marks max]. A three-dimensional array could be used; Assuming both levels held the same number of seats; With the third dimension representing the level; Accept code such as Seat[][][] seatarray = new Seat[4][10][2]; for. Making the array larger e.g. the number of columns could be increased; To allow for the extra seats in the upper deck; A second array could be used; Especially for the upper deck; For any theoretically possible but improbable structure award [1 mark]. Total: [20 marks]

6 M11/5/COMSC/HP2/ENG/TZ0/XX/M 2. (a) Award marks as follows up to [2 marks max]. Award [1 mark] for correct position of node connected in some ways; Award [1 mark] for pointers between nodes (don t accept plain lines); Award [1 mark] for correct position of first (or equivalent) and null (or equivalent); (b) Award marks as follows if the student s meaning is clear either through the description or through the diagrams, up to [2 marks max]. Award [1 mark] if the correct position is found; Award [1 mark] if the previous node s next pointer is changed to point to the new node; Award [1 mark] if the new node s next pointer points to the next node; Note: The pointers must be explicitly referred to in the description or clearly shown on the diagram. (c) Award marks either for an explanation or by showing the code. The constructor is called; The data Xiao, 1920, null is passed to the constructor; Node newnode = new Node(Xiao, 1920, null); (d) Award marks as follows up to [2 marks max]. Award [1 mark] for testing for an empty list; Award [1 mark] for removing the first node; public void removeleast() if (first!= null) first = first.next; continued

7 M11/5/COMSC/HP2/ENG/TZ0/XX/M Question 2 continued (e) Award marks as follows up to [8 marks max]. Award [1 mark] for use of temp variable (or equivalent); Award [1 mark] for use of previous variable (or equivalent); Award for each of the two elements in the loop (as shown below); Award [1 mark] for changing the value of temp to allow for traversal; Award [1 mark] for creation of a new node (with any pointer value); Award [1 mark] for identifying that there is more than one scenario (empty list / not empty list / first node etc.) and attempting to address them; Award [2 mark] for correctly placing new node for all scenarios and [1 mark] for successfully placing new node for just 1 of the scenarios; Example answer 1: public void addnode(string name, int year) Node temp = first; Node previous = null; while (temp!= null && temp.yearofbirth < year) // or <= previous = temp; temp = temp.next; Node newnode = new Node(name, year, temp); //create new node if (previous == null) // if newnode becomes the first node // or empty list first = newnode; else // otherwise previous.next = newnode; Notes: Remember that we are testing the logic and not specifically the syntax. The year comparison can be correctly placed within the loop. There are alternatives to the previous variable (e.g. using temp.next!= null where temp is equivalent to previous). continued

8 M11/5/COMSC/HP2/ENG/TZ0/XX/M Question 2 continued Example answer2: public void addnode(string name, int year) if (first == null) // empty list first = new Node(name, year, null); else Node temp = first; if (first.yearofbirth > year) // 1 st node in non-empty list first = new Node(name, year, first); else // otherwise while (temp.next!= null) if (temp.next.yearofbirth > year) break; else temp = temp.next; temp.next = new Node(name, year, temp.next); (f) (i) BigO for removal is O(1); Because the correct node is always pointed to by first / at the start of the list / the method is independent of the number of nodes / has 1 assignment only; [8 marks] BigO for addition is O(n); Because the list might have to be traversed to the end / have to pass each of the nodes currently in the list / number of comparisons is proportional to the number of nodes; Total: [20 marks]

9 M11/5/COMSC/HP2/ENG/TZ0/XX/M 3. (a) (i) Award up to [2 marks max]. Award [1 mark] for the idea of going through the file in order / each record in turn until the (correct) record is found; Award [1 mark] for any further point from the list below: Starting with the first record on the file; The search item / ID number is searched for / compared; Continues until the end of file (if record not found); Or the end file is reached; Award up to [2 marks max]. Because the file is very large; The search process could be slow; With O(n) efficiency; As records have to be inspected in the order they are stored; So might have to inspect many records; (b) (i) Award up to [4 marks max]. A calculation is performed / hash key produced; On the key field / ID number; Which gives/leads to/identifies the address of the record on the disk; Access is direct / O(1); Example of hash algorithm; Describes use of hash table; Possible collisions have to be taken care of; Records would have to be of equal length; [4 marks] Must generate all of the record addresses in the file; Should be fast (to calculate); Should minimise collisions / accept no collisions; (c) (i) Award up to [2 marks max]. If you could hash the surname this would generate different addresses/hashes; Than those generated by the ID number; Two hash tables would be needed; Cannot hash for two different fields; Award up to [3 marks max]. Two indexes would be created; One for the ID and one for the surname; (User) can choose which index to use; Each index would contain an entry for every search item/full index; A search of the (appropriate) index would provide the memory location of the required record; Note: Do not accept 1 index for 2 fields. continued

10 M11/5/COMSC/HP2/ENG/TZ0/XX/M Question 3 continued (d) (i) Award up to [2 marks max]. If the number of entries changes; A dynamic structure expands/contracts to the required size; Which prevents wasted memory / too little space; Note: Do not accept references to modification of the data structure. A binary tree provides a faster search algorithm / searches faster / binary search; O(log n) as opposed to O(n) for a linked list; Total: [20 marks]

11 M11/5/COMSC/HP2/ENG/TZ0/XX/M 4. (a) Award up to [2 marks max]. If a plane s status is changed; The FIDS display system could be updated automatically / in real time; As the flight movements are controlled by ATC; (b) (i) Award up to [1 mark max]. Fibre optic / Wi-Fi / Ethernet cable (not just cable); [1 mark] Award up to [2 marks max] for suggesting one reason [1 mark] and expansion [1 mark], or for suggesting two reasons [2 mark]. (Fibre optic) would allow fast communication around the network; Which is important for coordination between the different systems / which is essential for critical systems; High bandwidth; So can accommodate many systems at the same time; Less noise than traditional media / high integrity of data; (Wi-Fi) could allow airport / security personnel; To access the network; From portable devices; (c) (Ethernet) allows fast transfer of data; Reliable / well-established medium; Retina scans (any biometrics will do); Are unique to each individual; Turns features into mathematical expressions; Will compare a person s characteristics with a central database; (d) Award [1 mark] for each feature and [1 mark] for a description that clearly shows its benefit, up to [4 marks max]. Note: Only credit features that are present inside of the airport. Modern display; Give up-to-date information on plane movement; Improved sound systems; Provide clear audio information; Self-service check-in; Speeds up check-in / avoids queuing: Wi-Fi systems; Allow passengers to connect to the Internet; [4 marks] continued

12 M11/5/COMSC/HP2/ENG/TZ0/XX/M Question 4 continued (e) Award marks as follows up to [5 marks max]. Award for a clear description of the advantage; Award for a clear description of the disadvantage; Award [1 mark] for a conclusion / summary / opinion; For example, the baggage system there will be others (but only credit those systems that operate within an airport). Computerized systems move bags around the airport very quickly; Allows passengers to make connections / avoids loss of bags; However, if system breaks down there will be chaos; As personnel to help will be limited; Plus a substantiated overall opinion; Note: Award [3 marks max] for non-airport system such as PNR. (f) (i) Security would be able to see illegal access; As tags will identify location of each passenger; [5 marks] Passengers who have not boarded; Can be quickly located thereby avoiding delays; (g) (i) Award up to [4 marks max]. Would allow them to test different systems; Without having to actually build them / to find the best; Saves considerable time (in the development cycle) / money; As (supposedly) less chance of final system going wrong; By simulating a system they could detect problems; And correct them at the design stage / less chance of failure / improve the system; Award up to [3 marks max]. Requirements change over time; Better software/hardware becomes available; There may have been unforeseen problems with the original design / bugs; Maintenance allows for beneficial changes to be made; [4 marks] (h) Wi-Fi transmissions can be easily intercepted; As they travel through the air / by anyone in the same area; Encryption prevents the understanding of any intercepted messages; continued

13 M11/5/COMSC/HP2/ENG/TZ0/XX/M Question 4 continued (i) Award up to [4 marks max]. The tree would be initially populated with the passengers names; (In such as way) so that an in-order traversal; Will produce an ordered list; Each node will also contain a link to the main file; So that all details can be accessed / where the details are stored; [4 marks] (j) (i) A linked list; Of 11 nodes / items; Where each node contains details of departing flight / Flight object; An array; Of size 11; Where each index stores details of departing flight / Flight object; Note: No credit for queue, but Follow Through credit can be given in part. Award up to [3 marks max]. Correct flight (found and) deleted; By changing pointers; Next flight due to depart added; To end of list; Find the departed flight in the array; Shift all later flight down 1 index position; Next flight due to depart added; At end of array (index 10); Total: [40 marks]