Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
Question 24

Write a VB.Net program that calculates the total boarding fee for a dog at a pet kennel based on the dog's weight and the number of boarding days.

The program should:

  • Prompt the user to input the dog's weight in kilograms (as a decimal, e.g. 18.5).
  • Prompt the user to input the boarding duration (as a whole number of days).
  • Calculate and output the total boarding fee based on these criteria:
    • If the duration is less than or equal to 7 days and the dog's weight is greater than 45 kg, then the total fee is a flat rate of 150.00.
    • If the duration is greater than 7 days, then the fee is the number of days multiplied by 18.50 plus a one-off premium of 25.00.
    • Otherwise, the fee is the number of days multiplied by a rate of 22.00.

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

[7]
Markscheme

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts

298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank