cover picture cover picture


Homework 1

CMP 167: Programming Methods I
Lehman College, City University of New York
Spring 2016


This Homework Is Due By 11:59 PM on Tuesday February 16, 2016

  1. In your textbook, this homework problem is in section 1.8 - Currency Converter 2 (Homework 1).

    You just returned from a trip in Central America. The countries you visited were Mexico, Guatemala and El Salvador.

    You arrived back in the United states with some foreign currency from these countries.

    Write a Java program that prompts the user for amount of each foreign currency. Your prompts should look like:

    	Enter number of Mexican Pesos :
    	Enter number of Guatemalan Quetzals :
    	Enter number of Salvadoran Colons :
          

    The current exchange rates for these currencies is:

    	1 Mexican Peso = 0.0544 US $ 
    	1 Guatemalan Quetzal = 0.1305 US $ 
    	1 Salvadoran Colon = 0.1144 US $
          

    Your Java program should convert the amounts entered by the user and compute and display the total amount of US Dollars. Your output should look like:

    	US Dollars = total amount of US Dollars
          

Please submit the completed assignment in the corresponding section(s) in your textbook Lehman College City University of New York CMP 167 Spring 2016: Programming in Java. No other forms of submission will be accepted.