Professional Documents
Culture Documents
Untitled
Untitled
Scenario 2:
1. create a wrapper class OrderItems
1. orderDate
2. quantity
3. price
4. total
2. create a apex class InvoiceLineItems
a.items : List<OrderItems>
b.billAmount :Decimal
c.tax :Decimal
d.Create a constructor and intilize the items
billAmount=0
tax=0
e. placeOrder(quantity,price) ;This method should create new orderitem
and add to the items
orderData=today
total-quantity*price
f. createBill(): This method has summarize the total amount from
list of items and set it as billAmount