Java Reference
In-Depth Information
EXERCISES
1
1. Mark the following statements as true or false.
a. The first device known to carry out calculations was the Pascline.
b. Modern-day computers can accept spoken-word instructions, but can-
not imitate human reasoning.
c. In Unicode, every character is coded as a sequence of sixteen bits.
d. The arithmetic operations are performed inside the CPU and, if an
error is found, it outputs the logical errors.
e. A sequence of 0s and 1s is called a decimal code.
f. A Java compiler is a program that translates a Java program into bytecode.
g. Bytecode is the machine language of the JVM.
h. The CPU stands for command performing unit.
i. RAM stands for readily available memory.
j. A program written in a high-level programming language is called a
source program.
k. ZB stands for zero byte.
l. The first step in the problem-solving process is to analyze the problem.
2. Name two input devices.
3. Name two output devices.
4. Why is secondary storage needed?
5. What is the function of an operating system?
6. What are the two types of programs?
7. What are the differences between machine languages and high-level
languages?
8. What is a source program?
9. What kind of errors are reported by a compiler?
10. Why do you need to translate a program written in a high-level language
into machine language?
11. Why would you prefer to write a program in a high-level language rather
than a machine language?
12. What are the advantages of problem analysis and algorithm design over
directly writing a program in a high-level language?
13. Design an algorithm to find the weighted average of four test scores. The four
test scores and their respective weights are given in the following format:
testScore1 weightTestScore1
...
 
 
Search WWH ::




Custom Search