You are on page 1of 10
Cambridge Assessment International Education Cambridge Ordinary Level CANDIDATE NAME CENTRE CANDIDATE NUMBER NUMBER J COMPUTER SCIENCE 2210/22 Paper 2 Problem-solving and Programming May/June 2019 1 hour 45 minutes Candidates answer on the Question Paper. No Additional Materials are required. No calculators allowed. READ THESE INSTRUCTIONS FIRST Write your centre number, candidate number and name in the spaces at the top of this page. Write in dark blue or black pen. You may use an HB pencil for any diagrams, graphs or rough working, Do not use staples, paper clips, glue or correction fluid. DO NOT WRITE IN ANY BARCODES. / ‘Answer all questions. DO NOT ATTEMPT TASKS 1, 2 AND 3 in the pre-release material; hese are for information only. You are advised to spend no more than 40 minutes on Section A (Question 1). No marks will be awarded for using brand names of software packages or hardware. ‘Any businesses described in this paper are entirely fictitious. tthe end of the examination, fasten all your work securely together. The number of marks is given in brackets [ } at the end of each question or part question. The maximum number of marks is 50. “This document consists of 13 printed pages and 3 blank pages: Bg cambria Assessment International Education [Turn over Bc (LEG) 180906 ©UCLES 2019 Scanned with CamScanner ion A section . . answering this section, S once trom attempting the tasks before the rating perienct your ex! release material sion board at their sale rooms, Which allows Pret ct Vey the sellers piace in active auc auction starts, lei i. san company as ay qucton. Betore tne Gritem (item number). The nai following gg. . - bey time duti tached to system: item number, ny; | ace ie i a nie ue ineracve Pe araere zero. bes eee eacnter need oe erie, The number of Bids i i 2 andres bids, desertion then place a bia in the sale room and 7 tthe items in the ‘ ea ba During te atin Duets can Om. Each buyer is given a unique number fr io iserae avhe ee puyer needs (odo enter their buyer number, ety a basirumbeofeter an any existing bis. those that have bids ges tic checks all the items and marks o E sansa tie a8 sol. Any Hons old wil incu a fee ef 10% of the final bid ta ke paid tos than he aucton company \irte and testa program or programs for the auction company. be “You program or programs must include appropriate prompts for the entry of data, data mus! validated on entry, « RisumBesades and other output need to be set out clearly and understandably. : ther identifiers must have meaningful names. ‘Youvil need fo complete these three tasks, Eact ‘Al variables, constants and *h task must be fully tested. Task 1 ~ Auction set up, For every item in the Auctior | The numberof bids is set tg 2 F eco *Sett07210, There must be se iplion and the reserve price should bet | Task 2— Buyer bids, items in the auction. | Abuyer shouldbe able to fin, | Bi. A buyer can then gtd an item ang View the it | pSoded ids. Every tm Ebuyer nue em ny ‘ righ mber, description and the current i] 7 er and iption ai 0s | Buyers can big foranitem many 32 cra aa Which must be hy, any prover fed t @ higher than on | ny tins and hey can ogee bids for that Sees a aed TASK3~ALthe end of the AUction, ‘Sr Many items, Using the results trom 14 S0ld, calculate 10% ina solditems, Opa ete fina © acta NaVe reach a have rte it the el" compar fou their reserve price, mark Io 2a see hr teseng pce Dane tom numbee cit &nd add this to the total ( 18 Lhe number atime wig ot tems sag SPAY the ge mero ay ean ame Ith No bids, numb ‘ems, tha av, tems that have y at did not me, i et the reser Scanned with CamScanner a nstants and other Idontifiors must hi + iq) Avariables: CO ist have meaningful re ‘glu names, bo tho data structures you have used in Task 1 1a for each data structure you have hisisicna {ho itoms for sata, 4 Sala, Include MIBK age Desert come sample dal “The..dda..teckines, ee soe ane... aa te = any a. Ruse. ee pcos. _D Ave, don... omta.gs...... gh “7 wee - 5] ) a how your program for Task 1 ensures the item number is unique. *By Leeeping... SOWIE ne “EASA. One euenget cae Ae - 2) sas ‘a rrunn over Scanned with CamScanner 4 buyer to adg allows the na task 2 we a flowchart. Assume thay Test ene ady been found. R ee how your program for Task 2 checks that a new bid is higher than Previous 5 bak @) Explain how hats 850 [By ing 4 raat How ty. Me ue By satng. nd eh _rourkere at , ct} o ; : Basso Om MAR. Jon. theme, eu Then Vang TP Gdeoment), to PomPare.. new.bid.ch Sagat (4) \det bid neconded, se et -Use..on Maigret. Shale wae (€) Explain how your Calculates and dis Program identities t t Programming stat 1 pict Plays the total ave t"® tems that have reached theit ean tT nS tho total auction com any fee for all sold items as ments used in your ane eay if wer must be fully explained. . Ys6ng. 0. mnehod fy h “OM unt, Rn, dis ) dete eee Scanned with CamScanner Section B atm has been written in pseudocode to input 100 num 2 @ an ag uber and ‘smallest number. ers, select and print the ia count + 1 INPUT Number igh + Number tow « Coupt__ Total > Numb en, REPEAT INPUT! Number 5 napus Namber, <—— Total + Total + Nesber, THEN High © Number ENDIF IF Number > Low THEN Low + Number ENDIF Count « Count + 1 UNTIL Count > 99 PRINT “Largest Number is “, Number PRINT "Smallest Number is ", Low PRINT” Tolalis*, Nurben. Find the four errors in the pseudocode and suggest a correction for each error. Error 1 Uae..Ne4 coneaton .. Coat Error 2... Correction erord....Win@... 1... : a Conecton.... LF... Nubab@f. 4.008 ieee conection PRINT.” Largest. Nuerben presevnnsene sremnnrnenn “etm Scanned with CamScanner x 9 a it | the numb: e the corrected algorithm to total the ers and Pe, TJotal.2. Number. i Show how you would chang! Use a variable Total. 2 line... 5 Add..belaa. ; (b) st a. Scanned with CamScanner ee 10 START Total « 0 Count + 0 Distinction + 0 ee / INPUT Mark / total + Mark 41 aoverat nous the marks galned in an examination, An input of sis 1 ends the routine, OUTPUT "Number oF Distinctions ", Distinction OUTPUT “Average Mark Total/Count Distinction © Distinction + 1 Complete the trace table for the mark input data: 50, 70, 65, 30, 95, 50, 55, 85, 65, 35, ~1, 45, Total Count 7 Distinction ] Mark OUTPUT 9 50 20 = FE Fi hee Labs halnl> RIE bo ee IS ° Ee i PPE EKCGCCCO ta "Nueber Distinctions 2, A Vonage sent GO > Scanned with CamScanner 4 Foreadt f the foul whether | dation and verification. 5 Explain whats meant DY vali Give an example for each one the ch eclae ~~ & ra Scanned with CamScanner 12 daabase table, FLIGHT, is used to Keep a record of fights from a small airfield, Planes can Agetpesengers, eight or both. Some figh's are marked as private and ony carry passengers, Flight number | Plane Notes Departure time | Passengers FN1O1 Caravan 1 | Private passenger flight | 08:00 Y NiO Caravan 2 | Freight only 08:30 7 cN102 Piper 1 Freight only 09:00 N FN104 Piper 2 Passengers only 09:20 Y FNt05 Piper 1 Freight and passengers | 10:00 Y | FN106 Caravan | Passengers only 10:30 - cntos | Caravan 2_| Freight only 08:00 N N110 Lear Private passenger flight 08:00 Y (a) Stale the field that could have a Boolean data type. Field .... Bath 20.9) en : AESz019 221072 MLNS Scanned with CamScanner 13 , itten to display just the flight numbers oy -py-example has been wri al (by Aquory-by-ex Plat, after 10:00 that only carry passengers. om Field: { Flight number Table: Sort: Show: ; le Criteria: : Rep a ae | | Explain why the query-by-example is incorrect, and write a correct query-by-example. expnton The.light.... .osvoben i. .nof...lep) aed... d.dhich... ghedd.wh Field: Tabie: Son: | Show: Criteria: or Suctes 2018 Scanned with CamScanner

You might also like