CS 1401, Quiz 7 (based on Test 2), MW 9-10:20 version

Date: Wednesday, October 16, 2013
Name (please type legibly, ideally in block letters): ______________________________________________________________________

2. According to the syllabus, to successfully pass this class, you need to get at least 70 overall and at least 60 points on the final exam. Write down a Java statement that uses the known value overall of the overall grade and the the known value final of the grade on the final exam to assign, to a boolean variable passed, true or false depending on whether the student passed or not. Draw the truth table for "and", "or", and "not". Use these truth tables to find the truth value of your expression when a student has 80 overall and 71 on the final exam.

6. Once you define a new raster img by using a command
JRaster img = new JRaster(); 
you can make a point with coordinates (x,y) green by using a command
img.set(x, y, JRaster.green); 
Use a for-loop to draw a vertical green line corresponding to x = 60.