Posted: October 28th, 2022

Method createinvoice generates a string that is printed in a

  

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Method createInvoice generates a string that is printed in a JOptionPane dialog box. If the customer is type SILVER, the base cost is $25. If the customer is type GOLD, the base cost is $30. If the customer is type PLATINUM, the base cost is $35. createInvoice calls calculateCharge to add the video and test cost to the base cost. 

calculateCharge charges $1 for each video if customer type is SILVER and $.50 for each test. If the customer is type GOLD, each video is $.50 and each test is $.25. There is no extra charge if the customer is type PLATINUM. 

ArrayList lessonList keeps a list of all vides watched and tests taken by the customer. 

Write test case, CustomerTest, that creates two customers with the data given. The customers are kept in ArrayList, customerList. Then, using an enhanced for loop, polymorphically walk through the customerList and create the invoice for each customer. Print all customer’s charges in a dialog box as shown. 

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
error: Content is protected !!
Open chat
1
Order through WhatsApp!
affordablepaperwritings.com
Hello!
You Can Now Place your Order through WhatsApp
 

 

Order your essay today and save 30% with the discount code DISCOUNTS2022