Discover
Questions library
Collections library
Find online teacher
login
Discover
questions library
Find online teacher
login
Popular searches:
if-else
class-diagram
flowchart
Polymorphism
Home
Questions
Questions
Study lists
Ashoor Questions
555 Questions
(Current time) Listing 2.7, ShowCurrentTime.java, gives a program that displays the current time in GMT. Revise the program so that it prompts the user to enter the time zone offset to GMT and displays the time in the specified time zone. Here is a sample run:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
391
(Find the number of years) Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the minutes. For simplicity, assume a year has 365 days. Here is a sample run:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
314
(Sum the digits in an integer) Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer. For example, if an integer is 932, the sum of all its digits is 14
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
616
(Financial application: calculate tips) Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and total. For example, if the user enters 10 for subtotal and 15% for gratuity rate, the program displays $1.5 as gratuity and $11.5 as total. Here is a sample run:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
322
(Convert pounds into kilograms) Write a program that converts pounds into kilograms. The program prompts the user to enter a number in pounds, converts it to kilograms, and displays the result. One pound is 0.454 kilograms. Here is a sample run:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
339
(Convert feet into meters) Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305 meter. Here is a sample run:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
333
(Compute the volume of a cylinder) Write a program that reads in the radius and length of a cylinder and computes the area and volume using the following formulas:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
1
1
369
(Convert Celsius to Fahrenheit) Write a program that reads a Celsius degree in a double value from the console, then converts it to Fahrenheit and displays the result. The formula for the conversion is as follows:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
330
(Algebra: solve 2 * 2 linear equations) You can use Cramer’s rule to solve the following 2 * 2 system of linear equation:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
561
(Average speed in kilometers) Assume a runner runs 24 miles in 1 hour, 40 minutes, and 35 seconds. Write a program that displays the average speed in kilometers per hour. (Note that 1 mile is 1.6 kilometers.)
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
310
(Population projection) The U.S. Census Bureau projects population based on the following assumptions:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
340
(Average speed in miles) Assume a runner runs 14 kilometers in 45 minutes and 30 seconds. Write a program that displays the average speed in miles per hour. (Note that 1 mile is 1.6 kilometers.)
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
444
(Area and perimeter of a rectangle) Write a program that displays the area and perimeter of a rectangle with the width of 4.5 and height of 7.9 using the following formula:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
434
Total:
555
Previous
28
29
30
31
32
Next
Go