pre5.3 - Prelab Exercises Sections 5.1-5.3 1 Rewrite each...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Prelab Exercises Sections 5.1-5.3 1. Rewrite each condition below in valid Java syntax (give a boolean expression): a. x > y > z b. x and y are both less than 0 c. neither x nor y is less than 0 d. x is equal to y but not equal to z 2. Suppose gpa is a variable containing the grade point average of a student. Suppose the goal of the program is to let a student know if he/she made the Dean's list (the gpa must be 3.5 or above). Write an if. .. else. .. statement that prints out the appropriate message (either "Congratulations -- you made the Dean's List" or "Sorry you didn't make the Dean's List"). if (gpa >= 3.5) System.out.println("Congratulations -- you made the Dean's List"); else System.out.println("Sorry you didn't make the Dean's List"). 3. Complete the following program to determine the raise and new salary for an employee by adding if . .. else statements to compute the raise. The input to the program includes the current annual salary for the employee and a number indicating the performance rating (1=excellent, 2=good, and
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.

Page1 / 2

pre5.3 - Prelab Exercises Sections 5.1-5.3 1 Rewrite each...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online