Creating a program that creates a single tips object

Assignment Help Computer Engineering
Reference no: EM133450

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.

Reference no: EM133450

Questions Cloud

Generate an er model : Generate an ER model
The role of internal audit in the organization : Do you agree with the CFO? If so describe how SOX 404 and CEO/CFO certification removes the need for an internal audit function. If you don't agree, describe what an internal audit function adds beyond SOX 404 and CEO/CFO certification.
Audit committee and assurance engagement : Show why each of the five areas specified by the audit committee may or may not be suitable for this assurance engagement.
Purchasing strategy and strategic purchasing : purchasing strategy and strategic purchasing, corporate and competitive strategie
Creating a program that creates a single tips object : Creating a program that creates a single Tips object
Determine highest distance : Determine highest distance
A statistical conclusion and audit decision : A statistical conclusion, and the audit decision you could make based on the quantitative sample results.
Configuring a database : Configuring a Database
Accounting information system processes : Implement one of the subsequent accounting information system processes:

Reviews

Write a Review

Computer Engineering Questions & Answers

  What are the reasons of project failure

Make sure to contain how and why project was initiated, what setting up was done, how plan went wrong and what was done to solve the trouble. What are the reasons of project failure

  Illustrate the control flow graph

Illustrate the control flow graph

  Application to computer science

Find the matrices that represent the relations.

  Write program that computes the cost of a long distance call

Write program that computes the cost of a long distance call

  What aspect of data is problematic

What aspect of data is problematic

  Program on strings s1 and s2

Program on strings s1 and s2.

  Mathematics in computing

Write the selection sort algorithm

  Security vulnerability

What is the security vulnerability of this solution

  How to plan a payroll class

How to plan a PayRoll class.

  How to generate a hub-and-spoke network

How to generate a hub-and-spoke network

  Clarify security mechanisms available for a database

Clarify security mechanisms available for a database

  Make an employee class with enough numbers of data members

Make an Employee class with enough numbers of data members

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd