PROGRAMMING
REVIEW QUESTION_3.2
WRITE DOWN YOUR NAME & CLASS
1..
What data types would you use to represent
the following item?
i. the number of student in a class
________________
ii. the grade (a letter) attained by a student in
the class
__________________
iii. the average mark in a class 2
___________________
2..
Write the Java statement to declare the variables
for the given sentences:
i. To declare the variable Test as double
variable.
ii. To declare variable Grade as character
variable.
iii. To declare two variables namely as first and
last that will store the first name and the last
name of a person’s name.
iv. To declare the variable x and y as double
variable and assign the value 2.5 and 3.5
respectively .
3
3..
List three(3) rules for forming valid
identifiers
4..
Are these identifiers valid or invalid?
1. N0_of_kilo
2. Myfirst.c
3. _abc
4. 3X
5. %change
6. _123
7. Data-1
8. ABC123
5..
Give 5 examples of reserved word in
Java programming.
END OF QUESTIONS