· 9 years ago · Oct 20, 2016, 07:12 PM
14512/CB4
2General Certificate of Secondary Education
3For submission in 2017
4Computer Science
54512
64512/CB4
7Unit
84512/1 – Practical Programming
9Scenario 4
10Traditional Application
11A Population Model
12For candidates entering for the 2017 examination
13To be issued to candidates on or after Friday 15 May 2015
14This scenario is one of four available. Each of the four scenarios is available in a separate
15Candidate Booklet. You must complete two of the four scenarios.
16• You have approximately 25 hours in which to complete this scenario.
17• Before starting work on the problem, read the whole of this Candidate Booklet thoroughly. You can ask your teacher to explain anything in this booklet, except Computer Science specific terms, that you do not understand.
18• There are restrictions on when and where you can work on this problem. Your teacher will explain them to you. For example, you should only do work that you intend to hand in for marking when a teacher is present, so that he or she can confirm that the work is your own. The Candidate Booklet must not be taken outside your school/college.
19• You may need to use the Internet to research certain parts of the problem. This does not have to be within the 25 hours recommended time.
20• You will need to complete and sign a Candidate Record Form which your teacher will provide.
21Information
22You will also be marked on your use of English. It is important to:
23• make sure that all your work is legible
24• use correct spelling, punctuation and grammar
25• use a style of writing which suits the person you are writing for
26• organise your information clearly, so that you make yourself understood
27• use Computer Science terms where they are needed.
28Centre Number
29Candidate Number
30Surname
31Other Names
32Candidate Signature
332
344512/CB4
35Scenario 4: A Population Model
36When studying the environment, scientists sometimes look at how population sizes of animals and plants change over time. The scientists can use this information to find out which species are in danger of becoming extinct, to predict the effect of introducing a foreign species of animal into the countryside, or to discover the effect of a pollutant.
37Studying populations of animals and plants in the wild can take a very long time, so scientists use computer models to help them in their studies.
38You have been asked to create a simple population model to investigate how a greenfly population changes. Greenflies are a common insect that are considered to be a pest by gardeners because they damage roses and other garden plants.
39© Thinkstock
40The photograph above shows a greenfly infestation on a rose bush.
41The life cycle of greenfly is complex and the model you have been asked to create will model only some aspects of the greenfly life cycle. In the summer, the population consists only of females and each female gives birth only to females.
423
434512/CB4
44The Population Model rules
45To create a population model, the following rules must be followed.
461. The population consists only of females.
472. At any one time there are three types of individual in the population:
48• Seniles – old greenfly that do not reproduce
49• Adults – greenfly that are reproducing
50• Juveniles – greenfly that are too young to reproduce.
513. The model lasts for a set number of new generations. At the end of each generation:
52• all surviving senile greenfly remain as seniles
53• all surviving adult greenfly change from adults to seniles
54• all surviving juvenile greenfly change from juveniles to adults.
554. Each type of individual has a survival rate. The survival rate is used to calculate the number of individuals that survive at the end of each generation. This number can be a value between 0 and 1.
56• A survival rate of 0 means no individuals of that type survive at the end of the generation.
57• A survival rate of 1 means all the individuals of that type survive at the end of the generation.
58• A survival rate of 0.25 means that a quarter of the individuals of that type survive to the next generation.
59The number of individuals surviving to the next generation is calculated using the formula:
60New number of individuals = Current number of individuals * survival rate
615. Adult greenfly have a birth rate. The birth rate is used to calculate the number of juveniles that adults produce each generation. This number can be a fraction, so a birth rate of 1.5 means that, on average, each adult produces 1.5 juveniles each generation.
62The number of juveniles born each generation is calculated using the formula:
63New number of juveniles = Current number of adults * birth rate
646. Numbers of individuals in the model are measured in thousands.
657. The following values must be set before the model is run:
66• the initial numbers (called Generation 0) of juveniles, adults and seniles
67• the birth rate and survival rates
68• the number of new generations over which the model runs. This must be between 5 and 25.
69Turn over â–º
704
714512/CB4
72Example data
73Table 1 shows the data that are used by the model to generate the results in Figure 1.
74Table 1
75Type of greenfly
76Initial population (1000s)
77Survival rate
78Juvenile
7910
801
81Adult
8210
831
84Senile
8510
860
87Number of new generations = 5
88Birth rate = 2
89Figure 1 shows the way the model works for five new generations.
90Figure 1
91(population numbers are in thousands)
92GENERATION
93JUVENILES
94ADULTS
95SENILES
96TOTAL
970
9810
9910
10010
10130
1021
10320
10410
10510
10640
1072
10820
10920
11010
11150
1123
11340
11420
11520
11680
1174
11840
11940
12020
121100
1225
12380
12440
12540
126160
127x2
1285
1294512/CB4
130Tasks
1311. Develop a main menu for the program. The options on the main menu should be:
132• Set the Generation 0 values
133• Display the Generation 0 values
134• Run the model
135• Export data
136• Quit.
1372. Develop the part of the program that allows the user to set the Generation 0 values for the:
138• population numbers of juveniles, adults and seniles
139• survival rates for juveniles, adults and seniles
140• birth rate
141• number of new generations to model. This should be between 5 and 25.
142The program should then return to the menu.
1433. Develop the part of the program that will display the Generation 0 values for juveniles, adults and seniles, the birth rate and the survival rates. The program should then return to the menu.
1444. Develop the part of the program that runs the model, displaying the number of juveniles, adults and seniles and the total population size for each generation from 0 to the number of new generations entered. The program should then return to the menu.
1455. The model needs an export feature to save the data so that it can be used in another application (such as a spreadsheet package).
146Develop your program so that when the user chooses to export the data:
147a) They are asked to enter a suitable filename
148b) The program should check whether a file of the same name already exists.
149c) If the file does not already exist, then the data are saved.
150d) If the file does already exist, the user should be asked whether they want to overwrite the existing file.
151e) If they choose to overwrite the existing file, then the data are saved.
152f) If they choose not to overwrite the existing file, then they should be returned to step a.
153After this option has been completed, the program should return to the menu.
154Turn over for the next task
155Turn over â–º
1566
1574512/CB4
1586. In a real population, if the total population becomes too high, the survival rates will decrease because of disease.
159When the total population size reaches a disease trigger point, disease will take effect.
160When the total population size falls below this trigger point, disease will have no effect.
161The effect of disease is unpredictable. To simulate this effect a disease factor is applied to the survival rates of juveniles and seniles.
162• The disease factor is represented by a random percentage between 20% and 50%.
163• To calculate the new number of juveniles and seniles in the next generation, the following formula is used:
164New number of individuals = Current number of individuals * survival rate * disease factor
165Extend your menu from Task 1 to include an option to enter the total population disease trigger point.
166Extend your program to allow for the effect of disease in calculating the population sizes. Disease will reduce the survival rates of juveniles and seniles only.
1677
1684512/CB4
169In addition
1701. Your Portfolio
171You are free to use whatever programming tools and techniques are available to you.
172What your teacher will be looking for and how to provide that evidence for your Portfolio
173In preparing you for this unit of work, your teacher will have provided you with more information about the section headings below.
174Part 1 – Design of solution
175Design of solution (0–9 marks available)
176What you must do
177• Show an understanding of what the problem involves with reference to the user’s needs.
178• Produce an overview plan that shows how the problem is to be solved.
179• Produce pseudo code (or suitable alternative) showing the main blocks within the proposed solution.
180Part 2 – Solution development
181Solution development (0–9 marks available)
182What you must do
183• Show evidence of an understanding of how the final solution meets the needs of the user.
184• Produce annotated code that demonstrates an understanding of the programming techniques used.
185Part 3 – Programming techniques used
186Programming techniques used (0–36 marks)
187What you must do
188• Show an understanding of the programming techniques used and how the different parts of the solution work together.
189• Explain/justify the choice of programming techniques used to create a solution that has been coded efficiently.
190• Show evidence for the purpose and use of data structures.
191• Show the techniques used (appropriate to the language used) within the code to make the solution robust.
192Part 4 – Testing and evaluation
193Testing and evaluation (0–9 marks available)
194What you must do
195• Produce a test plan that shows the expected tests, test data and expected results.
196• Show that the planned tests have been carried out and provide a record of the actions taken.
197• Evaluate how the final solution meets the needs of the user.
198Turn over â–º
1998
2004512/CB4
2012. Organising your Portfolio of work
202Your Portfolio is where you keep the evidence that you have produced.
203You should imagine that the Portfolio is to be used by another person who is interested in how you produced your solution. It is to help them to do something similar. It is important that you organise work for the Portfolio as shown below.
204• You must keep all the work you produce in hard copy in a Portfolio (or save your work electronically which you will later copy onto a CD or DVD). Your teacher will have instructed you on what to do.
205• If you are putting hard copy printouts in your Portfolio, make sure that you number each page and fasten them all together. Take your work out of any plastic sleeves before you hand it in to your teacher for marking.
206• Each page should have your name, centre number and candidate number clearly shown on it.
207• Your work must comprise (in the order shown):
2081. a Design of solution section
2092. a Solution development section
2103. a Programming techniques used section
2114. a Testing and evaluation section
212It is vital for assessment and moderation purposes that the sections are the same as those shown above and in the same order.
213When you have completed this scenario, assemble the work into a single document.
214END OF CANDIDATE BOOKLET
215Copyright © 2015 AQA and its licensors. All rights reserved