Question

1. Given the array grade created as: int [] grade = {75, 80, 67, 95, 98,...

1. Given the array grade created as: int [] grade = {75, 80, 67, 95, 98, 88}; Fill in the following table with the required information.                                         

            What is the value of  grade.length ? _________

            What is the value of grade[1] ?        _________

2. Write a get method (also known as a accessor method) for the hasNotPaid attribute.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)

What is the value of grade.length ?
Answer: 6

What is the value of grade[1] ?
Answer: 80

2)

public boolean getHasNotPaid() {
    return hasNotPaid;
}
Add a comment
Know the answer?
Add Answer to:
1. Given the array grade created as: int [] grade = {75, 80, 67, 95, 98,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a Java program: Given an int array grades int[] grades={89, 80, 78, 60, 38, 92,...

    Write a Java program: Given an int array grades int[] grades={89, 80, 78, 60, 38, 92, 72, 88}, find how many “B” among these grades, (80<=B<90) Print out how many “B”s in this grade.

  • TestScores . SIZE: int //size of the array scores: int [ 1 estScores findMax ( )...

    TestScores . SIZE: int //size of the array scores: int [ 1 estScores findMax ( ) : int findMin ) int findScore (value: int): bool res(): int Write the constructor method. It fills the array with random number from 0-100. Find below the code to get your started 1. public TestScores () Random rand -new Random); for (int i-0 i<SIZE i+) socresi] -rand.nextInt (101); Finding the maximum value in an array. Write the method findMax. It returns the maximum value...

  • Question 2 Emma 60 Noah 75 Olivia 95 Mason 80 Liam 65 Sophia 82 Isabella 75...

    Question 2 Emma 60 Noah 75 Olivia 95 Mason 80 Liam 65 Sophia 82 Isabella 75 Ethan 98 James 93 Charlotte 87 2a. What is the mean of the mid-term test scores? Mean =        = 60+75+95+80+65+82+75+98+93+87= 810/10= 81                2b. What is the standard deviation of the mid-term test scores? Names Score Deviations from Mean(X-Mean) Squared Deviations Emma 60 -21 441 Noah 75 -6 36 Olivia 95 14 196 Mason 80 -1 1 Liam 65 -16 256 Sophia 82 1 1...

  • help 6. (15 points) Define class GradeStat to describe the grades of all people in a...

    help 6. (15 points) Define class GradeStat to describe the grades of all people in a group. (1) Declare data member grades as an array of integers (we can declare it as a double type, but use int type can be simpler). (2) Write a constructor taking an array of int as input parameter. Use it to initialize data member. Note that each element in the array should be a non- negative int not larger than 100, that is, an...

  • QUESTION 1 Using the following declarations and a member of the Array class, int [ ]...

    QUESTION 1 Using the following declarations and a member of the Array class, int [ ] bArray = new int [10]; int location; Using a method in the Array class, write a statement that would change the order of the elements in the bArray array. The contents of the first cell should hold what was in the last cell. The second cell should hold what was in the next to last cell. __________________________ HINT: You must write the full statement...

  • An integer array is created as follows: int [ ] num = {1, 2, 3, 4,...

    An integer array is created as follows: int [ ] num = {1, 2, 3, 4, 5, 6}; What is the value of   int[2] Question 3 options: 1 2 3 4

  • please help getting the functional group of this cpd based on IR result 98- 95- 90- 85- 80 75- 70- 65- 60- 1500 1...

    please help getting the functional group of this cpd based on IR result 98- 95- 90- 85- 80 75- 70- 65- 60- 1500 1000 500450 56 4000 2000 2500 3000 3500 cm-1 1% 98- 95- 90- 85- 80 75- 70- 65- 60- 1500 1000 500450 56 4000 2000 2500 3000 3500 cm-1 1%

  • Midterm1 = (83.33, 98.33, 75, 91.67, 96.67, 95, 86.67, 65, 100, 100, 80, 88.33, 96.67, 96.67,...

    Midterm1 = (83.33, 98.33, 75, 91.67, 96.67, 95, 86.67, 65, 100, 100, 80, 88.33, 96.67, 96.67, 90, 96.67, 86.67, 93.33, 80, 91.67, 98.33, 86.67, 85, 86.67, 95, 83.33, 96.67, 81.67, 98.33, 100, 95, 93.33, 91.67, 88.33, 98.33, 93.33, 98.33, 93.33, 85, 88.33, 100, 98.33, 96.67, 90, 86.67, 100, 96.67, 98.33, 90, 96.67, 86.67, 95, 78.33, 86.67, 100, 81.67, 96.67, 91.67, 96.67, 96.67, 95, 96.67, 73.33, 100, 93.33, 96.67, 88.33, 70, 96.67, 96.67, 100, 88.33, 96.67, 100, 88.33, 100, 78.33, 93.33,...

  • Please write in MATLAB code: 1. Write a function called myMin4 that will take in four...

    Please write in MATLAB code: 1. Write a function called myMin4 that will take in four numbers and returns the minimum value. You may NOT use the built-in min() function. Run the function for the following: myMin4(4, 8, 12, 15) myMin4(18, 9, 1, 6) myMin4(8, -2, 2, 10) 2.   Write a function called classAverage that takes in an array of numbers and returns the letter grade of the class average. The grade ranges are as follow: Average >90 = A...

  • 23.1 Append to Oversize Array Java Help Given an oversize array with size1 elements and a...

    23.1 Append to Oversize Array Java Help Given an oversize array with size1 elements and a second oversize array with size2 elements, write a method that returns the first array with the elements of the second appended to the end. If the capacity of the oversize array is not large enough to append all of the elements, append as many as will fit. Hint: Do not construct a new array. Instead, modify the contents of the oversize array inside the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT