COP3813_Assignment3 - COP3813 Assignment #3 Dr. Georgiana...

Download Document
Showing pages : 1 of 3
This preview has blurred sections. Sign up to view the full version! View Full Document
COP3813 Assignment #3 Dr. Georgiana Hamza-Lup Assignment #3 - due February 19, at 11:59 pm - Your assignment is to write a JavaScript program that converts specific units for length, weight, and volume from the metric system to the US system and from the US system to the metric system. Before asking the user for the value to be converted, the program should prompt the user to select the type of conversion: 1. Length (feet ↔ meters: there are 3.2808 feet in a meter) a. Ask if the conversion is from feet to meters b. Or from meters to feet 2. Weight (pound ↔ kilograms: there are 2.2046 pounds in a kilogram) a. Ask if the conversion is from pounds to kilograms b. Or from kilograms to pounds 3. Volume (gallons ↔ liters: there are 3.7854 litters in a gallon) a. Ask if the conversion is from gallons to liters b. Or from liters to gallons The program should output the original value and the converted value in the correct units. Then it should prompt the user for another calculation. If the response is ‘Y’ or ‘y’ the program will be repeated. A response of ‘N’ or ‘n’ will cause the program to exit. Any other response will re-display the prompt. The program must consist of a minimum of 4 user defined functions. Embed the script in an html file, name that file
Background image of page 1
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Create a FREE account now to get started. Log In

The email address you entered is not valid. The email address you provided is already in use.
Your username must be at least 5 characters. Your username must consist of only alphanumeric characters. Your username must contain at least one letter. Your username contains inappropriate language. Another user has already claimed this username.
Your password must be at least 6 characters in length.
{[ $select.selected.label ]} Please select a valid school.
By creating an account you agree to our Privacy Policy, Terms of Use, and Honor Code.
Create my FREE account Processing...
Sign Up with Facebook

We will never post anything without your permission.

Already on Course Hero? Log In