## CS 1401, Exam #1, MWF version

Date: Friday, February 8, 2008
Name (please type legibly, ideally in block letters): ______________________________________________________________________

As you probably know, we are currently in the middle of the 2007-2008 International Polar Year (IPY). An important part of this research is studying weather and climate changes in the polar areas. As part of the IPY program, an interdisciplinary research group from UTEP -- including several Computer Science students -- is actively processing weather data from the Arctic and Antarctic regions.

1. Data processing requires a lot of computations that uses sophisticated programs on superfast computers. Let us recall how programs and computers started.
(a) Who was the world's first programmer? For what devise was this person programming?
(b) When and why was the world's first computer designed? What scientist was instrumental in designing this first computer?
(c) For extra credit: describe one more event from the history of computing.

```

```
2. To process the large amount of data coming from the Arctic and the Antarctic regions, we need to use a powerful computer capable of processing all this data. Let us assume that we have two types of weather stations: older ones which produce a smaller amount of data, and newer ones which produce a much larger amount of data. Describe, step-by-step, an algorithm that would allow to compute how much processing power we need to process all this data. As part of this algorithm, you should ask for the number of older stations, the number of newer stations, the amount of information (in Kilobytes (K) per second) coming from an older station, and the amount of information coming from a newer station. For example, if we have 100 older stations each of which generates 1K data per second, and 10 newer stations each of which generates 20K data per second, then the total amount of information (and thus, the total required processing power) is 100 * 1 + 10 * 20 = 300 K/sec.
```

```
3. For each of the following sequences of symbols, describe which can be valid Java identifiers and which cannot be; if you believe they cannot be, briefly explain why (e.g., "is a reserved word" or "does not start with a letter"):
• 100Kilobytes

• UTEP

• main

• International_Polar_Year

• costOfDataProcessingIs\$1PerMegabyte

```

```
4-5. Write a main method that asks a user for the name of the university, for the number of older stations, the number of newer stations, the amount of information (in Kilobytes (K) per second) coming from the older stations, and the amount of information coming from the newer stations, and then computes and prints the following request:
```To: IT Office, (university name here)

For processing data coming from the polar areas, please provide us with
```
(Do not worry about formatting the amount.) For example, if at UTEP, we need to process the data from 100 older stations each of which generates 1K data per second, and 10 newer stations each of which generates 20K data per second, then the computer should print:
```To: IT Office, UTEP

For processing data coming from the polar areas, please provide us with
```

Reminder: to read from the keyboard, you can define the reader as follows:

```Scanner polarReader = new Scanner(System.in);
```
the header of the main method is:
```public static void main(String[] args){
```

```

```
6. The results of processing the polar data are printed and stored in reports. To generate a cover for each report, write down a line of code that, given a string area (that contains the name of the area), places the message
```Report on weather data from (area here) processed by UTEP.
```
into a string cover. For example, for the McMurdoch Station (on Ross Island, Antarctica), cover should be
```Report on weather data from the McMurdoch Station processed by UTEP.
```