what are some of the reports that management might need? What SELECT statement could you use to generate the data for those reports?
/in Feeds /by Munene davidTCOs 2,4, 5, and 8) Write program to input a purchase amount and calculate the sales tax and total due.
/in Feeds /by Munene davidTCOs 2,4, 5, and 8) Write program to input
a purchase amount and calculate the sales tax and total due. The sales tax depends on the county identifying code. Counties with a number less than 8 have a 5% sales tax. The 8-20 codes have a sales tax of 6%. Codes above 20 have a sales tax of 7%. The purchase amount and county code are entered by the user. Use a loop to validate that the county code is between 5 and 30. Display the amount of the sales tax and the total.
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
I need help finishing this compiling this code here is the script and it is a script for an atm program on visual studio 2017.
/in Feeds /by Munene davidI need help finishing this compiling this code here is the script and it is a script for an atm program on visual
studio 2017.
// Bring in our properties
#include <iostream>
#include <conio.h>
#include <string>
#include <fstream> // read/write to files
#include <ctime> //time (0)
#include <iomanip> // setprecision ()
using namespace std;
//prototypes
void deposit(double* ptrBalance);
void withdrawl(double*ptrBalance, float dailyLimit); //overloaded method-this version does not take withdrawl mount
void withdrawl(double*ptrbalance, float dailyLimit, float amount); //overloaded method that takes withdrawl amount
/// Entry point to application
int main()
{
//pause
cout << “Press any key to continue …”;
_getch();
///make a deposit
void deposit(double* ptrBalance);
{
//get deposit and validate
float deposit = 0.0f;
do
{
cout << “nEnter deposit amount:”;
cin >> deposit;
if (cin.fail()) //did they give us a character instead of a number?
{
cin.clear(); //clears fail state
cin.ignore(INT16_MAX, ‘n’); // Clears keyboard buffer
cout << “nError. Please use numbers only.n” << endl;
deposit = -1; // set deposit to a “Bad number”
continue; // restart loop
}
else if (deposit <0.0f) //check for negaitve number
cout << “nError. Invalid deposit amount.n” << endl;
}
while (deposit < 0.0f);
//how do we get the double value located at the pointer?
//Deference it using an aterisk!
*ptrBalance += deposit;
//same as ptrbalance=*ptrbalance+deposit;
cout << fixed << setprecision(2) << “nCurrent balance :$” << *ptrBalance << endl;
}
void withdrawl(double*ptrBalance, float dailyLimit);
{
//get the withdrawl(you should validate this input)
float amount = 0.0f;
cout << “nEnter withdrawl amount:”;
cin >> amount;
//call the overloaded method version that takes the balance, dailyLimit, and withdrawl amount
withdrawl(ptrBalance, dailyLimit, amount);
}
/// Make a withdrawl-this overload accepts balance,dailyLimit, and withdrawl amount
void withdrawl(double*ptrBalance, float dailyLimit, float amount);
{
//take away money from the account and show the balance
if (amount > dailyLimit)
{
cout << “nError. Amount exceeds daily limit” << endl;
}
else if (amount > *ptrBalance) //notice the asterisk to deference the pointer
{
cout << “nError. Insufficient funds.” << endl;
}
else
{
*ptrBalance -= amount; //same as:*ptrBalance=*ptrBalance-amount;
cout << “nHere is your cash: $” << amount << endl;
}
cout << fixed << setprecision(2) << “nCurrent Balance: $” << *ptrBalance << endl;
}
const int EXIT_VALUE =5;
const float dailyLimit = 400.0f;
const string FILENAME = “Account.txt”;
double Balance = 0.0;
double* ptrBalance = &Balance; // & means “address of”
ifstream iFile(FILENAME.c_str());
if (iFile.is_open())
{
iFile >> Balance;
iFile.close();
}
else
{
srand(time(0) );
const int MIN = 1000;
const int MAX = 10000;
Balance = rand() % (MAX – MIN + 1) + MIN;
}
cout << fixed << setprecision(2) << “Starting Balance:$/n” << Balance << endl;
short choice = 0;
//show the menu
do
{
system(“cls”);
cout << “Menun” << endl;
cout << “1) Deposit” << endl;
cout << “2) Withdrawl” << endl;
cout << “3) Check Balance” << endl;
cout << “4) Quick $40” << endl;
cout << “5) Exit” << endl;
cout << “Enter your choice:”;
cin >> choice;
// run code based on the user’s choice
switch (choice) {
case 1:
deposit(ptrBalance);
break;
case 2:
cout << “Making a withdrawl…n” << endl;
withdrawl(ptrBalance, dailyLimit);
break;
case 3://show balance
cout << fixed << setprecision(2) << “nCurrent Balance: $” << Balance << endl;
break;
case 4://getting a quick 40
withdrawl(ptrBalance, dailyLimit, 40.0f);
break;
case 5:
cout << “Goodbyen” << endl;
break;
default:
cout << “Error. Please select from the menun” << endl;
break;
}
//pause
cout << “…Press any key to continuen”;
_getch();
}
while (choice != EXIT_VALUE);
//now that the application is is over, write the new balance to the file
ofstream oFile(FILENAME.c_str());
oFile << Balance << endl;
oFile.close();
return 0;
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
About Us
![]()
Since 2010, we have offered professional writing services to clients all over the world.
Over the years, our writers have gained solid experience in all academic disciplines, giving them a competitive edge to provide only first-rate academic papers.
![]()
QUICK LINKS
Contact Us
For any questions, feedback, or comments, we have an ethical customer support team that is always waiting on the line for your inquiries.
Talk to us
support@academicheroes.com
Call us: +1 (203) -677 0547