Skip to content

Course home

String handling operations in a programming language

String handling operations in a programming language

EasyMedium
1234567891011121314151617181920
Question 18

A book publisher wants to create catalogue codes for each book they print.

Figure 5 shows some of the books.

bookIDtitlepublisher
B1THE HOBBITGEORGE ALLEN
B2FRANKENSTEINLACKINGTON
B3DRACULACONSTABLE

A catalogue code is made up of the:

  • bookID
  • first letter and second letter in title
  • first letter of the publisher

For example:

  • the catalogue code for THE HOBBIT would be B1THG
  • the catalogue code for FRANKENSTEIN would be B2FRL

Write a VB.NET program to create the catalogue code for a book.

The program should:

  • get the user to enter the bookID, title and publisher
  • create the catalogue code according to the rules above
  • assign the catalogue code to a variable called code

You should use meaningful variable name(s) 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