0% found this document useful (0 votes)
388 views

2017 Unit 1 Traditional Scenario

Just in case people were looking for an example of work
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
388 views

2017 Unit 1 Traditional Scenario

Just in case people were looking for an example of work
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Centre Number Candidate Number

Surname

Other Names

Candidate Signature

General Certificate of Secondary Education


For submission in 2017

Computer Science 4512/CB4


4512
Unit 4512/1 – Practical Programming
Scenario 4 Traditional Application

A Population Model

For candidates entering for the 2017 examination


To be issued to candidates on or after Friday 15 May 2015

This scenario is one of four available. Each of the four scenarios is available in a separate
Candidate Booklet. You must complete two of the four scenarios.

• You have approximately 25 hours in which to complete this scenario.


• 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.
• 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.
• 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.
• You will need to complete and sign a Candidate Record Form which your teacher will provide.
Information
You will also be marked on your use of English. It is important to:
• make sure that all your work is legible
• use correct spelling, punctuation and grammar
• use a style of writing which suits the person you are writing for
• organise your information clearly, so that you make yourself understood
• use Computer Science terms where they are needed.

4512/CB4
2

Scenario 4: A Population Model


When 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.

Studying 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.

You 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.

© Thinkstock

The photograph above shows a greenfly infestation on a rose bush.

The 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.

4512/CB4
3

The Population Model rules

To create a population model, the following rules must be followed.

1. The population consists only of females.

2. At any one time there are three types of individual in the population:

• Seniles – old greenfly that do not reproduce


• Adults – greenfly that are reproducing
• Juveniles – greenfly that are too young to reproduce.

3. The model lasts for a set number of new generations. At the end of each generation:

• all surviving senile greenfly remain as seniles


• all surviving adult greenfly change from adults to seniles
• all surviving juvenile greenfly change from juveniles to adults.

4. 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.

• A survival rate of 0 means no individuals of that type survive at the end of the generation.
• A survival rate of 1 means all the individuals of that type survive at the end of the generation.
• A survival rate of 0.25 means that a quarter of the individuals of that type survive to the next
generation.

The number of individuals surviving to the next generation is calculated using the formula:

New number of individuals = Current number of individuals * survival rate

5. 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.

The number of juveniles born each generation is calculated using the formula:

New number of juveniles = Current number of adults * birth rate

6. Numbers of individuals in the model are measured in thousands.

7. The following values must be set before the model is run:

• the initial numbers (called Generation 0) of juveniles, adults and seniles


• the birth rate and survival rates
• the number of new generations over which the model runs. This must be between 5 and 25.

Turn over ►

4512/CB4
4

Example data

Table 1 shows the data that are used by the model to generate the results in Figure 1.

Table 1

Initial population
Type of greenfly Survival rate
(1000s)

Juvenile 10 1

Adult 10 1

Senile 10 0

Number of new generations = 5


Birth rate = 2

Figure 1 shows the way the model works for five new generations.

Figure 1
(population numbers are in thousands)

GENERATION JUVENILES ADULTS SENILES TOTAL

10
0 10 10 30
x2

1 20 10 10 40

2 20 20 10 50

3 40 20 20 80

4 40 40 20 100

5 80 40 40 160

4512/CB4
5

Tasks

1. Develop a main menu for the program. The options on the main menu should be:

• Set the Generation 0 values


• Display the Generation 0 values
• Run the model
• Export data
• Quit.

2. Develop the part of the program that allows the user to set the Generation 0 values for the:

• population numbers of juveniles, adults and seniles


• survival rates for juveniles, adults and seniles
• birth rate
• number of new generations to model. This should be between 5 and 25.

The program should then return to the menu.

3. 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.

4. 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.

5. The model needs an export feature to save the data so that it can be used in another
application (such as a spreadsheet package).

Develop your program so that when the user chooses to export the data:

a) They are asked to enter a suitable filename


b) The program should check whether a file of the same name already exists.
c) If the file does not already exist, then the data are saved.
d) If the file does already exist, the user should be asked whether they want to overwrite
the existing file.
e) If they choose to overwrite the existing file, then the data are saved.
f) If they choose not to overwrite the existing file, then they should be returned to step a.

After this option has been completed, the program should return to the menu.

Turn over for the next task

Turn over ►

4512/CB4
6

6. In a real population, if the total population becomes too high, the survival rates will decrease
because of disease.

When the total population size reaches a disease trigger point, disease will take effect.
When the total population size falls below this trigger point, disease will have no effect.

The effect of disease is unpredictable. To simulate this effect a disease factor is applied to the
survival rates of juveniles and seniles.

• The disease factor is represented by a random percentage between 20% and 50%.
• To calculate the new number of juveniles and seniles in the next generation, the following
formula is used:

New number of individuals = Current number of individuals * survival rate * disease factor

Extend your menu from Task 1 to include an option to enter the total population disease trigger
point.

Extend 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.

4512/CB4
7

In addition

1. Your Portfolio

You are free to use whatever programming tools and techniques are available to you.

What your teacher will be looking for and how to provide that evidence for your Portfolio

In preparing you for this unit of work, your teacher will have provided you with more information
about the section headings below.

Part 1 – Design of solution

Design of solution (0–9 marks available)


What you must do
• Show an understanding of what the problem involves with reference to the user’s needs.
• Produce an overview plan that shows how the problem is to be solved.
• Produce pseudo code (or suitable alternative) showing the main blocks within the proposed
solution.

Part 2 – Solution development

Solution development (0–9 marks available)


What you must do
• Show evidence of an understanding of how the final solution meets the needs of the user.
• Produce annotated code that demonstrates an understanding of the programming techniques
used.

Part 3 – Programming techniques used

Programming techniques used (0–36 marks)


What you must do
• Show an understanding of the programming techniques used and how the different parts of the
solution work together.
• Explain/justify the choice of programming techniques used to create a solution that has been coded
efficiently.
• Show evidence for the purpose and use of data structures.
• Show the techniques used (appropriate to the language used) within the code to make the solution
robust.

Part 4 – Testing and evaluation

Testing and evaluation (0–9 marks available)


What you must do
• Produce a test plan that shows the expected tests, test data and expected results.
• Show that the planned tests have been carried out and provide a record of the actions taken.
• Evaluate how the final solution meets the needs of the user.

Turn over ►

4512/CB4
8

2. Organising your Portfolio of work

Your Portfolio is where you keep the evidence that you have produced.

You 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.

• 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.

• 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.

• Each page should have your name, centre number and candidate number clearly shown on it.
• Your work must comprise (in the order shown):

1. a Design of solution section


2. a Solution development section
3. a Programming techniques used section
4. a Testing and evaluation section

It is vital for assessment and moderation purposes that the sections are the same as those
shown above and in the same order.

When you have completed this scenario, assemble the work into a single document.

END OF CANDIDATE BOOKLET

Copyright © 2015 AQA and its licensors. All rights reserved

4512/CB4

You might also like