Devam Ediyor

477218 ThreeArrayLists

Write a program called [url removed, login to view] that declares three arrayLists referenced by the objects named priceList, quantityList, and amountList. Each arrayList should be declared in main() and should be capable of holding a minimum of 10 double-precision numbers.

The numbers that should be stored in price are [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], 3.98.

The numbers that should be stored in quantity are 4, 8.5, 6, [url removed, login to view], 9, 15.3, 3, 5.4, 2.9 4.8.

Your program should pass object references to these three arrays to a method named extend(), which should calculate the elements in the amount array as the product of the corresponding elements in the price and quantity arrays (for example, amount [i] = price[i] * quantity [i]).

After extend() has put values into the amount array, create a method that displays the results of all three lists. Appropriate formatting techniques need to be used to produce a formatted output.

Sample program output:

1) [url removed, login to view] * 4.0 = [url removed, login to view]

2) [url removed, login to view] * 8.5 = [url removed, login to view]

3) [url removed, login to view] * 6.0 = [url removed, login to view]

4) [url removed, login to view] * [url removed, login to view] = [url removed, login to view]

5) [url removed, login to view] * 9.0 = [url removed, login to view]

6) [url removed, login to view] * 15.3 = [url removed, login to view]

7) [url removed, login to view] * 3.0 = [url removed, login to view]

8) [url removed, login to view] * 5.4 = [url removed, login to view]

9) [url removed, login to view] * 2.9 = [url removed, login to view]

10) [url removed, login to view] * 4.8 = 19.1

Beceriler: Her şey Kabul, Java

Daha fazlasını görün: threearraylists, create java object, arrays java, object method, numbers array program, 144, array numbers, price lists sample, pricelist, extend program, calculate java program, example pricelist, example program array, java double lists

İşveren Hakkında:
( 7 değerlendirme )

Proje NO: #2223125

Seçilen:

ancosys

Hey, Please check pm. Thanks!

0 gün içinde 10$ USD
(91 Değerlendirme)
5.7