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
anyanavicka [17]
3 years ago
14

// GetData() method accepts order number and quantity // that are used in the Main() method // Price is $3.99 each using System;

using static System.Console; class DebugEight1 { static void Main() { int orderNum, quantity; double total; const double PRICE_EACH = 3.99; GetData(orderNum; quantity); total = quantity * PRICEEACH; WriteLine("Order #{0}. Quantity ordered = {1}", orderNum, quantity; WriteLine("Total is {0}", total.ToString("C")); }
Computers and Technology
1 answer:
Amiraneli [1.4K]3 years ago
8 0

Answer:

The method definition to this question as follows:

Method definition:

//method GetData

       public static void GetData(out int order, out int amount)//defining method GetData  

       {  

           String val1, val2;  //defining String variable

           Write("Enter order number ");  //message

           val1 = ReadLine();  //input value by user

           Write("Enter quantity ");  //message

           val2 = ReadLine();  //input value by user

           order = Convert.ToInt32(val1);  //convert value in integer and hold in order variable  

           amount = Convert.ToInt32(val2);  //convert value in integer and hold in amount variable

       }

Explanation:

In the above C# method definition code a method  GetData() is defined in which the GetData() method is a static method, in this method parameter two integer argument "order and amount" is passed, inside a method, two string variable "val1 and val2" is declared that is used to take input by the user and convert the value into integer and store this value in the function parameter variable.

You might be interested in
Use ONE SQL statement to show the total number of actual hours for each customer. In the output, show customer id and the total
valkas [14]

Explanation:

SELECT  

   distributor_id,  

   COUNT(*) AS TOTAL,  

   COUNT(IF(level='exec',1,null)),

   COUNT(IF(level='personal',1,null))

FROM sometable;

7 0
3 years ago
When using a spreadsheet, sum in the expression =sum(b10:b16), is called a(n) ________?
Marianna [84]
It is called a function.
4 0
3 years ago
What does this road sign mean?
serious [3.7K]

Answer:

Speed limit 50 ahead

Explanation:

6 0
3 years ago
Read 2 more answers
In a ____ queue, customers or jobs with higher priorities are pushed to the front of the queue.
saul85 [17]

Answer: In a priority queue, customers or jobs with higher priorities are pushed to the front of the queue.

Explanation:

A queue is an abstract data type which is an ordered set of elements. The elements are served in the order in which they join the queue. The first element which was put in the queue is processed first.  

The operations performed on queue data type are dequeue and enqueue.

Dequeue refers to removal of the first element from the queue after it has been serviced.

Enqueue refers to the arrival of new element when the element is added at the end of the queue.

A priority queue is another implementation of a queue. All the elements in a priority queue are assigned a priority. The element with the higher priority is served before the element with a lower priority. In situations of elements having same priority, the element is served based on the order in which the element joined the queue.

In programming, a priority queue can be implemented using heaps or an unordered array. Unordered array is used based on the mandatory operations which are performed on the priority queue.

The mandatory operations supported by a priority queue are is_empty, insert_with_priority and pull_highest_priority_element. These operations are implemented as functions in programming.

The is_empty confirms if the queue is empty and has no elements.

The insert_with_priority puts the new element at the appropriate position in the queue based on its priority. If the priority of the element is similar to the priority of other element, the position of the new element is decided based on the order of joining the queue.

The pull_highest_priority_element pulls the element having the highest priority so that it can be served before other elements. The element having the highest priority is typically the first element in the priority queue.

In operating system, priority queue is implemented to carry out the jobs and/or tasks based on their priority.

4 0
3 years ago
Which of the following defines code?
balu736 [363]

Answer:

A set of instructions, written by a programmer, that is used by computers to perform tasks

3 0
3 years ago
Other questions:
  • The strength of the electromagnetic waves being radiated from an antenna is referred to as gain, which involves a measurement of
    9·1 answer
  • Show what this program prints. Be exact and complete. Can you explain the behavior of each print statement? 1 2 3 4 5 6 7 public
    12·1 answer
  • i see tabs named mowed and Ramsey i tried shredding them and deleting them and ending all the processes but they start duplicati
    13·1 answer
  • Gimme a Krabby Patty
    8·2 answers
  • If you were practicing keyboarding and the exercise contained the letters, q, o, e, p, r, and t, what section of the keyboard ar
    12·1 answer
  • describe what measures should have been taken by the educational service and test preparation provider to avoid the security bre
    11·1 answer
  • Helen is working on her colleague’s photos. She came across this particular photo and was confused about which effect the photog
    15·2 answers
  • Jacob was sitting in class. His teacher understands that he is the type of student that doesn't comprehend when he sees or hears
    6·1 answer
  • Give five example of a dedicated device ​
    9·2 answers
  • Television, video, computers, radios, and magazines used by target audiences are all what types of channels?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!