Method 1
Method 2
Question 3 in the exam
Sample code