1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Greeley [361]
3 years ago
10

Create an application in Java that asks a user for a number of hours, days, weeks, and years. It then computes the equivalent nu

mber of minutes (ignoring leap years)
Computers and Technology
1 answer:
Nostrana [21]3 years ago
8 0

Answer:

<em>The program written in Java is as follows;</em>

<em>The program takes input for hours, days, weeks and months; </em>

<em>Then the inputs are converted to minutes individually and then summed up</em>

<em>For you to better understand the program,  made use of comments to explain difficult lines,</em>

<em>The program is as follows</em>

import java.util.*;

public class Assignment{

public static void main(String []args){

//This line declares all variables

int hours, days, weeks, years;

Scanner input = new Scanner(System.in);

//This line prompts user for hours input

System.out.print("Hours: ");

//This line accepts input for hours

hours = input.nextInt();

//This line prompts user for days  input        

System.out.print("Days: ");

//This line accepts input for days

days = input.nextInt();

//This line prompts user for weeks input

System.out.print("Weeks: ");

//This line accepts input for weeks

weeks = input.nextInt();

//This line prompts user for years input

System.out.print("Years: ");

//This line accepts input for years

years = input.nextInt();

//This line converts hours to minute

int minute = 60 * hours + 1440 * days + 10080 * weeks + 525600 * years;

//This line prints the equivalent minute of user input

System.out.println(minute +" minutes");

}

}

You might be interested in
What is the encoding technique called that is used to store negative numbers in the computer's memory
Anna007 [38]

Answer:

The following “ encoding techniques “ can be used to “ store negative numbers in a computers memory: “ “ Signed magnitude representation (SMR).

Explanation:

hope it helps.!!

6 0
2 years ago
How to give answer like this?????
creativ13 [48]

Answer:

possibly he made an image in the photo or this

Explanation:

\large\boxed{\mathfrak{hi}}

8 0
3 years ago
When a linke chain contain nodes that reference both the next node and the previous node it is called a(n)
ch4aika [34]
A. Two way linked chain
4 0
3 years ago
Question 1 :George, a user, is having trouble connecting to network resources, including shared folders on the local network and
vazorg [7]

Complete Question:

George, a user, is having trouble connecting to network resources, including shared folders on the local network and Internet resources. Yesterday he was able to connect with no problems. You need to ensure that he can connect to these resources. Which tool should you use FIRST?

Group of answer choices

A. ipconfig

B. Device Manager

C. My Network Places

D. Control Panel

Answer:

A. ipconfig

Explanation:

As a network administrator, to ensure that George can connect to the network resources, shared folders, and internet resources, the tool you should use first is the "ipconfig" in the command line. This is a troubleshooting process that would help to identify the problem and to establish a theory of probable cause.

<em>Since George could connect the previous day without any problem, it is most likely that the TCP/IP settings has been altered. Therefore, to view this settings you'll have to use an ipconfig command. </em>

4 0
4 years ago
Free Write Friday 2/26/21
Bad White [126]
Write about art bc thags always so cool
4 0
3 years ago
Other questions:
  • What is renewable energy
    12·1 answer
  • Which tab is used to edit objects on the slide master and layouts
    10·1 answer
  • The transmission method that sends data to every device on a lan is known as a _____ transmission.
    8·2 answers
  • Consumers’ ability to ""time shift"" programs using DVRs and Internet video and other situations that lack simultaneity is an ex
    6·1 answer
  • Which of the following is the definition of registration authority ( RA)?
    10·1 answer
  • Which of the following are results of technological advancements and increased automation?
    6·2 answers
  • Iman manages a database for a website that reviews movies. If a new movie is going to be added to the database, what else will n
    7·2 answers
  • What are the characteristics of 1st generation computers​
    9·2 answers
  • Instruction: weird I know (~ ̄³ ̄)~
    5·1 answer
  • 3) Given that HSI (360, 0.000, 1.000), What is the equivalent RGB<br> color?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!