Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

18) Given the following code, what will be the value of finalAmount when it is displayed? 18) public class order private int orderNumber private double

image text in transcribed

18) Given the following code, what will be the value of finalAmount when it is displayed? 18) public class order private int orderNumber private double orderAmount private double orderDiscount; public Order (int orderNum, double orderAmt, double orderDisc) orde rNum = orde rNumber; orderAmount # orderAmt ; orderDiscountorderDisci public double getorderAmount return orderAmount; public double getorderDiscount ) return orderDiscounti import java.text. NumberFormat public class Customerorder public static void main(stringt args) int ordNum1234: double ordAmount 580.00 double discountPer 0.10 order orders new Order (ordNum, ordAmount, discountPer) double finalAmount finalAmount- orders.getorderA mount )-orders.getorderAmount ) orders.getorderDiscount ) NumberFormat fmt- NumberFormat.getCurrencyInstance) system.out.printin( Pinal order amount : t mt. format system.out.println ("Pinal order amount:t. (finalAmount))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions