Sunday, December 16, 2018

REFLECTION ON LAB9

Greetings, lovely people ❤❣❤ !! Today I'm here to talk about our lab 9 assignment topic on Single-Dimensional Array. At the end of this lab I should be able to declare, create, initialize and process single-dimensional array. Besides, I also could to program common array operations and also could able to apply array in application development.

This week lab contained 9 questions. First question, was given to write statement for seven sub questions. For the second question I need to identify and fix errors for the following code given which attempts to assign random numbers to an array of 100 integers. I found question number 1 and 2 were not that hard, I could still managed to do.

Starts the challenges from the third question onward. I need to write program that reads in 'n' integers and sort them in increasing order.



Furthermore, fourth question I need to write a program that randomly generates 'n' integers between 0 and 10 and counts the occurrence of each. 



For the fifth question, I need to write a program that reads an unspecified number of scores and determines how many scores are above or equal to the average, and how many scores are below the average. Enter a negative number to signify the end of the input. Assume maximum score is 100. 



Question 6



Answer :




In question 7, I must write a test program that prompts the user to enter ten numbers, invokes this method to return the maximum value, and displays the maximum value. 



In question 8 a program need to be written to prompt the user to enter the number of students, the students’ names, and their scores and prints student names in decreasing order of their scores. Assume the name is a string without spaces, use the Scanner’s next() method to read a name.

That is all for this week guys. Take care till we meet again☺.

THANK YOU FOR READING !!!

Pritah D/O Subramaniam (185797)


Next blog : yanhua0112.blogspot.com 

No comments:

Post a Comment