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
A UI text element must be added to ______.an empty background container game objecta prefaba slot game objecta tray objecta canv
barxatty [35]

Answer:

canvas

Explanation:

The answer to this question is that A UI text element must be added to a canvas. The canvas is that area that all the unity items (UI) have to be inside.

We insert the Text UI element when we move to the hierarchy of the scene from create we move to UI and then to text.

After all these have been done, we will get a text element which have been added in the Canvas region.

5 0
3 years ago
Assume that you are testing the Orders database introduced in Watt (2014) - Appendix C. Discuss the problems and possible conseq
madreJ [45]

Answer:

129 \frac{2}{?} 23.4. \div 164 \times 5y1 + . \\ .00487ggh

6 0
3 years ago
Which tab is used to insert a hyperlink onto a slide
Roman55 [17]
The tab used to instead a Hyperlink into a slide is the Insert tab under the “Links” group.
5 0
3 years ago
Read 2 more answers
A 4-way set associative cache has 64 blocks of 16 words. How many bits are there in the ""tag"" field of the 15-bit address for
Tanya [424]

Answer:

3 bits

Explanation:

Given a 4- way set associative cache that has 64 blocks of 16 words.

Therefore, the number of sets cache has:

\frac{64}{4} = 16

Now,

Cache data size is 16kB

The number of cache blocks can be calculated as:

16kB/16 = 1024 bytes/16 byte\times 16 = 256 cache blocks

Now,

Total sets = \frac{cache blocks}{associative sets}

Total sets = \frac{256}{4} = 64

Now,

2^{n} = 64

n = 6

For 15 bit address for the architecture, the bits in tag field is given by:

15 - (6 + 6) = 3 bits

Thus the tag field will have 3 bits

6 0
3 years ago
The annual percentage rate on a credit card determines _______. Athe amount of interest you are charged on credit card purchases
Ostrovityanka [42]
The answer is (a.) The amount of interest you are charged on credit card purchases

The Annual Percentage Rate or APR on your credit card is determined by the interest you made from your purchases for the whole year. APR includes other fees and additional costs.
8 0
3 years ago
Read 2 more answers
Other questions:
  • #TODO: Define a data structure to keep track of which links are part of / not part of the spanning tree.
    14·1 answer
  • What does subscribing to a website’s RSS feed provide to a subscriber?
    10·1 answer
  • Olivia creates a personal budget. She enters her current savings account balance in cell D3. In cell A3, she calculates her inco
    8·1 answer
  • In windows xp, which control panel icon should you choose if you would like to customize your system for left-handed use?
    7·2 answers
  • If the Account Number field in a record always should display the three characters in the account number in uppercase, then the
    14·1 answer
  • Which value can be entered to cause the following code segment to display the message: "That number is acceptable." int number;
    11·1 answer
  • How does a author develop a character in a story?
    14·2 answers
  • Which of the following are acceptable to share? Check all of the boxes that apply.
    13·1 answer
  • Write long answer to the following question. a. Define microcomputer. Explain the types of microcomputers in detail.​
    5·2 answers
  • CreatePolicies<br> I need help with this in java.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!