Multiple Choice
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) ;
}
}
A) 528.00
B) 580.00
C) 522.00
D) There is no value because the object order has not been created.
Correct Answer:

Verified
Correct Answer:
Verified
Q9: A method that stores a value in
Q47: In UML diagrams, this symbol indicates that
Q48: An access specifier indicates how the class
Q49: When you are working with a _,
Q51: In the cookie cutter metaphor, think of
Q53: What is stored by a reference variable?<br>A)
Q54: The term "default constructor" is applied to
Q55: Data hiding, which means that critical data
Q56: Most programming languages that are in use
Q57: A constructor:<br>A) always accepts two arguments<br>B) has