Answer:
Explanation:
The question above is missing many details and are actually various questions in one. I will answer each one seperately below...
A. The piece of code to get the ID in this code snippet that needs to replace XXX would be the following ... System.out.println("Student ID: " + s.getID());
B. A static main() can declare and create objects. Once these objects are created their instance methods can then be called.
C. Integer score1 = 72;
int score2 = 85;
Character grade = 'C';
In the above code snippet, the information stored in score1, score2, and grade are the following... obj reference, 85, obj reference. This is becasue both Integer and Character are classes and the values being passed to their variables are referencing that object class, while score2 is a primitive type of int and is therefore simply a number.
D. The statement that is true is ... Contents of a Double instance can be modified after initialization. Objects can be modified by calling its setter methods after initializing it.
Answer:
The answer is "For the stop and wait the value of S and R is equal to 1".
Explanation:
- As we know that, the SR protocol is also known as the automatic repeat request (ARQ), this process allows the sender to sends a series of frames with window size, without waiting for the particular ACK of the recipient including with Go-Back-N ARQ.
- This process is mainly used in the data link layer, which uses the sliding window method for the reliable provisioning of data frames, that's why for the SR protocol the value of S =R and S> 1.
A kilobyte (KB) is 1,024 bytes, not one thousand bytes as might be expected, because computers use binary (base two) math, instead of a decimal (base ten) system. Computer storage and memory is often measured in megabytes (MB) and gigabytes (GB). A medium-sized novel contains about 1 MB of information.
Answer:
I am doing it with python.
Explanation:
nums = '9 -8 -7 -6 -5 -4 -2 0 1 5 9 6 7 4'
myfile = open('data.txt', 'w')
myfile.write(nums)
myfile.close()
myfile = open('data.txt', 'r')
num1 = (myfile.read())
num1 = num1.split()
print(num1)
print(type(num1))
for x in num1:
x = int(x)
if x < 0:
minus = open('dataminus.txt', 'a')
minus.write(str(x) + ' ')
minus.close()
elif x>= 0:
plus = open('dataplus.txt', 'a')
plus.write(str(x)+' ')
plus.close()