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
Oduvanchick [21]
3 years ago
15

A program that contains the following method: public static void display(int arg1, double arg2, char arg3) { System.out.println(

"The values are " + arg1 + ", " + arg2 + ", and " + arg3); } Write a statement that calls this method and passes the following variables as arguments: char initial = 'T'; int age = 25; double income = 50000.00;
Computers and Technology
1 answer:
Oduvanchick [21]3 years ago
7 0

Answer:

The method can be accessible from main method of any class.

Explanation:

Main method is the entry point of a program, which means when you start you program the first thing to execute is the main method.

public static void main(String[] args){

// Your code here

}

In the given display method you have int, double and char data types as a arguments. So in order to call display method you need to understand the datatype that you want to pass.

int only takes integers without decimal points.

double take numbers with decimal points.

and char only tak one character

so in order to call display method we need to pass those arguments in right order.

Below is the main method which will call the display method in a right way

public static void main(String[]args){

  display(25,50000.00,'T');

}

Output

The values are 25, 50000.0, and T

You might be interested in
The view side by side command is used to view and ________ two workbooks at one time
Reil [10]
...to view and edit two...
7 0
3 years ago
You wish to lift a 12,000 lb stone by a vertical
Shkiper50 [21]
Ndnsnskiaqosikejwnw sorry
3 0
3 years ago
A customer in a store is purchasing five items. Design a program that asks for the price of each item, and then displays the sub
kykrilka [37]
What language are you programming in? 

<span>If you are programming in C or C++, you could do something like this: </span>

<span>#include <iostream> </span>
<span>using namespace std; </span>

<span>int main(void) </span>
<span>{ </span>
<span>//declarations </span>
<span>double item1 = 0; </span>
<span>double item2 = 0; </span>
<span>double item3 = 0; </span>
<span>double item4 = 0; </span>
<span>double item5 = 0; </span>
<span>double subtotal = 0; </span>
<span>double total = 0; </span>
<span>double tax = 0; </span>

<span>//Enter Items </span>
<span>cout << "Please enter the price of item 1"; </span>
<span>cin >> item1; </span>

<span>cout << "Please enter the price of item 2"; </span>
<span>cin >> item2; </span>

<span>cout << "Please enter the price of item 3"; </span>
<span>cin >> item3; </span>

<span>cout << "Please enter the price of item 4"; </span>
<span>cin >> item4; </span>


<span>cout << "Please enter the price of item 5"; </span>
<span>cin >> item5; </span>


<span>//Compute subtotal </span>
<span>subtotal = (item1 + item2 + item3 + item4 + item5 + item6); </span>

<span>//Compute amount of tax </span>

<span>tax = subtotal * (.06); </span>

<span>//Compute total </span>

<span>total = subtotal + tax; </span>

<span>//Display subtotal, total, and amount of tax </span>

<span>cout < " The subtotal of the sale is: " << subtotal << endl; </span>
<span>cout < " The amount of sales tax is: " << tax << endl; </span>
<span>cout < " The total of the sale is: " << total << endl; </span>

<span>return 0; </span>

<span>}//end of function main </span>


<span>I know this is a very very basic C++ program but I hope it helps and good luck on your project!</span>
5 0
3 years ago
What is the role of computer in modern problem solving​
REY [17]

Answer:

Una computadora es una herramienta muy básica para hacer tareas repetitivas de forma más eficiente. Una computadora no es capaz de analizar un problema y obtener una solución.

Explanation:

3 0
3 years ago
Does anyone else have edge and think its not the awful?
oksano4ka [1.4K]

Answer:

yea

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Categorize the following relationships into generalization, aggregation, or association. Beware, there may be n-ary associations
    14·1 answer
  • In a database, a collection of related fields that describes some object or activity is referred to as a ____.
    9·1 answer
  • Shania has started a new job as an app developer. Her first task was to make an old app designed for Android available on other
    6·1 answer
  • Need help with this file and due today!!
    6·1 answer
  • What file may contain data written to it in case of an unexpected error or program shut-down?
    5·1 answer
  • Kuta software infinite pre- algebra multiplying polynomial and a monomial find product answer key
    14·1 answer
  • To use the program service routines, the user's program makes requests to the operating system through the
    10·1 answer
  • Remember for a moment a recent trip you have made to the grocery store to pick up a few items. What pieces of data did the Point
    15·1 answer
  • Does anyone know a good reason WHY to change your username.
    5·1 answer
  • Convertbinary(111100)to decimal​​​​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!