1. A person burns 160 calories per 30 min. of walking and 270 calories per 30 min. of swimming. Write a fragment of code for an app that accepts number of minutes a user plans walking and swimming through textboxes and produces an estimate for number of calories burnt.
2. A user enters one of the three province codes in a text box txtProvinceCode (QC – Quebec, ON – Ontario, NS – Nova Scotia). Write a code fragment that would show the full name of the province. If there is no matching province, it should show “No province found”. Use the most appropriate decision structure.
3. An enrollment in an XYZ major in a currently is 400 students. It is estimated that it will be growing each year by 5% for the next five years. However, after year 5 the growth will slow down to 2% per year. Write a fragment of code that shows the year and enrollment for that year for the next 10 years starting with the current year in a list box called lstEnroll. Assume the current year is 2019.