Bits of Bytes.co

IGCSE / GCSE Computer Science

  • Home
  • 1 - Theory of Computer Science
  • 2 - Practical Problem Solving and Programming
  • Pre-Release Material
    • 2018 June >
      • 22 >
        • 22 - Cow Task
        • 22 - Task 1
        • 22 - Task 2
        • 22 - Task 3
  • 1 - Computer Systems (2023)
Picture
MENU
  • Home
  • 1 - Theory of Computer Science
  • 2 - Practical Problem Solving and Programming
  • Pre-Release Material
    • 2018 June >
      • 22 >
        • 22 - Cow Task
        • 22 - Task 1
        • 22 - Task 2
        • 22 - Task 3
  • 1 - Computer Systems (2023)

Pre-Release Breakdown

Home  >  Pre-Release Material  >  2018 June  >  22 - Cows

0478 Computer Science

June 2017 Pre-released material - 22


This pre-release task requires you to help a senior citizen club arrange outings for its members  below are the requirements given to you...
The organiser of a senior citizens’ club arranges outings for the members. For each of these outings a coach is hired, meals at a restaurant are reserved and tickets for the theatre are booked. A program is required to work out the costs and provide a printed list showing everyone on the outing. Write and test a program for the club organiser.
• Your program must include appropriate prompts for the entry of data.
• Error messages and other output need to be set out clearly.
• All variables, constants and other identifiers must have meaningful names.
​You will need to complete these three tasks. Each task must be fully tested.

TASK 1 – Work out the total cost of the outing. The organiser finds out how many senior citizens would be interested in the outing. The program for TASK 1 works out the cost from this information.

No of People
Hire of coach ($)
Cost of meal ($)
Cost of Theater Ticket ($)
12-16
150
14.00
21.00
17-26
190
13.50
20.00
27-39
225
13.00
19.00
The minimum number of senior citizens needed for the outing to go ahead is 10; there cannot be more than 36 senior citizens on the outing. A minimum of two carers must go on the outing, with an additional carer needed if more than 24 senior citizens go on the outing. Carers do not have to pay anything for the outing. Work out the total cost and the cost per person for the senior citizens.

TASK 2
– Record who is going on the outing and how much has been paid. Using your results from TASK 1, record the names of the people on the outing and the amount they have paid; include the carers on the outing. If there are spare places on the coach then extra people can be added; they are charged the same price as the other senior citizens. Calculate the total amount of money collected. Print out a list of the people on the outing.

​TASK 3
– Identify the break-even point or profit that will be made on the outing. Show whether the outing has made a profit or has broken even using the estimated cost from TASK 1 and the money collected from TASK 2.

Task Breakdown


Key points
Before we jump into writing a program like this, it can be very helpful to break the information down to fully understand the task at hand.

Purpose: to record milk production for a herd of cows

Practical information
The farmer has a herd of cows
Each cow has a UNIQUE 3 digit ID number
Each Cow is milked twice a day
Each cow is milked 7 days a week 

Practical information
What do we do with this information?
Record the volume of milk from each milking session in liters, to 2 decimal places
Calculate the total milk milked from the whole herd at the end of the week
Calculate the average yield from all milking session that week 

​Identify the cow that has produced the most milk all week -
Identify all cows that have yielded less than 12 liters in a day for more than 4 days 

Hopefully breaking down a problem in such a way may help you to get a better grasp of the problem before attempting the tasks.



Continue to task 1


Task 1
Est. 2015 - Copyright © 2020