Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Don\'t worry about what this class does. We\'re asking about Java language eleme

ID: 3917420 • Letter: D

Question

Don't worry about what this class does. We're asking about Java language elements. Select the members of this class

01: public class StrCharCounter
02: {
03:
04: private ArrayList < String > store = new ArrayList<>();   
05: private int size = 0;
06:
07: public boolean add(String sToAdd)
08: {
09: size++;
10: if (!store.contains(sToAdd))
11: return store.add(sToAdd);
12: else
13: return false;
14: }
15:
16: public int calcTotalLength()
17: {
18: int cnt = 0;
19: for (int i = 0; i < size; i++)
20: {
21: cnt += store.get(i).length();
22: }
23: return cnt;
24: }
25: }

      
StrCharCounter
?      
store
?      
size
?      
add
?      
calcTotalLength
?      
cnt
?      
i
?      
This class has no members

Explanation / Answer

member of the class are member variables and the member function so in the given program below are the

member variables...


store

size

memebr functions are..

  
add     


calcTotalLength
  

=======================================================

Kindly Check and Verify Thanks..!!!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote