1. You all probably know that our campus's Bhutanese architecture was inspired by the photos of the Kingdom of Bhutan published in National Geographic magazine. Today is the anniversary of this magazine: its first issue appeared on September 22, 1888.

- Geographical discoveries became possible when people learned how to calculate their location. Historically the first people to learn these art were ancient Egyptians. Explain what practical needs motivated ancient Egyptians to develop geography-related computations.
- Describe one more event from history of computing.

2. 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"):

- NationalGeographic
- main
- 1888
- 22September
- National Geographic

3. The following formula enables us to compute the volume V of a box with sides x, y, and z: V = xyz. Assuming that x, y, and z are already placed in the corresponding variables of type double, write a Java code statement for assigning the corresponding value to the variable v of type double. Explain, step-by-step, which arithmetic operations will be performed first, which next, etc., and trace the computations on the example when x = 2.0, y = 3.0, and z = 4.0. Explain what happens if you simply write xyz in your Java code.

4-5. Many people subscribe to National Geographic. Let us assume that subscription costs $20 per year. One can pay for several years. Write the main method which asks the user for his/her name, asks for how many years he/she wants to subscribe, and prints a memo describing the price. For example, if Ann Gates wants to subscribe for 4 years, your program should print the following message:

From: National Geographic To: Ann Gates To subscribe for National Geographic for 4 years, you need to pay $20 X 4 = $80.Declare 20 as an integer constant, so that it will be easy to change if needed.

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

Scanner reader = new Scanner(System.in);the header of the

public static void main(String[] args){

6. Suppose that you need to add 3 to the number of years. If the number of years is stored in the integer variable

- years = years + 3.0;
- years = years + 3;

7. National Geographic is one of the most popular magazines. Write a piece of code that decides which of the three given magazines is the most popular. The titles of three magazines are stored in the variables

*Comment:* There is no need to read anything, assume that all
six variables have already been assigned values.

8. To pay for the National Geographic subscription, one can either send a check or pay by credit card. Write down a Java statement that uses the known truth values