Here's the full question;
<em>Assume the following partial declarations have been made, with default (no parameter) constructors for the classes.</em>
<em />
<em>public abstract class Player</em>
<em>public class ComputerPlayer extends Player;</em>
<em>public class SmartComputerPlayer extends ComputerPlayer;</em>
<em />
<em>Consider the following declarations.</em>
<em />
<em>I. ComputerPlayer playerA = new SmartComputerPlayer();</em>
<em>II. Player playerB = new SmartComputerPlayer();</em>
<em>III. Player playerC = new Player();</em>
<em />
<em>Which of these declarations will compile correctly?</em>
A.) I only
B.) II only
C.) III only
D.) I and II
E.) II and III
<u>Answer:</u>
<u>C)</u>
Explanation:
One of the rules of Java programming is that it must have a class which is a blueprint that informs about the behavior that the object of that class support.
If we go by the strict rules of Java programming only the class declaration;
Player playerC = new Player();
would compile correctly.
All other options would result in compiler error.
Answer:
array = input("Enter the list of computer memory: ").split(',')
int_arr = [int(x) for x in array]
segment = int(input("Enter the length of segment to analyze: "))
list_len = len(int_arr)
segList = []
mini = []
for x,i in enumerate(int_arr):
seg = int_arr[i-1:segment+i-1]
if len(seg) == segment:
segList.append(seg)
for x in segList:
mini.append(min(x))
result = mini.index(min(mini))
print("Segment with the minimum memory is: ",segList[result])
Explanation:
The python program prints out the segment after analysis, with the smallest disk memory space. The code gets the array of computer rows from the user input and segments the array with the number of segment input, then the minimum is compared for all segments in the network.
Here's the official definition:
It is generally a long or extreme-long shot<span> at the beginning of a scene indicating where, and sometimes when, the remainder of the scene takes place. </span>Establishing<span> shots were more common during the classical era of filmmaking than they are now.</span>
Plastic is not always really durable, but the chemicals and what makes plastic helps with the durability. As a pliable polymer, plastics are made from long chains of synthetic or semi-synthetic molecules. All its carbon-to-carbon bonds hold these molecules together. The bonds is what makes plastics so durable.