Answer all the questions on the same document. Please work on the questions diligently as they take 30% of my final grade. Thanks. Good luck.
Question 1
(a) A program is required to display all the numbers between 20 and 50, which are not divisible by 7.
(i) Draw the flowchart diagram.
(ii) Write the program.
(b) Write a program that has a class called METHODS which consists of two methods called AVERAGE() and CONVERSION(), for computing the average of three numbers to 2 decimal points, and for converting a string statement from capital letters to small letters, respectively. Instantiate an object called OBJ and use it to invoke the methods.
Question 2
(a) Identify an example of an application area where a multi-dimensional array may be preferred to a 1-D array. Justify your answer.
(b) Write a program that uses a 2-D array to generate a multiplication table of numbers in the form shown below.
1
2
3
….
1
1
2
3
….
2
2
4
6
….
3
3
6
9
….
.
.
.
.
.
.
.
.
….