Bentley University Spring 2023CS 213The World Wide WebAssignment 4 – beginning JavaScript ProgramIn this assignment you will be writing a JavaScript program that converts any number of gallons...

Please follow the instructions attached and send the java code for the assignment.


Bentley University Spring 2023 CS 213 The World Wide Web Assignment 4 – beginning JavaScript Program In this assignment you will be writing a JavaScript program that converts any number of gallons into its respective smaller units. It will output the number of each unit for the number of gallons provided. The following is a table of measurements and their equivalents: Measurement Equivalent 1 gallon 4 quarts 1 quart 2 pints 1 pint 2 cups 1 cup 16 tablespoons The program will ask the use for any number of gallons (the number can be an integer or a floating-point number) and then display the respective number of quarts, pints, cups, and tablespoons that comprise the inputted number of gallons. sample input and output See two sample runs of the program below (the input is in italics, bold, and green). ===== Measurement Conversion ===== Enter the number of gallons: 2 2 gallons equals: 8 quarts 8 quarts equals: 16 pints 16 pints equals: 32 cups 32 cups equals: 512 tablespoons ===== Measurement Conversion ===== Enter the number of gallons: 3.5 3.5 gallons equals: 14 quarts 14 quarts equals: 28 pints 28 pints equals: 56 cups 56 cups equals: 896 tablespoons Formatting Guidelines and Requirements · Your program must prompt for the information shown in the examples. · Be sure that your output matches the format of the sample output shown and that your output has appropriate spacing between the elements on each line. · Use template strings for formatting the output. · Include comments in your code so, should you need to work on this assignment in several sessions, you can remember your approach to solving the problem. additional notes: To run your program on your VM you need to make sure your VM is running and then start an SSH session from within WebStorm. Once you do the following: 1. Upload the program to your VM. 2. Navigate to the folder on your VM where the program is located. 3. Install prompt-sync in that folder. [npm install prompt-sync] 4. Run the program on your VM and take screenshots as described below. 5. Provide a link to it from your home page (index.html) rubric: # Criteria Points 1 Use of constant and good practice in variable naming 5 2 Use of prompt for user input 5 3 Program performs calculations and assignments correctly 20 4 Output is correctly spaced and well formatted 20 Total 50 Your program must run without syntax errors to receive full or partial credit. If a part of your program is working, you will receive partial credit, but only if the program initially runs without syntax errors. Your grade will be zero on this assignment if it contains any syntax errors. Provide an appropriate name for your JavaScript file. Upload it to your VM and provide screenshots of the running of two programs, one with integer input and one with floating-point input. upload: 1. Please upload the following to your VM and make sure the following are displayed: · This assignment add a link on your index.html page to this assignment. · An HTML page with a screenshot of this program running on your VM with integer and floating-point input (two screenshots) add a link on your index.html page to this page · All for exercises under the Participation: JavaScript with this assignment add links on your Participation page to each of these exercises but no screenshots are needed. 2. Submit on Blackboard a link to your FQFN.
Mar 22, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here