Skip to content

Course home

String handling operations in a programming language

String handling operations in a programming language

EasyMedium
1234567891011121314151617181920
Question 20

A marine biology research institute wants to create tracking codes for each specimen they catalog.

The table below shows some examples of cataloged specimens:

specimenIDspeciesNamelocationFound
M41DOLPHINATLANTIC
M42JELLYFISHPACIFIC
M43ANEMONEINDIAN

A tracking code is made up of:

  • the first and second letters of the locationFound
  • the third letter of the speciesName
  • the specimenID

For example:

  • the tracking code for DOLPHIN would be ATLM41
  • the tracking code for JELLYFISH would be PALM42

Write a VB.NET program to create the tracking code for a specimen.

The program should:

  • prompt the user to enter and read in the specimenID, speciesName, and locationFound
  • create the tracking code according to the rules above
  • assign the tracking code to a variable called trackingCode

You should use meaningful variable names and VB.NET syntax in your answer.

[4]
Markscheme

String handling operations in a programming language Questions

  1. GCSE
  2. /Computer Science
  3. /String handling operations in a programming language

89 exam-style questions on AQA GCSE Computer Science String handling operations in a programming language. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank