Method createinvoice generates a string that is printed in a

Method createinvoice generates a string that is printed in a

  
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. 

Method createinvoice generates a string that is printed in a

ad:  Delta 8 online | THC Online | Buy hemp online | THC Carts | Delta 8 Carts | THCO Carts | HQD Vape | Fume Vape | Fume Extra | Fume Unlimited | HQD Cuvie | HQD Cuvie plus | zero Nic Disposable Vapes | Fume Infinity | Fume Ultra | FoodGod | Supreme Vape 

  
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. 

Leave a Comment

Your email address will not be published. Required fields are marked *