What do you understand by the term constructor in java, JAVA Programming

Assignment Help:

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.


Related Discussions:- What do you understand by the term constructor in java

What is an abstract class, What is an abstract class? Abstract class mu...

What is an abstract class? Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie. you may not

What is the parent class for all swing components? , Design pattern : As y...

Design pattern : As you may look from the diagram given below, containers collect components. Sometimes you want to accumulate a container to another container. So, a container co

JAVA IF/ ELSE, #This assignment will give you practice with interactive pro...

#This assignment will give you practice with interactive programs, if/else statements and methods that return values. You are to write a program that prompts the user for informati

Write a java code to explain else if, Write a java code to explain Else If ...

Write a java code to explain Else If ? if statements are not limited to two cases. You can merge an else and an if to form an else if and test a overall range of mutually exclu

Need java, Need JAVA,SPRING,JSF(primefaces) Application Support Project ...

Need JAVA,SPRING,JSF(primefaces) Application Support Project Description: We want someone to be part of our team's new development, it's minute application but in future, cha

Using polymorphism to write a program to display digital clo, using polymor...

using polymorphism to write a program to display digital clock

Tasks with the classes Currency, In this assignment you work on a set of ta...

In this assignment you work on a set of tasks with the classes Currency, Money and Bank. Money and Currency You have been given a template for the Currency and Money classes (Lab1.

Explain the for loop in java, Explain the for loop in java? // This is ...

Explain the for loop in java? // This is the Hello program in Java class Hello { public static void main (String args[]) { System.out.print("Hello "); // Say Hello

Explain the execute phase of java program development, Explain the Execute ...

Explain the Execute phase of Java Program Development Finally in phase computer, under the control of its CPU, interprets program one bytecode at a time. Hence performing

What is a variable in java program, What is a variable in Java program? ...

What is a variable in Java program? It's a memory location. Memory location is given some name. Memory location is being assigned some value. Value may change o

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd