Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Can Calculator NOTE: DO NOT POST THIS PROGRAM TO YOUR WEB SITE. Because of the optional workshop on Monday night, this assignment is due

The Can Calculator NOTE: DO NOT POST THIS PROGRAM TO YOUR WEB SITE. Because of the optional workshop on Monday night, this assignment is due Tuesday.

You are working for a company that makes cans. The shape of the can is a cylinder, as seen in the photograph and diagram below.

Your task is to make a calculator program that will help the company and the customer know the material requirements of a can design. The diagram below shows key measurements of the system.

The program asks the user for two pieces of information:

the radius of the can in inches

the height of the can in inches

Then the program calculates these measurements:

the volume of the can in inches cubed

the total area of the two flat ends of the can, in inches squared

the area of the curved surface of the can, in inches squared

the total surface area of the entire can, in inches squared

the length of both circular rims of the can, in inches

Program Execution The program starts with a dialog box to ask the user for the height of the can. As an example, here the user enters 5.5.

The program then produces a dialog box to ask the user for the radius of the can. As an example, here the user enters 2.5.

get all user inputs The program then displays a summary of all user inputs and the calculated results. Please read these carefully because your calculations should match these calculations. Program Design The program should follow this outline:

perform all calculations

display all inputs and calculated results to the user

Program Requirements The HTMLshould include:

a page title

a heading with the text A Can Calculator

The JavaScript code should:

contain comments

be organized

include units in user prompts and the final display

display the user inputs as well as the calculated results on the webpage. Your page should look very similar to the example above.

contain appropriate indentation and blank lines between input, process, and output sections

use descriptive variable names

use built-in JavaScript expression for an accurate value of

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

Databases Theory And Applications 27th Australasian Database Conference Adc 20 Sydney Nsw September 28 29 20 Proceedings Lncs 9877

Authors: Muhammad Aamir Cheema ,Wenjie Zhang ,Lijun Chang

1st Edition

3319469215, 978-3319469218

More Books

Students also viewed these Databases questions

Question

demonstrate the importance of induction training.

Answered: 1 week ago