Compute the sales tax as five percent of the purchase price

Assignment Help C/C++ Programming
Reference no: EM13699407

Question: This is for a C++ programming class using the joyce farrel book.

Program: Create a structure named purchase. Each purchase contains an invoice number, amount of sale, and amount of sales tax.

Create a main() method that declares a Purchase object and prompts the user for purchase details. When you prompt for an invoice number, do not let the user proceed until a number between 1000 and 8000 has been entered.

When you prompt for a sales amount, do not proceed until the user has entered a non-negative value.

Compute the sales tax as five percent of the purchase price. After a valid purchase object has been created display the objects invoice number, sales amount, and sales tax.

Please ensure you use only things that the object oriented programming using c++ book by joyce farrel. Please do not use code that would not have been learned yet and please keep it short and simple.

Reference no: EM13699407

Questions Cloud

Write a java program that uses the elapsed time : Write a Java program that uses the elapsed time for an event in second and then outputs the elapsed time in hours, minutes and seconds. (For case, if the desired time is 9630 seconds, then the output is 2: 40: 30)
Write a program outputs the number of milk : Write a program that does the subsequent for 50 liters of milk produced in the morning - The cost of producing one liter of milk is $0.58, cost of each carton itself is $0.25 and the sale price on each carton of milk is $3.99.
The half life for the first order decomposition of n2o5 : Problem- The half life for the first order decomposition of N2O5 is 20.5 x 10^4 s. How long will it take for a sample of N205 to decompose to 80%, 50%, and 20% of its initial value
Design the logic for a program that merges the files : Design the logic for a program that merges the files for summer and winter programs to create a list of the first and last names of all participants for the year.
Compute the sales tax as five percent of the purchase price : Create a structure named purchase. Each purchase contains an invoice number, amount of sale, and amount of sales tax.
Write an application that shows the sum : This is for Object-Oriented Programming Using C++ language - Edition Joyce Farrell. Please ensure to read everything that I have wrote so that there is no confusion.
Find which statement is true and which statement is false : Two cells within a Karnaugh map are adjacent if only one variable is different between the coordinates of the two cells - Find which statement is true and which statement is false.
How much energy is released of ethane undergoes : Problem- 2C2H6 (g) + 7O2 (g) ? 4CO2(g) + 6H2O (g) ?H = -1560 kJ How much energy (in kJ) is released if 15.6 g of ethane undergoes combustion
What would be the representation 010 in 16-bit binary : Express 159 base10 and -98 base10 in 8-bit binary one's complement form and then add the numbers.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Computing the standard deviation

Input Details: The scores are entered as numbers with or without decimal points. In response to the continuation prompts (described below) the user types a y or a Y to signify "continue" with any other character signifying "quit".

  Prepare a binary to decimal memory game

The computer generates a random sequence of 0s and 1s creating a binary number - prepare a binary to decimal memory game.

  Program that evaluates a infix expression

Program that evaluates a infix expression using stacks terminated by an equal sign. for example: (4-2)-5)/(2+1)-2))=the expression will contain single digit and the operators +, -, *,/. Make sure to consider the operator precedence.

  Computers have trended to larger word

Since the beginning, computers have trended to larger word sizes, 8 to 16 to 32 and now some 64 bit computers. Explain a pro or a con in a computer with a larger word size, or comment on someone else's pro or con.

  Create a text file named grades.txt

Write a program to calculate students' average test scores and their grades. Creat a text file named  grades.txt

  How many times will jump be displayed

Write an if statement that assigns 15 to x when y is greater than or equal to or 7 and how many times will "jump" be displayed in the following program segment? If the loop doesn't terminate, write "infinite".

  Write a c++ program to grade multiple-choice

Write a C++ program to grade multiple-choice, including True/False, questions for an exam given in a class. A class may have one or more sections.

  C code christmas assignment

C code Christmas assignment. We are supposed to create a record generating programme that will accept user information and output student information (student grade, highest and lowest grade, pass or fail status). Must be done in modular form,..

  Give students practice in writing and calling their function

To give students practice in writing and calling their own functions. To give students practice in implementing and planning complex programs.

  Write the prototype and header for a function

Write the prototype and header for a function called calculate. The function should have three parameters: an int, a reference to a double, and a long (not necessarily in that order). Only the int parameter should have a default argument, which is..

  Write a recursive function to draw the pattern

write a program that prompts the user to enter the number of lines in the pattern and uses the recursive function to generate the pattern. For example, specifying 4 as the number of lines generates the above pattern.

  Program that will calculate the heat transfer of a substance

write a program that will calculate the heat transfer of a substance (water) given three different shapes. The user has to be able to input the type of shape, so that the computer can calculate area, and plug it back in to the equation for heat trans..

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