If it stores any type of objects mixed, use Object as storage class. All classes inherit from Object and for primitives use their respective wrapper classes. Or just use one of the bazillion container classes that already exist.
Answer:
Explanation:
The following is written in Java. It continues asking the user for inputs until they enter a -1. Then it saves all the values into an array and calculates the number of values entered, the highest, and lowest, and prints all the variables to the screen. The code was tested and the output can be seen in the attached image below.
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
class Brainly {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int count = 0;
int highest, lowest;
ArrayList<Integer> myArr = new ArrayList<>();
while (true) {
System.out.println("Enter a number [0-10] or -1 to exit");
int num = in.nextInt();
if (num != -1) {
if ((num >= 0) && (num <= 10)) {
count+= 1;
myArr.add(num);
} else {
System.out.println("Wrong Value");
}
} else {
break;
}
}
if (myArr.size() > 3) {
highest = myArr.get(0);
lowest = myArr.get(0);
for (int x: myArr) {
if (x > highest) {
highest = x;
}
if (x < lowest) {
lowest = x;
}
}
System.out.println("Number of Elements: " + count);
System.out.println("Highest: " + highest);
System.out.println("Lowest : " + lowest);
} else {
System.out.println("Number of Elements: " + count);
System.out.println("No Highest or Lowest Elements");
}
}
}
Answer:
The formula to enter in E14 is as follows:
=DAYS(D14,$E$10)
Explanation:
Required
Formula to calculate the number of days between E10 and D14
The syntax to do this is:
=DAYS(end_date,start_date)
So, we have:
=DAYS(D14,E10)
The question requires a mix of relative and mixed references because cell E10 will be constant in calculating the difference for dates in other cells.
In other words, the initial date is constant for all
So, the update formula is:
=DAYS(D14,$E$10)
Notice the $ between in E10; this represents mixed referencing
When dragged to E15 till E68, the formulas in the respective cells will be:
=DAYS(D15,$E$10) .............................. =DAYS(D68,$E$10)
What are you talking about?
You want to use proper etiquette and be polite, do not call them by their first name and always refer to them as Mr., or Mrs. Use an extended vocabulary and do not talk about yourself. If you have proper grammar, depending on the job, that can be seen as intelligence. And always use an appropriate closing that is respectful. Such as, Sincerely, John Doe.