Software Development Techniques. December Sample Exam Marking Scheme

Similar documents
Software Development Techniques. December Sample Examination Paper. Time: 3 hours

Software Development Techniques. 26 November Marking Scheme

Introduction to Programming. June Marking Scheme

Fundamentals of Computing and Digital Literacy. Sample. Assignment title: Develop a Wiki. Marking Scheme

Fundamentals of Computing and Digital Literacy. Sample. Marking Scheme

Network Security and Cryptography. 2 September Marking Scheme

IT Skills. September Marking Scheme

Network Security and Cryptography. December Sample Exam Marking Scheme

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

Cambridge Assessment International Education Cambridge International Advanced Subsidiary and Advanced Level. Published

CS302: Self Check Quiz 2

A Beginner s Guide to Programming Logic, Introductory. Chapter 6 Arrays

Mark Scheme. Additional Sample Assessment Materials. Pearson BTEC Level 3 - Computing. Unit 1: Principles of Computer Science

Programming Logic and Design Sixth Edition

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

Introduction to Computer Science Midterm 3 Fall, Points

Designing and Developing a Website. 6 August Marking Scheme

Course Outline. Introduction to java

Cambridge Assessment International Education Cambridge International Advanced Subsidiary and Advanced Level. Published

State two analytical tools used to understand feasibility of a proposed application. Acceptable answer(s) Guidance Max mks


Scheme of work Cambridge International AS & A Level Computing (9691)

Cambridge Assessment International Education Cambridge International General Certificate of Secondary Education. Published

Chapter 4: Control structures. Repetition

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

Chapter 4: Control structures

Introduction to C Programming

Designing and Developing a Website. December Sample Exam Marking Scheme

Cambridge Assessment International Education Cambridge Ordinary Level. Published

Selec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Spring 2016 Howard Rosenthal

CS 142 Style Guide Grading and Details

Cambridge International Examinations Cambridge International Advanced Level

Sequence structure. The computer executes java statements one after the other in the order in which they are written. Total = total +grade;

Unit-II Programming and Problem Solving (BE1/4 CSE-2)

Introduction. C provides two styles of flow control:

Outline. Program development cycle. Algorithms development and representation. Examples.

Selec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Fall 2016 Howard Rosenthal

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

Chapter 4 The If Then Statement

Individual research task. You should all have completed the research task set last week. Please make sure you hand it in today.

Higher Software Development - Section 1a

Repetition Structures

Condition-Controlled Loop. Condition-Controlled Loop. If Statement. Various Forms. Conditional-Controlled Loop. Loop Caution.

1 Lexical Considerations

Cambridge Assessment International Education Cambridge International Advanced Subsidiary and Advanced Level. Published

Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100

Lab 2: Structured Program Development in C

CS110D: PROGRAMMING LANGUAGE I

Cambridge International Examinations Cambridge International Advanced Subsidiary and Advanced Level

Definition: A data structure is a way of organizing data in a computer so that it can be used efficiently.

CS313D: ADVANCED PROGRAMMING LANGUAGE

CSCI 161 Introduction to Computer Science

COURSE OF STUDY UNIT PLANNING GUIDE COMPUTER SCIENCE 1 FOR: 5 CREDITS GRADE LEVEL: 9-12 FULL-YEAR COURSE PREPARED BY: SUSIE EISEN

GCSE Computer Science

Final Examination Semester 3 / Year 2010

In Fig. 3.5 and Fig. 3.7, we include some completely blank lines in the pseudocode for readability. programs into their various phases.

PLD Semester Exam Study Guide Dec. 2018

COP 1220 Introduction to Programming in C++ Course Justification

Code No: R Set No. 1

STUDENT LESSON A12 Iterations

Topics. Chapter 5. Equality Operators

BITG 1223: Selection Control Structure by: ZARITA (FTMK) LECTURE 4 (Sem 1, 16/17)

CS3 Midterm 1 Fall 2006

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Cambridge International Examinations Cambridge International Advanced Subsidiary and Advanced Level

Cambridge International Examinations Cambridge Ordinary Level

Computer Systems. December Sample Exam Marking Scheme

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

Higher Computing Science Software Design and Development - Programming Summary Notes

Unit 2: Creating Systems to Manage Information - Sample marking grid

CS 1316 Exam 1 Summer 2009

CS111: PROGRAMMING LANGUAGE II

STUDENT OUTLINE. Lesson 8: Structured Programming, Control Structures, if-else Statements, Pseudocode

CSc 10200! Introduction to Computing. Lecture 4-5 Edgardo Molina Fall 2013 City College of New York

Multiple Choice (Questions 1 13) 26 Points Select all correct answers (multiple correct answers are possible)

1. a) What #include statement do you put at the top of a program that does uses cin, cout or endl?

CSCI 1301: Introduction to Computing and Programming Spring 2019 Lab 10 Classes and Methods

Assignment 6: The Power of Caches

Review for Test 1 (Chapter 1-5)

Chapter 4: Making Decisions. Copyright 2012 Pearson Education, Inc. Sunday, September 7, 14

DEPARTMENT OF COMPUTER AND MATHEMATICAL SCIENCES UNIVERSITI TEKNOLOGI MARA CAWANGAN PULAU PINANG

APCS Semester #1 Final Exam Practice Problems

CSCI 1301: Introduction to Computing and Programming Summer 2018 Lab 07 Classes and Methods

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

CS4411 Intro. to Operating Systems Exam 1 Fall points 10 pages

McGill University School of Computer Science COMP-202A Introduction to Computing 1

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual

Programming Language Concepts, cs2104 Lecture 01 ( )

CSE101-lec#12. Designing Structured Programs Introduction to Functions. Created By: Amanpreet Kaur & Sanjeev Kumar SME (CSE) LPU

Outline. policies. with some potential answers... MCS 260 Lecture 19 Introduction to Computer Science Jan Verschelde, 24 February 2016

Chapter 4: Making Decisions

Chapter 12 Variables and Operators

Variables, Types, Operations on Numbers

Cambridge International General Certificate of Secondary Education 0478 Computer Science June 2015 Principal Examiner Report for Teachers

LECTURE 04 MAKING DECISIONS

Total Test Questions: 43 Levels: Grades Units of Credit:.50

All copyrights reserved - KV NAD, Aluva. Dinesh Kumar Ram PGT(CS) KV NAD Aluva

ECE 122. Engineering Problem Solving with Java

The design recipe. Readings: HtDP, sections 1-5. (ordering of topics is different in lectures, different examples will be used)

Transcription:

Software Development Techniques December 2015 Sample Exam Marking Scheme This marking scheme has been prepared as a guide only to markers. This is not a set of model answers, or the exclusive answers to the questions, and there will frequently be alternative responses which will provide a valid answer. Markers are advised that, unless a question specifies that an answer be provided in a particular form, then an answer that is correct (factually or in practical terms) must be given the available marks. If there is doubt as to the correctness of an answer, the relevant NCC Education materials should be the first authority. Throughout the marking, please credit any valid alternative point. Where markers award half marks in any part of a question, they should ensure that the total mark recorded for the question is rounded up to a whole mark.

Answer ALL questions Question 1 a) Some programs written in high level programming languages are compiled. Briefly explain what is meant by compilation. Compilation is the process of taking a human readable (1 mark) representation of code (1 mark), and converting (1 mark) it into a form the computer can understand (1 mark). 4 b) Draw ONE (1) diagram that shows the compilation of a program written in a high level language. 3 The maximum number of marks awarded to this question is 3. Award 1 mark for showing a single high level language. Award 2 marks for showing multiple machine code/systems. c) Draw ONE (1) diagram that shows the compilation of a program written in assembly language and outline how it differs to the compilation of a program written in a high-level language. 3 The maximum number of marks awarded to this question is 3. Award 1 mark for showing multiple assembler files. Award 1 mark for multiple machine/code systems. Award 1 mark for a brief description that compares each diagram. Total: 10 Page 2 of 13

Question 2 a) Define the term algorithm and briefly explain what is meant by inputs and outputs. 4 An Algorithm is a series of instructions (1 mark) that manipulate data (1 mark). Input data is read into the algorithm (1 mark) and the algorithm produces some output depending on its purpose (1 mark). b) Identify TWO (2) properties of a good algorithm and provide a short explanation for each property. 4 Award 1 mark for stating each property and 1 mark for a corresponding reason up to a maximum of 4 marks. Properties include: Complete; Robust; Efficient; Readable; Maintainable; and Documented. c) State TWO (2) reasons why we would use pseudocode to write an algorithm. 2 Award 1 mark for each bullet point up to a maximum of 2 marks: It means we are not tied to a specific programming language. It means we can focus on the logic of an algorithm rather than the language specific features. It means we can formally check the correctness on paper. Total: 10 Page 3 of 13

Question 3 a) The following pseudocode algorithm calculates the area of a floor so that a carpet can be fitted that is the correct size. 10 Perform a desk-check on this algorithm using a table to show the values in each variable after the execution of each line. You should assume an input value of 50 for length and 50 for width. 1. data width as whole number 2. data length as whole number 3. data area as whole number 4. output Welcome to the carpet area calculator 5. output What is the width of your floor 6. input width 7. output What is the length of your floor 8. input length 9. area = length * width 10. output For your floor you will need a carpet that is: 11. output area 12. output Thankyou for using this program. The maximum number of marks awarded to this question is 10. Award 1 mark in total for correctly stating lines 1-3. Award 1 mark for each correct line from lines 4-12. Line width length area notes 1 0 0 0 width declared 2 0 0 0 length declared 3 0 0 0 area declared 4 0 0 0 Output 5 0 0 0 Output 6 50 0 0 User inputs 50 7 50 0 0 Output 8 50 50 0 User inputs 50 9 50 50 250 10 50 50 250 Output 11 50 50 250 Output 12 50 50 250 Output Total: 10 Page 4 of 13

Question 4 a) State TWO (2) questions that should be considered when choosing a data type. 2 Award 1 mark for each bullet point up to a maximum of 2 marks: What kind of information you need to store? What kind of manipulations you are going to do to the data? What kind of format will be used for output? How often you might need to change the representation? b) State what data types should be used for the following variables and explain your answer: i) The name of a student 2 ii) iii) iv) Award 1 mark for a correct choice and 1 mark for a valid explanation: String because it is made up of characters The phone number of a student Award 1 mark for a correct choice and 1 mark for a valid explanation: String because it will have a leading zero The age of a student Award 1 mark for a correct choice and 1 mark for a valid explanation: Integer because we usually measure age in whole years The height of a student in metres Award 1 mark for a correct choice and 1 mark for a valid explanation: Real/float because we will have fractional part of a metre 2 2 2 Total: 10 Page 5 of 13

Question 5 a) Briefly explain the difference between a bounded loop and an unbounded loop and provide ONE (1) example of when we might use each type of loop. 4 Bounded Loop When we know how many times we are going to repeat (1 mark). Award 1 mark for relevant example that is clearly suited to a bounded loop. Unbounded Loop When we do not know how many times we are going to repeat (1 mark). Award 1 mark for relevant example that is clearly suited to an bounded loop. Note: A range of valid examples should be credited. b) Write a short pseudocode program that will print out the multiplication table up to 10 for a given input value. For example, if I used the input value of 3 my output would be: 6 1 x 3 = 3 2 x 3 = 6 3 x 3 = 9 4 x 3 = 12 5 x 3 = 15 6 x 3 = 18 7 x 3 = 21 8 x 3 = 24 9 x 3 = 27 10 x 3 = 30 The maximum number of marks awarded to this question is 6. The code should be something similar to this: 1. data uservalue as whole number 2. data counter as integer 3. counter = 1 4. input uservalue 5. loop until counter is equal to 10 6. result = uservalue * counter 7. output counter + x + uservalue + = + result 8. increment counter 9. next loop 10. output Goodbye! should be allocated as follows: 1 mark for using the loop; 1 mark for using a counter; 1 mark for ending at 10; 2 marks for choosing a bound loop; and 1 mark for clarity. The pseudocode does not need to be exact but it does need to be clear. Total: 10 Page 6 of 13

Question 6 a) Write a pseudocode algorithm that determines if a given input value is an odd number. It should make appropriate use of variable names and data types. 6 The maximum number of marks allocated to this question is 6. An example solution is: 1. data usernumber as whole number 2. data remainder as whole number 3. output "Please enter a whole number" 4. input usernumber 5. remainder = usernumber % 2 6. if remainder is!= 0 then 7. output "That's an odd number!" 8. end if 9. output "Goodbye!" are allocated as follows: 2 marks for appropriate use of if statement; 2 marks for correct logical condition; 1 mark for appropriate variable names and 1 mark for appropriate data types. b) Using a nested if statement, write pseudocode that implements the following rule: 4 If it is raining, wear a raincoat and if it is raining and not windy take an umbrella. You should use the following variables: (1) data coat as String; (2) data umbrella as Boolean; (3) data raining as Boolean; and (4) data windy as Boolean; The maximum number of marks allocated to this question is 4. An example solution is: 1. If raining == true then 2. coat = raincoat 3. If windy == true then 4. umbrella = True 5. End if 6. End if Award up to 2 marks for correct logic and award up to 2 marks for correct nested if structure. For full marks, structure is important, but not syntax. Total; 10 Page 7 of 13

Question 7 a) Construct a truth table for the logical equation A OR B AND C. 8 A B C A OR B (A OR B) AND C False False False False False True False True False False True True True False False True False True True True False True True True Award 1 mark for each correct line up to a maximum of 8 marks. A B C A OR B (A OR B) AND C False False False False False False False True False False False True False True False False True True True True True False False True False True False True True True True True False False False True True True True True b) Explain the effect of brackets on the solution to the equation A OR (B AND C). You do not need to create a truth table for this question, although it may help your explanation. Without brackets the logic will be solved in pairs from left to right. By using brackets we are forcing certain parts of the equation to be solved first (1 mark). Therefore in this case (B AND C) will be solved first, and then A OR (B AND C) will be solved ( 1 mark) 2 Total: 10 Page 8 of 13

Question 8 a) State FOUR (4) advantages of using functions in programming. 4 Award 1 mark for each bullet point up to a maximum of 4 marks Breaks problems down into manageable parts Simplifies checking and testing Make it easier to change/expand programs Easier to follow programs b) The following pseudocode program is used to display the times table of the user s choice: 6 1. data userchoice as whole number 2. output Please enter the times table you would like to calculate: 3. input userchoice 4. call timestable(userchoice) 5. output Goodbye! The program uses a function called timestable() to create and display the times table specified in an argument. Write the contents of the function timestable() in pseudocode. The maximum number of marks awarded to this question is 6. Answer should be similar to below although syntax does not need to be precise. Function timestable(needs num as whole number) returning nothing 1. data counter as integer 2. counter = 1 3. loop until counter is equal to 10 4. result = num * counter 5. output counter + x + num + = + result 6. increment counter 7. next loop should be allocated as follows: 1 mark for function keyword; 1 mark for having correct contents; 2 marks for argument; and 1 for correct use of it; and 1 mark for returning nothing. Total 10 Page 9 of 13

Question 9 a) Explain the difference between Black box testing and White Box testing. 5 Black box testing is functional testing (1 mark) and checks the output of the program (1 mark) based on a given input (1 mark). White box testing tests the paths through the code to make sure each is functioning correctly. (1 mark.) It should ensure that all paths through the code are executed (1 mark). b) Briefly discuss why we should perform both black box testing and white box testing. We carry out both because if we get an error in our data we do not know where it has occurred (1), and even if our data provides the correct result, we cannot be sure that all paths will give the correct result (1). c) The following code tests the value in the variable i to ensure that it is greater than or equal to zero: 2 3 1. Input i 2. If (i >= 0) Then 3. output studentgrade[i] 4. Else 5. output value out of range 6. End if State THREE (3) values would you use as input if you had to perform a simple boundary test on i. Award 1 mark for each correct value up to a maximum of 3 marks: i=-1; i=0; i=1 Total: 10 Page 10 of 13

Question 10 a) The following class is used to describe objects of type FoodItem. These objects would appear in a menu application for a restaurant. The class is incomplete as it does not contain accessor functions. Write pseudocode accessor functions for this class. 8 Class FoodItem data name as String data price as whole number End Class // Accessor functions to be written here The maximum number of marks awarded to this question is 8. Award 2 marks per function syntax can be approximate but must refer to correct member variables (1 mark) and getters must return correct values (1 mark). function setname (needs n as String) name = n end function function setprice (needs p as Whole number) price = p end function function getname() returns String return name end function function getprice() returns whole number return price end function b) Briefly explain why we use Accessor functions in classes. 2 It improves the maintainability of our objects (1 mark). If we want to change the way a name is represented, it can be achieved as all changes have to be done through our accessor functions (1 mark). Total: 10 End of Examination Paper Page 11 of 13

Learning Outcomes matrix Question Learning Outcomes assessed Marker can differentiate between varying levels of achievement 1 1 Yes 2 2 Yes 3 2, 3 Yes 4 3 Yes 5 2, 3 Yes 6 2, 3 Yes 7 5 Yes 8 7 Yes 9 4, 6 Yes 10 7 Yes Page 12 of 13

Grade descriptors Learning Outcome Pass Merit Distinction Identify and explain the key stages of software development lifecycles Provide adequate ability to explain the subject matter Provide detailed and coherent explanation of the subject matter Express, design and evaluate algorithms Identify and use programming language constructs Identify and use common data structures Explain and use common algorithms Explain and use test strategies Explain how software is modularised perform the task perform the task perform the task Demonstrate adequate ability to explain the subject matter; Demonstrate adequate and appropriate use Demonstrate adequate ability to explain the subject matter; Demonstrate adequate and appropriate use Provide adequate ability to explain the subject matter perform the task consistently well perform the task consistently well perform the task consistently well Demonstrate detailed and coherent explanation of the subject matter; Demonstrate appropriate and effective use Demonstrate detailed and coherent explanation of the subject matter; Demonstrate appropriate and effective use Provide detailed and coherent explanation of the subject matter Provide comprehensive, lucid explanation of the subject matter perform the task to the highest standard perform the task to the highest standard perform the task to the highest standard Demonstrate comprehensive, lucid explanation of the subject matter; Demonstrate highly appropriate and effective use Demonstrate comprehensive, lucid explanation of the subject matter; Demonstrate highly appropriate and effective use Provide comprehensive, lucid explanation of the subject matter Page 13 of 13