LBSC 690 Midterm Exam             Section 0201                 Tuesday October 22, 1996

Read each question carefully.  The maximum possible score on this exam is 100 and the minimum possible score is -8.  You may use your own personal copy of Blissmer (including any notes made in your own handwriting) and an electronic calculator.  If you share the calculator with another student you must ensure that it is off before sharing it.  Write your answers in the booklets provided and put your name on that booklet.  It is a violation of academic integrity to provide information about this exam directly or indirectly to any student in section 0201 or section 0301 who has not yet taken the midterm exam.

1. 	[25 points] In an effort to atone for the errors I introduced when creating the Date class in the homework, I tried implementing a Time class.  The Time class contains a single private method called printAmPm which accepts an int representing the time in 24 hour format (0000 is midnight, 0001-1159 correspond to 12:01 A.M to 11:59 A.M., 1200 is noon, and 1201-2359 correspond to 12:01 P.M. to 11:59 P.M.) and prints “Midnight,” “A.M.,” “P.M.” or “Noon” as appropriate.  The main method in the Time class simply prints the time and then calls the printAmPm method.  Unfortunately, the printAmPm method does not work correctly.
 1: class Time {
 2:
 3:   public static void main(String[] args) {
 4:     int time;
 5:     time = 1300;
 6:     System.out.print("The time is " + time + " ");
 7:     printAmPm( time ); 
 8:   }
 9: 
10:   private static void printAmPm( int time ) {
11:     if (time == 0000) {
12:       System.out.println("Midnight");
13:     } else {
14:       if (time < 1200) {
15:         System.out.println("A.M.");
16:       } else {
17:         if (time == 1200) {
18:           System.out.println("P.M.");
19:         } else {
20:           System.out.println("Noon");
21:         }
22:       }
23:     }
24:   }   
25:           
26: }

a. 	[15 points]  Can the problem be fixed without modifying more than four lines?  If so, show the modifications that would fix the problem by specifying the line number and the corrected content of each line that you would change.  If not, briefly describe the changes that would be required and  state why more than four lines must be changed to correct the operation of the program.
	
b. 	 [10 points]  In “The Mythical Man Month,” Brooks describes several factors which can increase the number of person-months required to complete a project if more people are added to the development team when it appears that the original schedule will not be met.  Name TWO of the factors identified by Brooks.

2. 	[24 points] Answer each of the following multiple choice questions.  Each correct answer will earn 6 points, but each incorrect answer will be penalized by -2 points.  It is possible to receive a negative score on this question. 
a. 	[+6 or -2 points] The Uniform Resource Locator (URL) http://cpl.uni-pb.de/Faculty/gilbert.html will:
A. 	Obtain information from an anonymous FTP site
B. 	Access a web page that is stored in a file called Faculty.html
C. 	Obtain information from a machine named cpl.uni-pb.de
D. 	All of the above

b. 	[+6 or -2 points] To transfer a 3 megabyte MPEG file over a 10 megabit per second ethernet (at 8 bits per byte and 100% utilization) will require about:
A. 	  0.3 seconds
B. 	  2.4 seconds
C. 	19.2 seconds
D. 	  2.6 minutes

c. 	[+6 or -2 points] Assuming that the computer system in question contains the required hardware, the most cost-effective medium on which to create a permanent backup copy of the information on a 2 gigabyte hard disk drive is:
A. 	Magnetic tape
B. 	Floppy disk
C. 	Removable hard disk
D. 	RAM

d. 	[+6 or -2 points] Which of the following is NOT one of the three approaches to text retrieval that we discussed in class?
A. 	Entity-relationship
B. 	Probabilistic
C. 	Vector space
D. 	Boolean

3. 	[25 points] You have been asked to create a media center for a small elementary school and you need to determine the total number of bookcases that will be required.  A large number of bookcases are already owned by the school, so they will be used to store all of the material.  Each bookcase has 5 shelves that are each 4 feet long, and each shelf is large enough for the tallest and deepest material that will be stored on them.  There are 1,571 books (average thickness 0.5 inches), 250 videocassettes (thickness 1.2 inches) and 715 CDROMs (thickness 0.2 inches).  The bookcases are made of metal, so it is not practical to saw them down to create a partial bookcase.  So the answer will need to be a whole number since something like 4.3 bookcases would be hard to make. 

a. 	[10 points] Would a database or a spreadsheet be a more useful tool for this task?

b. 	[15 points] Design the database or spreadsheet (whichever you chose) that you would use to determine the number of bookcases that are required.  If you chose a database, specify the tables you would need and the queries that you would form using something similar to the notation used by Paradox.  If you chose a spreadsheet, specify the contents of each cell using something similar to the notation used by Quattro Pro.  It is not necessary to use precisely the same notation as the software we used in the homework, but it must be possible for me to figure out what you mean.

4. 	[26 points] You have been hired by NASA to work on a web site for the Mars Pathfinder mission.  
	
a. 	[13 points] If your target audience is the general public and you expect that most of them will access your web site using a 28.8 kilobit per second modem, what image format (compression scheme) will you use when posting the still photographic images that are received from the spacecraft?  Why?

b. 	[13 points] You wish to receive comments from your users throughout the 18 month mission.  Should you do this by using electronic mail or by using Internet Relay Chat (IRC)?  Why?