158k views
0 votes
How would you define a method that calcuates and reutrns the final price, after tax and tip, for a passed in price, assuming tip is always 15% and tax is always 8%?

User Matt Ball
by
4.9k points

1 Answer

3 votes

Complete Question

How would you define a method that calculates and returns the final price after tax and tip. for a passed in price, assuming tip is always 15% and tax is always 8%? Options:

O public double getFinalPrice double basePrice) (....)

O public void setFinal Price int tax int tip) (....)

O public int get celint basePrice (....)

O public void getFinal Pricelint basePrice (....)

Answer:

A method that calculates and returns the final price after tax and tip, for a passed in price, assuming tip is always 15% and tax is always 8% can be defined as:

O public void setFinal Price int tax int tip) (....)

Step-by-step explanation:

The above chosen option will calculate and return the final price after adding 15% for tips and 8% for tax. The final price, which a customer is expected to settle, includes the cost of the services, the tip the customer pays on the cost, and the tax on the cost of the services. This method will ensure that the customer pays the correct sales revenue to the organization. It is mostly used by hotels and other entertainment organizations in calculating the final price of the services rendered to clients.

User Carlos Luis Rivera
by
5.0k points