SlideShare una empresa de Scribd logo
1 de 8
Descargar para leer sin conexión
UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS
                            General Certificate of Education
                     Advanced Subsidiary Level and Advanced Level

         COMPUTING
         Paper 2: Practical Tasks

                                                                       October/November 2005




  READ THESE INSTRUCTIONS FIRST

  Write your Centre number, candidate number and name on all the work you hand in.
  Write in dark blue or black pen on both sides of the paper.
  Do not use staples, paper clips, highlighters, glue or correction fluid.

  Answer all questions.
  The number of marks is given in brackets [ ] at the end of each question or part question.




                        This document consists of 6 printed pages and 2 blank pages.
IB05 11_9691_02/4RP
 UCLES 2005                                                                                   [Turn over




                                www.xtremepapers.net
2

                                         Answer all questions.
Task 1 [22 marks]

This is a design and implementation task.

A library requires a database to hold details of its books and authors. An author may write many
books and a book may be written by many authors.

Authors have an address and a telephone number. The telephone number consists of 11 digits such
as 01543564329. The author’s name, address and telephone number are the only personal data to be
stored.

Books have a book number consisting of two letters and four digits such as CS1002. Each book has a
title and a publisher.


    (a) Design a database, consisting of three tables, to store the data. You should include evidence
        showing the attributes of the tables together with their data types and any validation rules you
        have used. Screen dumps are acceptable for this purpose.                                     [11]

Create sufficient data to complete the rest of this task. Provide copies of your completed tables.
Screen dumps are acceptable for this purpose.


    (b) (i) Create a form that will allow the user to add an author to the appropriate table.

        (ii) Create a form that will allow the user to add a book to the appropriate table.

        (iii) Create a form that will allow a user to link an author to a book. The form should allow the
              user to choose an author from a list and to choose a book from a list.                   [6]


    (c) Create a query that, when run, requests a user to select an author and then lists all the books
        written by that author. Include evidence that your query works correctly.                    [2]


    (d) Create a report that lists the authors for each book. The report should group the information
        on book number and have appropriate headings. Include evidence that your report is correct.
                                                                                                   [3]




© UCLES 2005                                  9691/02/O/N/05



                               www.xtremepapers.net
3

Task 2 [18 Marks]

This is a white box test task. No implementation is required.

Read the following algorithm for a procedure, called Validate, in which each step has been numbered.

Validate(aString)
1 Length = Len(aString)
2     IF Length = 0 THEN
3        Output "Empty string is not allowed"
4     ELSE
5        OK = TRUE
6        DP = FALSE
7        Count = 1
8        Ch = 1st character of aString
9        IF Ch < "i" OR Ch > "n" THEN
10          OK = FALSE
11       ELSE
12          WHILE Count < Length AND OK DO
13             Count = Count + 1
14             Ch = next character in aString
15             IF Ch = "." THEN
16                IF DP THEN
17                   OK = FALSE
18                ELSE
19                   DP = TRUE
20                ENDIF
21             ELSE
22                IF Ch < "a" OR Ch > "z" THEN
23                   OK = FALSE
24                ENDIF
25             ENDIF
26          ENDWHILE
27       ENDIF
28       IF OK THEN
29          Output "Valid string"
30       ELSE
31          Output "Invalid string"
32       ENDIF
33    ENDIF
34 END PROCEDURE Validate

The function Len(aString) returns the number of characters in aString. For example, if aString =
"Computer", Len(aString) = 8.




© UCLES 2005                                9691/02/O/N/05                               [Turn over


                             www.xtremepapers.net
4

When the procedure is called with

    Validate("kg")

the lines

    1, 2, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 21, 22, 24, 25, 26, 12, 26, 27, 28, 29, 30,
    32, 33, 34

are executed and the output is

    Valid string

The example test above can be described as shown in Table 2.1.

             Path                                                   Test Data   Expected Output

             1, 2, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 21, 22,
                                                                       kg         Valid string
             24, 25, 26, 12, 26, 27, 28, 29, 30, 32, 33, 34

                                                    Table 2.1


Using a table similar to Table 2.1, write down the lines that are executed and the output when the
procedure is called with

            (i) Validate(".doc");                                                                 [4]

        (ii) Validate("m.d");                                                                     [7]

        (iii) Validate("j.b.w").                                                                  [7]




© UCLES 2005                                       9691/02/O/N/05



                                    www.xtremepapers.net
5

Task 3 [20 marks]

This is a design and implementation task.

You are to design and create a very simple octal calculator using a high-level language of your
choice. An octal calculator can only use the digits 0 to 7. This calculator will allow the user to enter
two unsigned octal numbers and will then allow the user to add, subtract, multiply or divide these
numbers. In the case of division, the result should be truncated to a whole number. This is
equivalent to integer division. The result is to be displayed in octal.

To do this you are advised to follow these steps.

    (a) Design an interface that will allow the user to input two unsigned octal numbers and will
        display them in two boxes. The user should then be able to choose addition, subtraction,
        multiplication or division. There should be a box to show the result of the calculation. The
        user should also be able to clear all the boxes. (No processing is required at this stage.) [4]

    (b) Create a function, called OctalToDecimal, that will accept an octal number as a parameter
        and will return its decimal equivalent. For example,

                          OctalToDecimal(253) will return the decimal value 171.

         You may use the following algorithm to do this.

               Input the octal number as a string
               Total = 0
               For each octal digit in the string, starting on the left,
                     Total = Total * 8 + value of next digit
               Return Total

         You should clearly annotate your code and use meaningful names for variables and other
         objects such as buttons and text boxes (if you use them). You should include a copy of your
         code as evidence.                                                                        [4]

    (c) Create a function, called DecimalToOctal, that will accept a decimal number as a parameter
        and will return its octal equivalent. For example,

                           DecimalToOctal (171) will return the octal value 253.

         You may use the following algorithm to do this.

               Input the decimal number called Number
               Octal = ""              'Empty string
               Repeat
                     Remainder = remainder after Number is divided by 8
                     Number = Whole part of Number divided by 8
                     Octal = String value of Remainder & Octal
               Until Number = 0

         & means concatenation. For example

                                             "5" & "263" = "5263"

         You should clearly annotate your code and use meaningful names for variables and other
         objects such as buttons (if you use them). You should include a copy of your code as
         evidence.                                                                           [4]


© UCLES 2005                                      9691/02/O/N/05                            [Turn over


                                  www.xtremepapers.net
6

    (d) Create code for each of the operations of addition, subtraction, multiplication and division.
        You are advised to change the octal numbers input by the user to decimal, do the operation
        and then convert the result back to octal before displaying the result. You should include a
        copy of your code as evidence.                                                            [3]

    (e) Create a set of test data that shows that the operations of addition, subtraction, multiplication
        and division work and provide evidence that you have used this data. Screen dumps are
        acceptable but must show the data entered and the result of the operation.                     [5]




© UCLES 2005                                  9691/02/O/N/05



                               www.xtremepapers.net
7

      BLANK PAGE




       9691/02/O/N/05



www.xtremepapers.net
8

                                                                  BLANK PAGE




Every reasonable effort has been made to trace all copyright holders where the publishers (i.e. UCLES) are aware that third-party material has been
reproduced. The publishers would be pleased to hear from anyone whose rights they have unwittingly infringed.

University of Cambridge International Examinations is part of the University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department
of the University of Cambridge.

                                                                     9691/02/O/N/05



                                              www.xtremepapers.net

Más contenido relacionado

La actualidad más candente

Mathematica tutorial 3
Mathematica tutorial 3Mathematica tutorial 3
Mathematica tutorial 3coolsumayya
 
Jinnai fukunaga-2016
Jinnai fukunaga-2016Jinnai fukunaga-2016
Jinnai fukunaga-2016Yuu Jinnai
 
Matlab 1
Matlab 1Matlab 1
Matlab 1asguna
 
Scope Graphs: A fresh look at name binding in programming languages
Scope Graphs: A fresh look at name binding in programming languagesScope Graphs: A fresh look at name binding in programming languages
Scope Graphs: A fresh look at name binding in programming languagesEelco Visser
 
Declarative Language Definition
Declarative Language DefinitionDeclarative Language Definition
Declarative Language DefinitionEelco Visser
 
Mining Functional Patterns
Mining Functional PatternsMining Functional Patterns
Mining Functional PatternsDebasish Ghosh
 
Linear models
Linear modelsLinear models
Linear modelsFAO
 
Csphtp1 16
Csphtp1 16Csphtp1 16
Csphtp1 16HUST
 
Sp 1418794917
Sp 1418794917Sp 1418794917
Sp 1418794917lakshmi r
 
N-Queens Combinatorial Problem - Polyglot FP for fun and profit - Haskell and...
N-Queens Combinatorial Problem - Polyglot FP for fun and profit - Haskell and...N-Queens Combinatorial Problem - Polyglot FP for fun and profit - Haskell and...
N-Queens Combinatorial Problem - Polyglot FP for fun and profit - Haskell and...Philip Schwarz
 
Multiple graphs in openCypher
Multiple graphs in openCypherMultiple graphs in openCypher
Multiple graphs in openCypheropenCypher
 
Paper fingerprinting using alpha-masked image matching
Paper fingerprinting using alpha-masked image matchingPaper fingerprinting using alpha-masked image matching
Paper fingerprinting using alpha-masked image matchingTuan Q. Pham
 
Arrays, Structures And Enums
Arrays, Structures And EnumsArrays, Structures And Enums
Arrays, Structures And EnumsBhushan Mulmule
 
Bis 311 final examination answers
Bis 311 final examination answersBis 311 final examination answers
Bis 311 final examination answersRandalHoffman
 

La actualidad más candente (20)

Monad
MonadMonad
Monad
 
Fp201 unit4
Fp201 unit4Fp201 unit4
Fp201 unit4
 
Mathematica tutorial 3
Mathematica tutorial 3Mathematica tutorial 3
Mathematica tutorial 3
 
White box-sol
White box-solWhite box-sol
White box-sol
 
Jinnai fukunaga-2016
Jinnai fukunaga-2016Jinnai fukunaga-2016
Jinnai fukunaga-2016
 
Matlab 1
Matlab 1Matlab 1
Matlab 1
 
Scope Graphs: A fresh look at name binding in programming languages
Scope Graphs: A fresh look at name binding in programming languagesScope Graphs: A fresh look at name binding in programming languages
Scope Graphs: A fresh look at name binding in programming languages
 
Declarative Language Definition
Declarative Language DefinitionDeclarative Language Definition
Declarative Language Definition
 
2D Plot Matlab
2D Plot Matlab2D Plot Matlab
2D Plot Matlab
 
Mining Functional Patterns
Mining Functional PatternsMining Functional Patterns
Mining Functional Patterns
 
Linear models
Linear modelsLinear models
Linear models
 
Sql server lab_2
Sql server lab_2Sql server lab_2
Sql server lab_2
 
Ti1220 Lecture 2
Ti1220 Lecture 2Ti1220 Lecture 2
Ti1220 Lecture 2
 
Csphtp1 16
Csphtp1 16Csphtp1 16
Csphtp1 16
 
Sp 1418794917
Sp 1418794917Sp 1418794917
Sp 1418794917
 
N-Queens Combinatorial Problem - Polyglot FP for fun and profit - Haskell and...
N-Queens Combinatorial Problem - Polyglot FP for fun and profit - Haskell and...N-Queens Combinatorial Problem - Polyglot FP for fun and profit - Haskell and...
N-Queens Combinatorial Problem - Polyglot FP for fun and profit - Haskell and...
 
Multiple graphs in openCypher
Multiple graphs in openCypherMultiple graphs in openCypher
Multiple graphs in openCypher
 
Paper fingerprinting using alpha-masked image matching
Paper fingerprinting using alpha-masked image matchingPaper fingerprinting using alpha-masked image matching
Paper fingerprinting using alpha-masked image matching
 
Arrays, Structures And Enums
Arrays, Structures And EnumsArrays, Structures And Enums
Arrays, Structures And Enums
 
Bis 311 final examination answers
Bis 311 final examination answersBis 311 final examination answers
Bis 311 final examination answers
 

Destacado

el paso 05_16Wright_Wachovia
el paso  05_16Wright_Wachoviael paso  05_16Wright_Wachovia
el paso 05_16Wright_Wachoviafinance49
 
Hanks' Lesson Plans December 14 17
Hanks' Lesson Plans December 14 17Hanks' Lesson Plans December 14 17
Hanks' Lesson Plans December 14 17hanks1mr
 
Nov 05 MS1
Nov 05 MS1Nov 05 MS1
Nov 05 MS1Samimvez
 
Desde Paraguay, homenaje a mujeres haitianas
Desde Paraguay, homenaje a mujeres haitianasDesde Paraguay, homenaje a mujeres haitianas
Desde Paraguay, homenaje a mujeres haitianasWebmistress Paraguay
 

Destacado (6)

Nassser ajaln aziz_group
Nassser ajaln aziz_groupNassser ajaln aziz_group
Nassser ajaln aziz_group
 
el paso 05_16Wright_Wachovia
el paso  05_16Wright_Wachoviael paso  05_16Wright_Wachovia
el paso 05_16Wright_Wachovia
 
Hanks' Lesson Plans December 14 17
Hanks' Lesson Plans December 14 17Hanks' Lesson Plans December 14 17
Hanks' Lesson Plans December 14 17
 
Nov 05 MS1
Nov 05 MS1Nov 05 MS1
Nov 05 MS1
 
Sonrie.....
Sonrie.....Sonrie.....
Sonrie.....
 
Desde Paraguay, homenaje a mujeres haitianas
Desde Paraguay, homenaje a mujeres haitianasDesde Paraguay, homenaje a mujeres haitianas
Desde Paraguay, homenaje a mujeres haitianas
 

Similar a Nov 05 P2

Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Alpro
 
June 04 P32
June 04 P32June 04 P32
June 04 P32Samimvez
 
Computing Paper 2 Practical Tests may june 2004 general certificate of educat...
Computing Paper 2 Practical Tests may june 2004 general certificate of educat...Computing Paper 2 Practical Tests may june 2004 general certificate of educat...
Computing Paper 2 Practical Tests may june 2004 general certificate of educat...Alpro
 
Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0PMILebanonChapter
 
Computing 9691 Test Paper Paper 3 for May / June 2007 Cambridge
Computing 9691 Test Paper Paper 3 for May / June 2007 CambridgeComputing 9691 Test Paper Paper 3 for May / June 2007 Cambridge
Computing 9691 Test Paper Paper 3 for May / June 2007 CambridgeAlpro
 
Computing 9195 Zimbabwe Zimsec syllabus Cambridge Computers may June 2007 pap...
Computing 9195 Zimbabwe Zimsec syllabus Cambridge Computers may June 2007 pap...Computing 9195 Zimbabwe Zimsec syllabus Cambridge Computers may June 2007 pap...
Computing 9195 Zimbabwe Zimsec syllabus Cambridge Computers may June 2007 pap...Alpro
 
Visual Programing basic lectures 7.pptx
Visual Programing basic lectures  7.pptxVisual Programing basic lectures  7.pptx
Visual Programing basic lectures 7.pptxMrhaider4
 
Arrry structure Stacks in data structure
Arrry structure Stacks  in data structureArrry structure Stacks  in data structure
Arrry structure Stacks in data structurelodhran-hayat
 
The Ring programming language version 1.8 book - Part 94 of 202
The Ring programming language version 1.8 book - Part 94 of 202The Ring programming language version 1.8 book - Part 94 of 202
The Ring programming language version 1.8 book - Part 94 of 202Mahmoud Samir Fayed
 
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CSAAKASH KUMAR
 

Similar a Nov 05 P2 (20)

Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
 
Nov 04 P2
Nov 04 P2Nov 04 P2
Nov 04 P2
 
June 04 P32
June 04 P32June 04 P32
June 04 P32
 
Computing Paper 2 Practical Tests may june 2004 general certificate of educat...
Computing Paper 2 Practical Tests may june 2004 general certificate of educat...Computing Paper 2 Practical Tests may june 2004 general certificate of educat...
Computing Paper 2 Practical Tests may june 2004 general certificate of educat...
 
Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0
 
Computing 9691 Test Paper Paper 3 for May / June 2007 Cambridge
Computing 9691 Test Paper Paper 3 for May / June 2007 CambridgeComputing 9691 Test Paper Paper 3 for May / June 2007 Cambridge
Computing 9691 Test Paper Paper 3 for May / June 2007 Cambridge
 
Computing 9195 Zimbabwe Zimsec syllabus Cambridge Computers may June 2007 pap...
Computing 9195 Zimbabwe Zimsec syllabus Cambridge Computers may June 2007 pap...Computing 9195 Zimbabwe Zimsec syllabus Cambridge Computers may June 2007 pap...
Computing 9195 Zimbabwe Zimsec syllabus Cambridge Computers may June 2007 pap...
 
Visual Programing basic lectures 7.pptx
Visual Programing basic lectures  7.pptxVisual Programing basic lectures  7.pptx
Visual Programing basic lectures 7.pptx
 
Introduction to DAX Language
Introduction to DAX LanguageIntroduction to DAX Language
Introduction to DAX Language
 
Arrry structure Stacks in data structure
Arrry structure Stacks  in data structureArrry structure Stacks  in data structure
Arrry structure Stacks in data structure
 
Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
 
C++
C++C++
C++
 
The Ring programming language version 1.8 book - Part 94 of 202
The Ring programming language version 1.8 book - Part 94 of 202The Ring programming language version 1.8 book - Part 94 of 202
The Ring programming language version 1.8 book - Part 94 of 202
 
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
 
Lecture 1 mte 407
Lecture 1 mte 407Lecture 1 mte 407
Lecture 1 mte 407
 
Lecture 1 mte 407
Lecture 1 mte 407Lecture 1 mte 407
Lecture 1 mte 407
 
Sample paper i.p
Sample paper i.pSample paper i.p
Sample paper i.p
 
CST2403 NOTES
CST2403 NOTESCST2403 NOTES
CST2403 NOTES
 
Aspdot
AspdotAspdot
Aspdot
 
Portfolio2
Portfolio2Portfolio2
Portfolio2
 

Más de Samimvez

Más de Samimvez (20)

Sql installation tutorial
Sql installation tutorialSql installation tutorial
Sql installation tutorial
 
Example3
Example3Example3
Example3
 
Coms1010 exam paper - nov10
Coms1010   exam paper - nov10Coms1010   exam paper - nov10
Coms1010 exam paper - nov10
 
Coms1010 exam paper - may 08
Coms1010   exam paper - may 08Coms1010   exam paper - may 08
Coms1010 exam paper - may 08
 
Example2
Example2Example2
Example2
 
Labsheet 3
Labsheet 3Labsheet 3
Labsheet 3
 
Labsheet 3,5
Labsheet 3,5Labsheet 3,5
Labsheet 3,5
 
EQ V3x
EQ V3xEQ V3x
EQ V3x
 
Eq v2
Eq v2Eq v2
Eq v2
 
3.6
3.63.6
3.6
 
3.2
3.23.2
3.2
 
3.10
3.103.10
3.10
 
3.1
3.13.1
3.1
 
3.3
3.33.3
3.3
 
3.8
3.83.8
3.8
 
3.4
3.43.4
3.4
 
3.7
3.73.7
3.7
 
3.5
3.53.5
3.5
 
3.9
3.93.9
3.9
 
Nov 05 P3
Nov 05 P3Nov 05 P3
Nov 05 P3
 

Último

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Último (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Nov 05 P2

  • 1. UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS General Certificate of Education Advanced Subsidiary Level and Advanced Level COMPUTING Paper 2: Practical Tasks October/November 2005 READ THESE INSTRUCTIONS FIRST Write your Centre number, candidate number and name on all the work you hand in. Write in dark blue or black pen on both sides of the paper. Do not use staples, paper clips, highlighters, glue or correction fluid. Answer all questions. The number of marks is given in brackets [ ] at the end of each question or part question. This document consists of 6 printed pages and 2 blank pages. IB05 11_9691_02/4RP  UCLES 2005 [Turn over www.xtremepapers.net
  • 2. 2 Answer all questions. Task 1 [22 marks] This is a design and implementation task. A library requires a database to hold details of its books and authors. An author may write many books and a book may be written by many authors. Authors have an address and a telephone number. The telephone number consists of 11 digits such as 01543564329. The author’s name, address and telephone number are the only personal data to be stored. Books have a book number consisting of two letters and four digits such as CS1002. Each book has a title and a publisher. (a) Design a database, consisting of three tables, to store the data. You should include evidence showing the attributes of the tables together with their data types and any validation rules you have used. Screen dumps are acceptable for this purpose. [11] Create sufficient data to complete the rest of this task. Provide copies of your completed tables. Screen dumps are acceptable for this purpose. (b) (i) Create a form that will allow the user to add an author to the appropriate table. (ii) Create a form that will allow the user to add a book to the appropriate table. (iii) Create a form that will allow a user to link an author to a book. The form should allow the user to choose an author from a list and to choose a book from a list. [6] (c) Create a query that, when run, requests a user to select an author and then lists all the books written by that author. Include evidence that your query works correctly. [2] (d) Create a report that lists the authors for each book. The report should group the information on book number and have appropriate headings. Include evidence that your report is correct. [3] © UCLES 2005 9691/02/O/N/05 www.xtremepapers.net
  • 3. 3 Task 2 [18 Marks] This is a white box test task. No implementation is required. Read the following algorithm for a procedure, called Validate, in which each step has been numbered. Validate(aString) 1 Length = Len(aString) 2 IF Length = 0 THEN 3 Output "Empty string is not allowed" 4 ELSE 5 OK = TRUE 6 DP = FALSE 7 Count = 1 8 Ch = 1st character of aString 9 IF Ch < "i" OR Ch > "n" THEN 10 OK = FALSE 11 ELSE 12 WHILE Count < Length AND OK DO 13 Count = Count + 1 14 Ch = next character in aString 15 IF Ch = "." THEN 16 IF DP THEN 17 OK = FALSE 18 ELSE 19 DP = TRUE 20 ENDIF 21 ELSE 22 IF Ch < "a" OR Ch > "z" THEN 23 OK = FALSE 24 ENDIF 25 ENDIF 26 ENDWHILE 27 ENDIF 28 IF OK THEN 29 Output "Valid string" 30 ELSE 31 Output "Invalid string" 32 ENDIF 33 ENDIF 34 END PROCEDURE Validate The function Len(aString) returns the number of characters in aString. For example, if aString = "Computer", Len(aString) = 8. © UCLES 2005 9691/02/O/N/05 [Turn over www.xtremepapers.net
  • 4. 4 When the procedure is called with Validate("kg") the lines 1, 2, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 21, 22, 24, 25, 26, 12, 26, 27, 28, 29, 30, 32, 33, 34 are executed and the output is Valid string The example test above can be described as shown in Table 2.1. Path Test Data Expected Output 1, 2, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 21, 22, kg Valid string 24, 25, 26, 12, 26, 27, 28, 29, 30, 32, 33, 34 Table 2.1 Using a table similar to Table 2.1, write down the lines that are executed and the output when the procedure is called with (i) Validate(".doc"); [4] (ii) Validate("m.d"); [7] (iii) Validate("j.b.w"). [7] © UCLES 2005 9691/02/O/N/05 www.xtremepapers.net
  • 5. 5 Task 3 [20 marks] This is a design and implementation task. You are to design and create a very simple octal calculator using a high-level language of your choice. An octal calculator can only use the digits 0 to 7. This calculator will allow the user to enter two unsigned octal numbers and will then allow the user to add, subtract, multiply or divide these numbers. In the case of division, the result should be truncated to a whole number. This is equivalent to integer division. The result is to be displayed in octal. To do this you are advised to follow these steps. (a) Design an interface that will allow the user to input two unsigned octal numbers and will display them in two boxes. The user should then be able to choose addition, subtraction, multiplication or division. There should be a box to show the result of the calculation. The user should also be able to clear all the boxes. (No processing is required at this stage.) [4] (b) Create a function, called OctalToDecimal, that will accept an octal number as a parameter and will return its decimal equivalent. For example, OctalToDecimal(253) will return the decimal value 171. You may use the following algorithm to do this. Input the octal number as a string Total = 0 For each octal digit in the string, starting on the left, Total = Total * 8 + value of next digit Return Total You should clearly annotate your code and use meaningful names for variables and other objects such as buttons and text boxes (if you use them). You should include a copy of your code as evidence. [4] (c) Create a function, called DecimalToOctal, that will accept a decimal number as a parameter and will return its octal equivalent. For example, DecimalToOctal (171) will return the octal value 253. You may use the following algorithm to do this. Input the decimal number called Number Octal = "" 'Empty string Repeat Remainder = remainder after Number is divided by 8 Number = Whole part of Number divided by 8 Octal = String value of Remainder & Octal Until Number = 0 & means concatenation. For example "5" & "263" = "5263" You should clearly annotate your code and use meaningful names for variables and other objects such as buttons (if you use them). You should include a copy of your code as evidence. [4] © UCLES 2005 9691/02/O/N/05 [Turn over www.xtremepapers.net
  • 6. 6 (d) Create code for each of the operations of addition, subtraction, multiplication and division. You are advised to change the octal numbers input by the user to decimal, do the operation and then convert the result back to octal before displaying the result. You should include a copy of your code as evidence. [3] (e) Create a set of test data that shows that the operations of addition, subtraction, multiplication and division work and provide evidence that you have used this data. Screen dumps are acceptable but must show the data entered and the result of the operation. [5] © UCLES 2005 9691/02/O/N/05 www.xtremepapers.net
  • 7. 7 BLANK PAGE 9691/02/O/N/05 www.xtremepapers.net
  • 8. 8 BLANK PAGE Every reasonable effort has been made to trace all copyright holders where the publishers (i.e. UCLES) are aware that third-party material has been reproduced. The publishers would be pleased to hear from anyone whose rights they have unwittingly infringed. University of Cambridge International Examinations is part of the University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge. 9691/02/O/N/05 www.xtremepapers.net