Dr. Johnson's Review Sheet for CIS 260 Exam 2

Main Menu

Last updated on 10/22/07 01:47 PM .

Chapters covered: 3, 4 (blue book) or 4, 5 (orange book)

Assignments covered: 3, 4

Sample exam:

1. Which logical operator means "not"?  a. &&     b. ||     c. !    d. none of the above

2. Which Java keyword is NOT associated with loops?  a. while   b. static   c. do   d. for

Write a COMPLETE Java program that uses JOptionPane to get a file name from the user and then display all records from that file. The output should be displayed in the console (i.e., command prompt or DOS window, not a dialog box).

You should write the most logical and concise code possible. Make sure you follow all the conventions discussed in class and in the text, and that you use good programming style as demonstrated in the text (including documentation and indentation). You may wish to plan your program carefully for about 5 minutes before you start writing code.

Solution to sample exam:

Download the following file (right-click, Save target as...), then rename the program file with the .java extension (the name of data.txt remains the same):

Exam2StudyGuide.txt, data.txt