Sample On-Line Exam 2

For exam 2, you will be asked to complete 3 programming problems. You are required to do the first problem. For the second problem, you will be given a choice of two problems to complete. For the third problem, you will again be given a choice of two problems.

You will be provided with a zip file containing the starting points for all five problems (even though you only are required to solve three). When this file is unzipped, you will have a single folder which contains project folders representing the starting points for each of the five problems. This format is similar to the common final exam for 15-100.



On-Line Exam Rules:
 
You must clear your desktop of all existing folders before downloading the exam.
If an exam proctor notices any folders other than those associated with the exam, this will  be considered to be a cheating violation and you will be appropriately penalized.
You are not to access any web page except for the ones associated with the exam.
If an exam proctor notices any web pages other than those associated with the exam, this will  be considered to be a cheating violation and you will be appropriately penalized.
When solving a problem, you must work from the starting point for that problem. If you fail to use a given starting point you will be severely penalized on that problem.
The starting point benefits you.because there is pre-existing code that solves the auxillary issues of the problem. This allows you to focus on the part of the problem that we want to test. For example, the pre-existing code for a file problem will handle the construction of an object to read from the file.
The starting point for the problem will indicate where you are allowed to add or modify code. You should never modify any other part of the pre-existing code. If you modify parts of the pre-existing code that you are not supposed to change, you will most likely receive a zero on the problem.




Exam Problems:

Click here to download the (starting point of the) sample exam. The sample exam includes all of the html files that are linked below.

Problem 1 (45%):  Define a Book class that is sufficient to run the pre-existing demo program.

Problem 2 (30%)

Option a:
Write a method that verifies that the typist has entered an integer value within the inclusive bounds specified as the parameters to the method.


Option b:

Write a method that produces a random int within the inclusive bounds specified as the parameters to the method.
Problem 3 (25%)
Option a:
From a file of ints and display all ints that exceed a given numeric threshhold


Option b:

From a file of strings, find the second longest string that appears