Section 1: Software design and development, and Computer systems
A program is required for passengers to book a ticket on a bus.
(a) Passengers must enter their destination and their age when making a booking, as some will qualify for free travel.
Complete the table below to state the most suitable data types that should be used.
| Variable name | Sample data | Data type |
|---|---|---|
| passengerAge | 78 | |
| destination | Ullapool |
2 marks
(b) Write a line of code that will randomly allocate a seat number and store this in the variable seatNum.
There are 50 seats available.
2 marks