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
Komok [63]
3 years ago
5

Given the following code, what will be the value of finalAmount when it is displayed? public class Order { private int orderNum;

private double orderAmount; private double orderDiscount; public Order(int orderNumber, double orderAmt, double orderDisc) { orderNum = orderNumber; orderAmount = orderAmt; orderDiscount = orderDisc; } public double finalOrderTotal() { return orderAmount - orderAmount * orderDiscount; } } public class CustomerOrder { public static void main(String[] args) { Order order; int orderNumber = 1234; double orderAmt = 580.00; double orderDisc = .1; order = new Order(orderNumber, orderAmt, orderDisc); double finalAmount = order.finalOrderTotal(); System.out.printf("Final order amount = $%,.2f\n", finalAmount); } } Group of answer choices
Computers and Technology
1 answer:
katrin [286]3 years ago
7 0

Answer:

$522.00

Explanation:

  • The code in Java implements two classes Order and CustomerOrder
  • The Order class contains the method for the member variables orderNum, orderAmount and orderDiscounts, It also contains the method finalOrderTotal() for calculating the final order amount
  • The second class CustomerOrder contains the main method and  serves as the driver class.
  • The finalAmount is calculated in the method finalOrderTotal()  and the logic here substracting the discount from the orderAmount that is orderAmount - (orderAmount * orderDiscount)
  • Since the orderAmount in the given example is 580 and the discount is 0.1 (i.e 58) the finalAmount will be 580 - 58 which gives 522 dollars
You might be interested in
Mrs. Jackson wrote a newsletter to the customers of her housecleaning business that included some organizational tips they could
nika2105 [10]
The correct answer is a. effective communication

- - -
Ineffective and barriers to communication are problems that make communication unclear. Workplace communication is at work or at a job. This is not a job newsletter for workers, but for people at home.
5 0
4 years ago
Read 2 more answers
calculate how many turns of cable you will need on the drum for your cage and skip to move up and down by 500 m​
anyanavicka [17]
Physics. only one, if the drum is 500m around... 50 turns. you will need on the drum for your cage and skip to move up and down by 500m. 500/18.84= 26.5.

Mark me as brainliest pls..... :)
5 0
3 years ago
What is the only language a microprocessor can process directly but most programmers almost never write programs in this code? Q
elixir [45]
A microprocessor can directly process machine code but most programmers almost never write in it.
C. Machine code
7 0
3 years ago
Read 2 more answers
R15. Suppose there are three routers between a source host and a destination host. Ignoring fragmentation, an IP datagram sent f
maria [59]

Answer:

The answers are: an IP datagram, and 3 forwading tables.

Explanation:

An IP datagram sent from a source host to a destination host will travel through 8 interfaces. 3 forwarding tables will be indexed to move the datagram from source to destination.

8 0
3 years ago
The auto recover function in a word is available to especially if you experience powerful failure explain what happens to your d
Komok [63]

Answer:

When the document is not saved before the application is closed, The word application assumes that the file is not important, so does not save a recovery file, but to recover the file open the application and go to the recently opened file, do not edit the file, go to the bottom of the document and click on recovery or use the CTRL-Z shortcut key.

Explanation:

Microsoft word is a word processing application used to make and edit word documents. The recovery option in the word application is an essential tool in Word that prevents a permanent loss of documents in production and can be used to retrieve saved and unsaved documents.

7 0
3 years ago
Other questions:
  • Order the steps to take when drawing electron dot diagrams.
    15·2 answers
  • Arrays are described as immutable because they are two dimensional. are arranged sequentially. can be reordered. cannot be chang
    11·1 answer
  • Which of the following attacks seeks to introduce erroneous or malicious entries into a server's hostname-to-IP address cache or
    5·1 answer
  • Briefly summarize two examples of cybercrime stories.<br> quick pleaseeee
    10·1 answer
  • What constructs break or bend the normal Syntax patterns of scheme?
    15·1 answer
  • You want to be able to identify the services running on a set of servers on your network. Which tool would best give you the inf
    11·1 answer
  • Who addicted to fnaf
    5·2 answers
  • Which term best describes these lines?
    7·1 answer
  • Which of the following is NOT one of the four benefits of using email?
    14·1 answer
  • What is causing the electricity prices to increase in South Africa?​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!