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 int getOrderAmount()
{
Return orderAmount;
}
Public int getOrderDisc()
{
Return orderDisc;
}
}
Public class CustomerOrder
{
Public static void main(String[] args)
{
Int ordNum = 1234;
Double ordAmount = 580.00;
Double discountPer = .1;
Order order;
Double finalAmount = order.getOrderAmount() -
Order.getOrderAmount() * order.getOrderDisc() ;
System.out.printf("Final order amount = $%,.2f\n",
FinalAmount) ;
}
}
A) 528.00
B) 580.00
C) There is no value because the constructor has an error.
D) There is no value because the object, order, has not been created.
Correct Answer:

Verified
Correct Answer:
Verified
Q48: Instance methods do not have the key
Q49: A(n) _ can be thought of as
Q50: Methods that operate on an object's fields
Q51: A class specifies the _ and _
Q52: An access specifier indicates how a class
Q54: The following statement is an example of
Q55: Overloading means that multiple methods in the
Q56: When an object is created, the attributes
Q57: A class's responsibilities include _.<br>A) the things
Q58: Instance methods should be declared static.