questiona what are the main differences between


Question:

(a) What are the main differences between an object and a class? Illustrate with appropriate examples.

(b) Differentiate between a global variable and a local variable. You may use a simple Java program to illustrate your answer.

(c) What do you understand by the term ‘constructor' in Java? Explain your answer with an appropriate example.

(d) Declare and initialise an array of type float of size 5 to store the marks obtained by a student at his examinations. Initialise the array with the following values {65, 57, 75, 49, 88}.

Write the code fragments in Java to find:

(i) the average mark obtained by the student at the examinations.
(ii) the highest mark obtained by the student.
(iii) the lowest mark obtained.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: questiona what are the main differences between
Reference No:- TGS0373962

Expected delivery within 24 Hours