Uploaded by Takhia Gaither

Java Chapter 3 Review Guide

advertisement
Name:
Date:
Period:
Chapter 3 Review Guide
Introducing Java
1. What is a Class and what is an Object?
2. What is statement?
3. What is a method?
4. Write the Code: (try to first do this without looking at your previous programs or other code)
Starting with the comment blocks at the top, write the code for a program called ‘Hello World!’ where
the class is called ‘HelloWorld’ and in the controlling class a print statement is used to produce the
output ‘Hello World!’ (use correct Coding Conventions, indentations & Syntax!)
Name:
Date:
Period:
Name & describe the 4 escape sequences:
-
6. What is a String?
7. Write the Code:
Class name, and controlling class (main method) and write the code for a program that will produce the
following output:
3
2
1
“Blastoff!”
Name:
Date:
Period:
8. Write the Code:
Class name, and controlling class to write the code for a program that will produce the following output:
Thank
Goodness
It’s
Friday!
9. What is an Algorithm?
10. What is a Flow Chart?
Name:
Date:
11. Draw the Flow Chart for a program that displays your name, birthday, and place of birth.
12. What are the different types of comments used in programming? (2 types)
13. What is a statement in Java (page 61)?
14. How do you run/ execute a Java program in BlueJ? (explain the steps)
15. Give an example of code using the format() method of something with 5 columns:
16. Explain the numbers (alignment & width) for using the format() method:
17. What is a code convention?
18. Why should code conventions be used?
19. Name the 7 code conventions from Chapter 3 (page 65):
Period:
Name:
20. Define the following important Java terms:
-Argument –
-Interpreter –
-Machine Code –
-Source Code –
-Syntax Error –
Date:
Period:
Download