Question: This is a javaScript front-end web development Cost Estimator Design a program with a function. The function should calculate the cost of painting rooms in

This is a javaScript front-end web development

Cost Estimator

Design a program with a function. The function should calculate the cost of painting rooms in the house. Assume each room can be painted by exactly one can of paint.

Function:

Will have parameters for number of rooms and cost per can

Calculates and returns the cost

Main Code (Inline):

Prompt the user for cost and number of rooms

Call the function, pass the 2 arguments and have the value displayed on the web page

MPG Estimator

Design a program with a function. The function should calculate the MPG (mile-per-gallon) of the car.

Function:

Will have parameter for size of gas tank and miles drivable on a full tank (range)

Will calculate and return the MPG (Mile/gallon)

Main Code (Inline):

Prompt for size of tank (in gallons0 and miles drivable

Call function, passing 2 arguments (variables form previous step)

Display the returned value

Bill Estimator Design a program with a function. The function should calculate the total bill of the user. Enter all rates (percentages) as .05 (for 5%)

Function:

Will have parameters for subtotal, tax rate, and tip rate

Will calculate and display to the user the total amount due using the following formula - subtotal * tax rate is tax due; tax due + subtotal is multiplied by tip rate, then add this result to tax due and subtotal for final total

Main Code (Inline):

Prompt for Subtotal, Tax Rate & Tip Rate

Call Function, Pass 3 Arguments

Display the returned value

Rubric

Declare the parameters needed to calculate the program

Using a function, calculate the required values for the program you selected

Prompt the user in the HTML document to input information to be used in the function

Call the function and send the arguments to be used

Display the returned value to the user in a concatenate statement

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!