Program that reads a number in inches converts it to meter

Assignment Help JAVA Programming
Reference no: EM131834371

Exercise 1

1) Write an algorithm that will find Odd numbers between 10 to 150 and display the result.

2) Write an algorithm that will find Even numbers between 20 to 300 and display the result.

Exercise 2

1. Write a Java program to convert temperature from Fahrenheit to Celsius degree.

Test Data
Input a degree in Fahrenheit: 212
Expected Output:
212.0 degree Fahrenheit is equal to 100.0 in Celsius

2. Write a Java program that reads a number in inches, converts it to meters.
Note: One inch is 0.0254 meter.

Test Data
Input a value for inch: 1000
Expected Output :
1000.0 inch is 25.4 meters

3. Write a Java program that reads an integer between 0 and 1000 and adds all the digits in the integer.

Test Data
Input an integer between 0 and 1000: 565
Expected Output :
The sum of all digits in 565 is 16

4. Write a Java program to convert minutes into a number of years and days.

Test Data
Input the number of minutes: 3456789
Expected Output :
3456789 minutes is approximately 6 years and 210 days

5. Write a Java program that prints the current time in GMT.

Test Data
Input the time zone offset to GMT: 256
Expected Output:
Current time is 23:40:24

6. Write a Java program to compute body mass index (BMI).

Test Data
Input weight in pounds: 452
Input height in inches: 72
Expected Output:
Body Mass Index is 61.30159143458721

7. Write a Java program to takes the user for a distance (in meters) and the time was taken (as three numbers: hours, minutes, seconds), and display the speed, in meters per second, kilometers per hour and miles per hour (hint: 1 mile = 1609 meters).

Test Data
Input distance in meters: 2500
Input hour: 5
Input minutes: 56
Input seconds: 23
Expected Output :
Your speed in meters/second is 0.11691531
Your speed in km/h is 0.42089513
Your speed in miles/h is 0.26158804

8. Write a Java program that reads a number and display the square, cube, and fourth power.

Expected Output:
Square: .2f
Cube: .2f
Fourth power: 50625.00

9. Write a Java program that accepts two integers from the user and then prints the sum, the difference, the product, the average, the distance (the difference between integer), the maximum (the larger of the two integers), the minimum (smaller of the two integers).

Test Data
Input 1st integer: 25
Input 2nd integer: 5
Expected Output :
Sum of two integers: 30
Difference of two integers: 20
Product of two integers: 125
Average of two integers: 15.00
Distance of two integers: 20
Max integer: 25
Min integer: 5

10. Write a Java program to break an integer into a sequence of individual digits.

Test Data
Input six non-negative digits: 123456
Expected Output :
1 2 3 4 5 6

Reference no: EM131834371

Questions Cloud

Create a work breakdown structure : You have been tasked with the project of organizing a company offsite 2-day training session in which people are brought in from different parts of the country.
Describe the probability law of y : If at the beginning of the week to toasters are in stock, the profit Y from sale of toasters during the week is Y = 2 minimum (X, 10). Describe the probability
What are some of the key outputs of each process group : Why do organizations need to tailor project management concepts, such as those found in the PM BOK Guide, to create their own methodologies?
Goals and objectives of the project in language : Background of the organization and any information or statement of needs that helps explain how the project came to be.
Program that reads a number in inches converts it to meter : CMP 330 Data Structures & Algorithm Analysis - Write a Java program to convert temperature from Fahrenheit to Celsius degree
What about the payroll side : Thanks for mentioning insurance companies and benefits side. What about the payroll side? How about the direct deposits with banks and credit unions.
Discuss the fallacy used in the selected advertisements : Next, identify and discuss the fallacy used in the selected advertisements where exactly is the mistake of reasoning being committed?
What are vulnerable populations : What are vulnerable populations? Why are they vulnerable? Where might you encounter vulnerable people in your daily life?
How does a supervisor determine the true limits of authority : Based on your readings and research answer the following question: Why should a front line supervisor be proficient in both performing the tasks and leading?

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