Answer:
Pulling related code together in objects is Arrays
Helps programmers when they revisit code or are new to code-- Documentation
Explanation:
This is all I know
Explanation:
A.)
we have two machines M1 and M2
cpi stands for clocks per instruction.
to get cpi for machine 1:
= we multiply frequencies with their corresponding M1 cycles and add everything up
50/100 x 1 = 0.5
20/100 x 2 = 0.4
30/100 x 3 = 0.9
CPI for M1 = 0.5 + 0.4 + 0.9 = 1.8
We find CPI for machine 2
we use the same formula we used for 1 above
50/100 x 2 = 1
20/100 x 3 = 0.6
30/100 x 4 = 1.2
CPI for m2 = 1 + 0.6 + 1.2 = 2.8
B.)
CPU execution time for m1 and m2
this is calculated by using the formula;
I * CPI/clock cycle time
execution time for A:
= I * 1.8/60X10⁶
= I x 30 nsec
execution time b:
I x 2.8/80x10⁶
= I x 35 nsec
Answer:
public Clock(int hours) {
this.hours = hours;
}
Explanation:
In Java programming language, Constructors are special methods that are called to initialize the variables of a class when a new object of the class is created with the new keyword. Consider the complete code for the class below;
<em>public class Clock {</em>
<em> private int hours;</em>
<em> public Clock(int hours) {</em>
<em> this.hours = hours;</em>
<em> }</em>
<em>}</em>
In this example above, an object of this class can created with this statement Clock myclock = new Clock(6); This is a call to the constructor and passes a parameter (6) for hours
Whatwhatwhatwhat???????????
Answer:
true I know this cuz I smart