Hello, i hope u doing well all , i have this is question and i tried to solve it but, when i run the program it does not multiplies the quantity by the price i dont know i hope u can help me with it.
hmm. Have you tried doing int x = quantity*price; then returning x?
Edit: the function "getInvoiceAmount" is an integer. So after youve returned something. In this case quantity*price; you must "catch" it with an integer in main. Like this -
int invoiceAmountCatcher = obj.getInvoiceAmount(); (I think this is how it is done however I am not certain, try it)