Javascript code to prompt and read the cost of a pizza

Assignment Help JAVA Programming
Reference no: EM131561227

The following is an exercise in Client-Side JavaScript: you will need both an .html file and a .js file.

Create a web page named pizzaCalc.html based on the helloworld.html file from Project 1.

Create a second file pizzaCalc.js that will contain all of your JavaScript code, and connect pizzaCalc.html to pizzaCalc.js.

The .js file must include the use strict directive. Write and test a function that accepts two arguments (the pizza price and pizza diameter), and returns a number ( the cost per square inch of the pizza). Store the function definition in the .js file.

Note that the function does not call prompt, alert or console.log-- it just accepts arguments and returns a value.

Following the function definition, write the JavaScript code to prompt and read the cost of a pizza, and the diameter of a pizza.

Call the function you wrote to calculate the cost per square inch of the pizza, and output the following information in a div element on the web page.

Reference no: EM131561227

Questions Cloud

Identify three aspects of portfolio management : Evaluate each of the approaches to applying the framework as discussed in Chapter 8 of the Lane textbook.
Compare how professional and professionalism are different : Generally speaking, ‘having professionalism' refers to having expected competencies and/or skills in a particular professional field.
Compute the standard number of kits : Compute the standard number of kits and cabinets allowed for a volume of 6,000 rebuilt units
Calculate the files stored as the greatest : 1. Total files stored are smaller or equal to W. 2. Total time to calculate the files stored as the greatest.
Javascript code to prompt and read the cost of a pizza : This is an exercise in Client-Side JavaScript - Call the function you wrote to calculate the cost per square inch of the pizza
Issue on a firefox web server : Create an example of a simple, nested for loop that display data in an HTML table. Choose a theme and data set of your choice.
Compute the unit contribution margin : Compute the unit contribution margin and the units that must be sold to break even. Compute the contribution margin ratio
Federal tax rate-state tax rate : Create one Java application to calculate how much federal and state tax you need to pay. The program should accomplish the following tasks: ask your name
Describe how technology affects the organizations design : Assignment: Organization Effectiveness and Success- Describe how technology affects the organization's design, efficiency, and effectiveness.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd