Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question

Design a Tips class that calculates the gratuity on a restaurant meal. Its only class member variable, taxRate, has to be set by a one-parameter constructor to anything rate is passed to it as a Tips object is created. If no argument is passed, a default tax rate of .065 must be used. The class must have just one public function, computeTip. These function requirements to accept two arguments, total bill amount and the tip rate. It has to use this information to compute meal cost before any tax was added. It should then apply tip rate to just the meal cost portion of the bill to compute and return the tip amount.

Show class by creating a program that creates a single Tips object, after that loops multiple times to allow program user to retrieve the correct tip amount using various bill totals and desired tip rates.

Input Validation- If a tax rate of less than 0 is passed to the constructor; use default rate of .065. Do not allocate the total bill or the tip rate to be less than 0.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9719116

Have any Question?


Related Questions in Computer Engineering

Smart invest is a small sized investment group that caters

"Smart Invest" is a small sized investment group that caters variety of services to their clients, services such as: financial advising, 401K planing, long term and short term stocks and bonds investment and many others. ...

The system development team at the xyz company is working

The system development team at the XYZ Company is working on developing a new customer order entry system. In the process of designing the new system, the team has identified the following data entity attributes: Invento ...

A salesforce from an ecommerce global organization has

A salesforce from an ecommerce global organization has begun to raise some concerns about the orders they are transmitting over the Internet from their customers' site to the organization's global headquarters. It seems ...

A study sample was done regarding the association between

A study sample was done regarding the association between family history and the risk of developing AD. Exposure were family history of AD and no family history of AD. Outcomes were development of AD or no development of ...

1 select one of the topics listed below and discuss

1. Select one of the topics listed below and discuss it. Describe an application that you have to solve by using at least 2 Excel functions. It can be Math, Statistics, Engineering, Financial, etc. Explain what Excel fun ...

Whats your answer about the equilibrium change from an

What's your answer about the equilibrium change from an event which decreases both demand and supply? You don't need to provide graph here. Just describe the curve shifts and how the equilibrium price and equilibrium qua ...

Birth weights of full-term babies in a certain area are

Birth weights of full-term babies in a certain area are normally distributed with mean 7.13 pounds and standard deviation 1.29 pounds. A newborn weighing 5.5 pounds or less is a low-weight baby. What is the probability t ...

Systems and networksconsider sending a large file from a

(Systems and Networks) Consider sending a large file from a host to another host using a reliable connection such as TCP. Suppose the reliable connection uses additive-increase, multiplicative-decrease (AIMD) without slo ...

Question suppose you are planning a party for 10 friends

Question : Suppose you are planning a party for 10 friends. You decide to make sandwiches to serve at the party, no more than one sandwich per person. Seven of your friends say they want turkey. Five say they want roast ...

Question two paragraphs eachseparate responds1 uml and omg

Question: TWO PARAGRAPHS EACH SEPARATE RESPONDS 1. "UML and OMG" Please respond to the following: Identify the benefits that UML brings to the software development industry. Speculate UML's development and its future inf ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As