Answer:
Here is the program for the given question
Explanation:
class StringSet
{
ArrayList<String> arraylist; //a reference variable of ArrayList of generic type String
//A no argument constructor.
public StringSet()
{
arraylist=new ArrayList<String>(); //instantiating the ArrayList object
}
//A mutator that adds a String newStr to the StringSet object.
void add(String newStr)
{
arraylist.add(newStr); // add(String) method to add string to the arraylist
}
//An accessor that returns the number of String objects that have been added to this StringSet object.
int size()
{
return arraylist.size(); // size() method which gives the number of elements in the list
}
//An accessor that returns the total number of characters in all of the Strings that have been added to this StringSet object.
int numChars()
{
int sum = 0;
for(String str:arraylist) //for-each loop; can be read as for each string in arraylist
{
sum+=str.length();
}
return sum;
}
//An accessor that returns the number of Strings in the StringSet object that have exactly len characters.
int countStrings(int len)
{
int count = 0;
for(String str:arraylist)
{
if(str.length() == len)
count++;
}
return count;
}
}
Answer:
A how I feel about myself
Explanation:
Self-esteem is your overall opinion of yourself — how you feel about your abilities and limitations. When you have healthy self-esteem, you feel good about yourself and see yourself as deserving the respect of others. When you have low self-esteem, you put little value on your opinions and ideas.
Answer: implicit
Explanation:
When a value of one data type is assigned to a variable of another data type, then Visual Basic attempts to perform an implicit type conversion.
Implicit type conversion, simply refers to when one data type is converted automatically by Python to another data type. It should be noted that no user involvement is needed.
Answer:
Modulus operator are useful in many circumstances and it is commonly used to generate the random number. It basically reduce the number into random number in a small range.
It also describe that whether, the one number is a factor of another or not.
In C language, the modulus operator provide the remainder after diving the greater value with the smaller value. If the smaller number are divided by the larger number then, the quotient become zero.
Answer:
when Gandhi was born he had nothing to do with the internet. nothing can connect Gandhi to the internet.
Explanation:
Gandhi was an Indian activist who was the leader of the Indian independence movement against British colonial rule. therefore, there is no connection.