subject

If name is a String instance variable, average is a double instance variable, and numOfStudents is a static int variable, why won’t the following code from a class compile?public Student(String s) {name = s;average = getAverage(name);numOfStudents++;}p ublic double getAverage(String x) {numOfStudents++;double ave = StudentDB. getAverage(x);return ave;}public static void setAverage(double g) {average = g;}a. The setAverage() method can’t access the average instance variable. b.The getAverage() method can’t increment the numOfStudents variable. c.The constructor can’t increment the numOfStudents variable. d.The getAverage() method can’t call a static method in the StudentDB class.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Aobject is used for displaying the results of a question based on stored data. a. query b. report c. table d. form
Answers: 2
question
Computers and Technology, 25.06.2019 02:30
What group of plants produce fruit? question 2 options: gymnosperms nonvascular plants seedless vascular plants angiosperms
Answers: 1
You know the right answer?
If name is a String instance variable, average is a double instance variable, and numOfStudents is a...
Questions
question
Mathematics, 07.12.2020 19:20
question
Mathematics, 07.12.2020 19:20
question
Mathematics, 07.12.2020 19:20
question
Mathematics, 07.12.2020 19:20
Questions on the website: 13722362