Discuss the below:
Q: Draw a diagram for a invoice problem statement. I need to create the function in JavaScript and call it in an HTML file.
"An invoice consists of a customer, a list of line items, and a date of purchase. Customers have contact names, addresses, telephone numbers, and an internal customer ID. Line items consist of an item and a quantity. Items have a description and a price."
For the objects identified write a constructor.Then create create two methods that act on invoices. One should be addLineItem that adds a line item to an existing invoice. The other should calculateTotal that determines the total billing price of the invoice.