Answer:
B) A block of statement that might cause an exception.
Explanation:
Exception handling is a good programming technique that prevents our program from crashing when an exception occurs during execution. The try clause is used with a catch to handle any exception that might occur, so whenever a statement that might cause an exception is to be used, this should be contained in a try statement block of code.
Alternative 1:A small D-cache with a hit rate of 94% and a hit access time of 1 cycle (assume that no additional cycles on top of the baseline CPI are added to the execution on a cache hit in this case).Alternative 2: A larger D-cache with a hit rate of 98% and the hit access time of 2 cycles (assume that every memory instruction that hits into the cache adds one additional cycle on top of the baseline CPI). a)[10%] Estimate the CPI metric for both of these designs and determine which of these two designsprovides better performance. Explain your answers!CPI = # Cycles / # InsnLet X = # InsnCPI = # Cycles / XAlternative 1:# Cycles = 0.50*X*2 + 0.50*X(0.94*2 + 0.06*150)CPI= 0.50*X*2 + 0.50*X(0.94*2 + 0.06*150) / X1= X(0.50*2 + 0.50(0.94*2 + 0.06*150) ) / X= 0.50*2 + 0.50(0.94*2 + 0.06*150)= 6.44Alternative 2:# Cycles = 0.50*X*2 + 0.50*X(0.98*(2+1) + 0.02*150)CPI= 0.50*X*2 + 0.50*X(0.98*(2+1) + 0.02*150) / X2= X(0.50*2 + 0.50(0.98*(2+1) + 0.02*150)) / X= 0.50*2 + 0.50(0.98*(2+1) + 0.02*150)= 3.97Alternative 2 has a lower CPI, therefore Alternative 2 provides better performance.
Answer:
five types of pointing devices
Explanation:
Ponting devices
Pointing means point something and the pointing devices are the input /peripheral devices those are used to point the pointer on the screen. We do move cursor on the screen to open the files or any icon.
There are many types of pointing devices but these are quite common which are given below
- Computer mouse
- Finger on touch screen.
- Joystick.
- Leap Motion.
- Light pen (pen)
1.Mouse
Mouse is most common type of input device that is used for pointing the data on the screen. We press it with our hands and keep pointing the things.
There are three types of mouse
- optical mouse
- wireless mouse
- trackball mouse.
2. Finger on touch screen
In this type of movement the fingers are input devices those we use to see the movement of pointer on the screen and this is most common in this century.
3.Joystick.
Joystick is another input device to point the cursor but it is mostly used in games. Children can use it smartly so it is inculcated in games usually.
4. Leap Motion
The Leap Motion (LM) controller is a latest 3D sensing device for hand posture interaction with a computer. It is having the capability sense the location of the fingers of the hands, as well as the palm position.
5.Light Pen
this is another pointing device which is mostly used to highlight and select the data on the screen.
Note: All of these above pointing devices are most common used now a days. These devices are having new conventions day by day for the ease of user. This era is basically the era of IT ,so the use of computer must be so easy and conventional for the user so, the innovations and improvement in such devices is made side by side.
Answer:
I think it's A, def drawDiamond():
Explanation: