Friday, December 21, 2018

REFLECTION ON LAB 10

Hello people glad to tell you guys that this will be my last lab assignment which is lab assignment 10. It contained 4 questions and the topic is on Array. At the end of this lab I could able to define, declare and process array. Besides, I can also able to solve problem using array.

This week's lab was really really hard and it took a long time to settle down. At last I managed to do with the help of my tutor and fellow friends successfully. Here goes the working for the questions that really took time for me to settle down.

First question I need to write a program that uses a String array to hold the five students’ names, an array of five characters to hold five students’ letter grades, and five arrays of four doubles each to hold each student’s set of test scores. The program should have methods that return a specific students’ name, average test score, and a letter grade based on the average. It was really hard for me to settle this question and luckily I managed to do.





Furthermore, I found the second also abit hard . But at least I have completed finally.


Alright that is all from me guys. Than you so much for reading my blog .. Take care dear all till we meet again ❤❤❤...


Pritah D/O Subramaniam (185797)


Next blog : yanhua0112.blogspot.com 

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 

Friday, December 7, 2018

REFLECTION OF 29-11-2018

Hello dear people, its me again meeting you guys. As always hope you guys doing really really well there !! This week's lab is about "Methods". A method is a collection of statements that are grouped together to perform an operation. We could able to do three main things at the end of this lab which are to define and invoke various types of methods, to develop reusable code that modular, easy to read, easy to debug and easy to maintain and the last one to apply the concept of method abstraction and step-wise refinement in software development.

In this week class we have been thought about the subtopic of "overloading" by our lecturer Dr.Erzam. Firstly, let me explain what I have understand from the above topic. Method overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different. It is similar to constructor overloading in Java, that allows a class to have more than one constructor having different argument lists.

There are three types of method overloading:
  1. Number of parameters
  2. Data type of parameters
  3. Sequence of data type of parameter
We have been given 5 questions for this lab and I'll share with you guys the questions and answers once I have completed it. That's all from me for this week guys, have a happy weekend! Take care ❤❣❤

THANK YOU FOR READING !!!


Pritah D/O Subramaniam (185797)


Next blog : yanhua0112.blogspot.com