Mr. Truncale - Robert E. Lee High School
  • Home
  • Digital Media
    • HTML
  • Video Game Design
  • Comp. Programming I
  • Comp. Programming II
  • AP Computer Science
  • 3D Printing
  • Teacher Resources
  • Contact Me

Java Lesson 9 - Booleans

Videos


Text


Download as PDF
READ text then COMPLETE assignments below.

Assignments


Lesson 9 Exercises

Download Exercises for Lesson 8 below and submit it when done
bp_lesson_9_ex
    Max file size: 20MB
Submit

Even Or Odd

Create a new project called EvenOrOdd containing a class called Tester. In the main method of
Tester print a prompt that says, “Enter an integer:” Input the user’s response from the keyboard,
test the integer to see if it is even or odd (use the modulus operator % to do this), and then print
the result as shown below (several runs are shown).
Enter an integer: 28
The integer 28 is even.

Enter an integer: 2049
The integer 2049 is odd.

Enter an integer: -236
The integer -236 is even.
    Max file size: 20MB
Submit

Robert E. Lee High School
1809 Market
Baytown, TX 77520
281-420-4535
digital media | computer programming I and II | BIM
ap computer science | architectural cad | video game design
national technical honor society | contact me