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
soldier1979 [14.2K]
2 years ago
15

What keyword must be used on any method (function) on your class that is called from your main() method?

Computers and Technology
1 answer:
Y_Kistochka [10]2 years ago
8 0

Answer:

Idrk nglll

Explanation:

Sorry

You might be interested in
Use JavaWrite a program that will simulate a change machine found at cash registers. Input the amount due and amount paid from t
Ksju [112]

Answer:

Here is the JAVA program:

import java.util.Scanner;  //to accept input from user

public class Main { // class name

 public static void main(String [] args) {  // start of main method

   Scanner input = new Scanner(System.in);  // creates Scanner class object to take input from user

   System.out.println("Please Enter the Cost of the Item: ");  // prompts user to enter the cost of item

   double itemCost = input.nextDouble();  //scans and reads the input value of item cost

   System.out.println("Please Enter the Amount Paid: ");  // prompts user to enter the amount paid

   double amount = input.nextDouble();  //scans and reads the value of amount from user

   int change = (int)(amount * 100 - itemCost * 100);  //compute the remaining amount i.e. change

   System.out.println("Change Owed: " + change / 100.0);  // displays the owed change

   int quarters = change / 25;  // computes the value for quarters

   change = change % 25;  // compute the quarters remaining

   int dimes = change / 10;  //  computes dimes

   change = change % 10;  //  computes dimes remaining

   int nickels = change / 5;  // computes nickels

   change = change % 5;  // compute nickels remaining

   int pennies = change;  // computes pennies

   System.out.println("Quarters: " + quarters);  // displays computed value of quarters

   System.out.println("Dimes: " + dimes);  // displays value of dimes

   System.out.println("Nickels: " + nickels);  // displays value of nickels

   System.out.println("Pennies: " + pennies);   }} //displays value of pennies

Explanation:

I will explain the program with an examples.

Suppose the user enters 4.57 as cost of the item and 5.00 as amount paid. Then the program works as follows:

Change is computed as

change = (int)(amount * 100 - itemCost * 100);

This becomes;

change = (int)(5.00 * 100 - 4.57 * 100)

            = 500 - 457

change = 43

Now the change owed is computed as:

change / 100.0 = 43/100.0 = 0.43

Hence change owed = 0.43

Next quarters are computed as:

quarters = change / 25;

This becomes:

quarters = 43/25

quarters = 1

Now the remaining is computed as:

   change = change % 25;

This becomes:

   change = 43 % 25;

  change = 18

Next the dimes are computed from remaining value of change as:

dimes = change / 10;

dimes = 18 / 10

dimes = 1

Now the remaining is computed as:

   change = change % 10;

This becomes:

   change = 18 % 10

  change = 8

Next the nickels are computed from remaining value of change as:

nickels = change / 5;

nickels = 8 / 5

nickels = 1

Now the remaining is computed as:

   change = change % 5;

This becomes:

   change = 8 % 5

  change = 3

At last the pennies are computed as:

pennies = change;

pennies = 3

So the output of the entire program is:

Change Owed: 0.43                                                                                                                Quarters: 1                                                                                                                      Dimes: 1                                                                                                                         Nickels: 1                                                                                                                       Pennies: 3  

The screenshot of the output is attached.

7 0
2 years ago
Consumers affect which goods and services are produced because they _____.
arlik [135]

Answer:

Choice B, "choose which goods and services to buy"

Explanation:

Consumers choose which goods and services to buy. Companies only want to provide goods and services they know will be bought. Therefore, consumers affect which goods and services are produced because they choose which goods and services to buy.

3 0
2 years ago
True or False: Unity can apply multiple textures to a single object or terrain
MaRussiya [10]
This is very true unity is what u said and it is the definition of this
3 0
2 years ago
Which option is available when reviewing changes and using the Accept command in the Compare group?
Zarrin [17]

Answer: Accept only one at a time, all on a slide, or all changes in a presentation.

Explanation:

Took the review

6 0
2 years ago
Read 2 more answers
To provide both encryption and integrity protection, wpa2 uses aes encryption with:
lara [203]

WPA 2 stands for Wi-Fi Protected Access, version 2. It is the latest protocol that effectively protects 802.11 wireless traffic across a LAN. It belongs to the 802.11 protocol.

To provide both encryption and integrity protection, wpa2 uses aes encryption with Counter and CBC MAC (CCM) Mode.

3 0
2 years ago
Other questions:
  • Software obtained illegally is called open-source software. true / false
    15·1 answer
  • An excel user should use a relative cell reference when it is important to ____. preserve the relationship to the formula locati
    7·1 answer
  • Identify the computer cycle in each of the descriptions below by choosing the answer from the
    12·1 answer
  • Peter has a website that promotes his local vacation rental site. He uses Google Ads to manage his advertising campaign. He’s cr
    13·1 answer
  • Where is NumPy used?
    6·2 answers
  • (10 points) A stopwatch has three states named Zero, Running, and Stopped. There are two buttons, named B1 and B2. For each butt
    13·1 answer
  • Compare and contrast system software and generalised software
    11·1 answer
  • Where does the CPU store its computations?
    14·1 answer
  • What is a simulation?
    5·2 answers
  • The ______ process retains copies of data over extended periods of time in order to meet legal and operational requirements.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!