Constructor in java program


Question 1: Define each of the following terms with an illustration:

a) Class
b) Instance Variable
c) Instance Method

Question 2: Determine the errors.

Class house
{
int width;
int length;
int height;
}

Question 3: What do you mean by the term constructor?

Question 4: Illustrate the use of "this" keyword?

Question 5: Make a class called student with the given characteristics and behavior. The student is given an exclusive serial number starting with '1'. The student has name, address. He appears in the exams for three different subjects. The class must be able to give the grade of the student on the basis of the given criterion.

Total Marks Grade

80-100 "Excellent"
65-80 "Good"
50-65 "Pass"
< 50 "Fail"

Use the constructor to input Roll No and name, and one instance method to store the marks.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Constructor in java program
Reference No:- TGS08714

Expected delivery within 24 Hours