Answer:
None
Explanation:
These are all stereotypes. Sure, there are definitely some people who fit their stereotypes, but not all. It's just a generalization at the end of the day. I can't really agree with any of them due to the fact that it's all stereotyping.
Perhaps you feel differently, and believe that some of these example are true. I can't though, sorry. Hope this take helps.
In python:
i = 1
lst1 = ([])
lst2 = ([])
while i <= 5:
person1 = int(input("Enter the salary individual 1 got in year {}".format(i)))
person2 = int(input("Enter the salary individual 1 got in year {}".format(i)))
lst1.append(person1)
lst2.append(person2)
i += 1
if sum(lst1) > sum(lst2):
print("Individual 1 has the highest salary")
else:
print("Individual 2 has the highest salary")
This works correctly if the two individuals do not end up with the same salary overall.
The program illustrates the use of catching exceptions using try and catch.
- Exceptions are simply errors that can crash a program
- Try and catch are used to prevent errors from crashing a program
The required try and catch block is as follows:
<em>try {
</em>
<em> System.out.print(names[index]);
</em>
<em> }
</em>
<em> catch (ArrayIndexOutOfBoundsException e) {
</em>
<em> System.out.println(e.getMessage());
</em>
<em>}</em>
The flow of the above code segment is as follows:
First, we begin with the try block
<em>try {</em>
Then the program prints the element at the index
<em> System.out.print(names[index]); }</em>
If the index does not exist in the array (e.g. -1 or 11), then the catch block is executed
<em> catch (ArrayIndexOutOfBoundsException e) {</em>
This prints the appropriate exception
<em> System.out.println(e.getMessage());
}</em>
See attachment for sample run
Read more about similar programs at:
brainly.com/question/21330187
Answer:
1 C
2 D
3 B
4 A
5 D
6 B (the question should state software that manages ...)
7 D
8 C
9 A
10 B
11 C
12 D
13 B
Explanation:
If a class contains more than one constructor, computer determines the appropriate constructor by matching all the attributes, like the number, data type and position. Here's the example where the row public AirConditioner(){} is the default constructor that can use <span>default settings or initialize manually (sorry for tabulation, not my fault)</span>:
<span>class AirConditioner{ enum ConditionerMode{ Automatic, } public ConditionerMode Mode; public int MinTemperature = 18; public int MaxTemperature = 20;
public AirConditioner(){ }
public AirConditioner(ConditionerMode mode){ Mode = mode; } public AirConditioner(ConditionerMode mode, int MinTemp, int MaxTemp){ Mode = mode; MinTemperature = MinTemp; MaxTemperature = MaxTemp; }}</span>