Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Outlook 2023

Authors: James Holler

1st Edition

B0BP9P1VWJ, 979-8367217322

More Books

Students also viewed these Databases questions

Question

6. Does your speech have a clear and logical structure?

Answered: 1 week ago