LABORATORY ACTIVITY 2 I. OBJECTIVES: At the end of the experiment students must be able to: Cognitive a) understand the input-process-output b) understand how operators are used c) identify the different Java operators . Psychomotor: b) construct a program that asks inputs from user, uses different operators and performs calculations with the use of different operators. Affective a) appreciate the concept behind operators. II. BACKGROUND INFORMATION Use unary and arithmetic operators for basic mathematical operations • Use string operator to concatenate strings • Use relational operators to compare objects • Use logical operators to compare boolean values • Use assignment operators to assign values to variables III.EXPERIMENTAL PROCEDURE: 1. Declaring and printing variables. Given the table below, declare the following variables with the corresponding data types and initialization values. Output to the screen the variable names together with the values.
- Spring '16
- Orders of magnitude, ISO 4217, relational operator