HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A program plans train journeys between the towns of a country…
MediumComputer ScienceHigh School (9–10)Computer Science › Algorithms and Problem-SolvingConceptualIGCSE

A program plans train journeys between the towns of a country…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A program plans train journeys between the towns of a country. A designer has this list of facts about each train.

The departure station and time; the arrival station and time; the stations where it stops; the colour of the train; the name of the driver; whether it has seats for wheelchair users; the number of the platform; the price of a ticket.

  1. Which facts should the journey planner keep? Give a reason for one fact you leave out.
  1. What is this choice called?
Need a reminder? The key ideaShowHide

Every computer system is made of sub-systems, which are made of further sub-systems. Decompose a problem into its inputs, processes, outputs and storage. Abstraction keeps only the details that matter. A structure diagram shows the system at the top and its parts on each level below.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. Keep. The stations and times (departure, stops, arrival), the platform, the price, and the wheelchair seats. Each one changes which train a passenger chooses or how they catch it.

Step 2. Leave out. The colour of the train and the name of the driver. Neither changes the journey, so the planner does not need them.

Step 3. The name. Keeping the details that matter and removing the others is abstraction.

Answer: (a) keep stations, times, platform, price and wheelchair seats; leave out the colour and the driver's name, because they do not affect the journey. (b) Abstraction.

Watch out. Some answers depend on the users. If the program were for the train company's staff rota, the driver's name would matter. Abstraction always starts from the problem being solved.

Log in to save this for later
← All Problems
← A structure diagram for a home weather station has the top box "Weather station"…A flowchart works like this. Start. Set Big to 0 and Loops to 0… →
More onComputer Science › Algorithms and Problem-Solving

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Decomposition, abstraction and structure diagramsPlanning a Program: Life Cycle, Decomposition and Flowcharts

More on this topic

  1. This is the kind of long scenario question that ends Paper 2…Hard
  2. A delivery company adds a check digit to each parcel number…Medium
  3. Name the check in each case. Say whether it is validation or verification…Easy
A bubble sort is changed so that it sorts in descending order: the comparison becomes IF…Hard
  • A shop stores the colours of the ten bicycles in its window in an array Colours: red, blue, red…Medium
  • All problems on this topic →