Conversion program for javascript

Assignment Help Business Economics
Reference no: EM131950323

Conversion Program for javascript: A program that asks the user to enter a distance in meters. The program will then present the following menu of selections:

1. Convert to kilometers

2. Convert to inches

3. Convert to feet

4. Quit the program

The program will convert the distance to kilometers, inches, or feet, depending on the user's selection. Here are the specific requirements:

  • A method named showKilometers, which accepts the number of meters as an argument. The method should display the argument converted to kilometers. Convert the meters to kilometers using the following formula:

kilometers = meters * 0.001

  • A method named showInches, which accepts the number of meters as an argument. The method should display the argument converted to inches. Convert the meters to inches using the following formula:

inches = meters * 39.37

  • A method named showFeet, which accepts the number of meters as an argument. The method should display the argument converted to feet. Convert the meters to feet using the following formula:

feet = meters * 3.281

  • A method named menu that displays the menu of selections. This method should not accept any arguments.
  • The program should continue to display the menu until the user enters 4 to quit the program.
  • The program should not accept negative numbers for the distance in meters.
  • If the user selects an invalid choice from the menu, the program should display an error message.

Reference no: EM131950323

Questions Cloud

Marking data with its security category : What is one advantage of marking data with its security category and what is one disadvantage of marking data with its security category?
Running a business as a closed environment : Evaluate the advantages and disadvantages of running a business as a closed environment.
Define a regression model to answer the question : Topic: Impact of rising gasoline prices on US public transit Ridership? Your task is to formulate a research question, define a regression model to answer
Which aspect of presentation did you find most interesting : Which aspect of the presentation did you find most interesting? What was your take-home message from the overall presentation?
Conversion program for javascript : Conversion Program for javascript: A program that asks the user to enter a distance in meters. The program will then present the following menu of selections:
Annually with standard deviation : Jeremy owns a stock that has historically returned 7.9 percent annually with a standard deviation of 14.61 percent.
Discuss about the national health insurance system : The 4 articles listed below present various points of view on our national health insurance system, considering both the single payer and private sector options
What are some ground rules that shawn should consider : How should Shawn handle the situation where some team members possess far more experience managing these types of projects?
Report on a critical strategic management issue : Report on a critical strategic management issue for an organisation of their choice in the Tourism and Hospitality industry

Reviews

Write a Review

Business Economics Questions & Answers

  Relationship among the marginal cost also average variable

argue the relationship among the marginal cost also the average variable cost also among marginal cost also average cost.

  Oligopolistic firm achieves profit maximization

List and explain the conditions under which the Oligopolistic firm achieves profit maximization and loss minimization. Be thorough. i. Using the MR MC approach, discuss how to determine when the oligopolistic firm maximizes profit or minimizes loss i..

  Position of a nation long-run aggregate supply curve

Suppose that the position of a nation's long-run aggregate supply curve has not changed, but its long-run equilibrium price level has increased. Which of the following factors might account for this event? (See page 232.)

  Federal reserve-increases the supply of money

When the U.S. central bank, the Federal Reserve, increases the supply of money:

  Decrease the number of substitutes for some types of labor

We’ve seen that monopolistically competitive firms will try to differentiate their products in order to eliminate substitutes. Are there comparable measures that can be taken in labor markets to decrease the number of “substitutes” for some types of ..

  Upstream drug manufacturers and downstream insurance

Pharmaceutical Benefits Managers or PBM's are intermediaries between upstream drug manufacturers and downstream insurance companies. They design formularies (list of drugs that insurance will cover) and negotiate prices with drug companies.

  Determining the apprenticeship program

Suppose that a professional association strengthened the limits to entry into their profession and at the same time lengthened its required apprenticeship

  Bonds to pay for improvements

A city near chicago sold $9000000 in bonds to pay for improvements to an airport. It set up a sinking fund with end-of-quarters payments in an account earning 8% compounded quarterly. Find the amount that should be deposited in this fund each quarter..

  Explain the difference between point and arc estimates

Define elasticity of demand and explain the difference between point and arc estimates. Why are some commodities classified as elastic while others are termed inelastic? Explain why elasticity of demand for a particular commodity will be greater:

  Current value of the index

To account for the effects of inflation, we construct a price-level index in which an index value of 100 represents the price level five years ago. Using that index, we find that this year's real GDP is $1.5 trillion. Given those numbers, we can c..

  Decision impact the chip manufacturers sales and net profit

A manufacturer of computer chips has a computer hardware company as its largest customer. The computer hardware company requires all of its chips to meet specifications of 1.2 cm. What are the elements that the production manager should consider in d..

  Balance sheet below represents current financial situation

The balance sheet below represents the current financial situation of a commercial bank named Novatia Bank. What will happen to the bank\'s liabilities after the $150 deposit. What will happen to the bank's assets after the $150 deposit?

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