Question & Answer: Change this program from pointers to class in C++…..

Change this program from pointers to class in C++
.ill T-Mobile 10:45 PM 95%-iii), + Done Casewell-Pointers.cp #include <iostream> #include <iomanip> using namespace std; int main() //Symbolic Meanings //ad = Adult Non-Desserts //dess = Dessert Cost //rm Room Fee //taxa Tax and Tip Sum //afd = Adult Food //alSum of Child and Adult meals //cd = Children Non-Dessert //ta = Total Adult Food Cost //tc = Total Children Food Cost //td = Total Dessert Cost //t = Total without deposit //ptt = Tax and tip Rate (%) /dpt = Deposit /bal Balance int adult, child float ad, dess, rm, cd, ta, taxa, tc, td, t, ptt, all, dpt, bal; cout <<For every number you input, press [ENTER] when done with what each line is asking. << endl; cout << endl cout <<How many adults are attending: cin >>adult; cout <<How many children are attending:; cin >>child cout << What is the cost of an adult without dessert: cin >>ad cout << What is the cost per dessert: cin > dess cout <What is the room fee: cin >>rm cout << What is the tip and tax rate? (With the decimal):
media%2F8a4%2F8a47cf09-7884-4197-929e-e9
media%2Ff17%2Ff17f224d-b6b7-4d4c-9cc9-55

t.ill T-Mobile 10:45 PM 95%-iii), + Done Casewell-Pointers.cp #include #include using namespace std; int main() //Symbolic Meanings //ad = Adult Non-Desserts //dess = Dessert Cost //rm Room Fee //taxa Tax and Tip Sum //afd = Adult Food //alSum of Child and Adult meals //cd = Children Non-Dessert //ta = Total Adult Food Cost //tc = Total Children Food Cost //td = Total Dessert Cost //t = Total without deposit //ptt = Tax and tip Rate (%) /dpt = Deposit /bal Balance int adult, child float ad, dess, rm, cd, ta, taxa, tc, td, t, ptt, all, dpt, bal; cout

Expert Answer

 

#include<iostream>//input output streaam header file

Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: Change this program from pointers to class in C++…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Order Essay

#include<iomanip>//input output mainpulation file like setw

using namespace std;

class Dessert

{

int adult,child;

float ad,dess,rm,cd,ta,taxa,tc,td,t,ptt,all,dpt,bal;

/*ad Adult non desserts

dess = desert cost

rm room rent

taxa tax and tip sum

afd adult food

all sum of child and adult meals

ta total adult food

tc total child food

td total dessert food

t total without deposit

ptt tax and tip rate %

dpt deposit ammount

bal balance amount

*/

public:

void input(); //taking inputs through memeber function

void calc(); //calucate all the items

void output(); //display the bill

};

void Dessert::input()

//defination of input function

{

cout<<“for every number input press[enter]”;

cout<<endl<<“how many adults are attending”;

cin>>adult;

cout<<endl<<“How many childrens are attending”;

cin>>child;

cout<<endl<<“what is the cost of an adult with out dessert”;

cin>>ad;

cout<<endl<<“what is the cost per desset”;

cin>>dess;

cout<<“what is the room free”;

cin>>rm;

cout<<endl<<“what is the tip and tax rate(with decimal)”;

cin>>ptt;

cout<<endl<<“how much did you deposit”;

cin>>dpt;

}

void Dessert::calc()

{

//all caluclations

cd=0.6*ad;

ta=adult*ad;

tc=cd*child;

td=dess*(adult+child);

all=ta+tc+td;

taxa=all*ptt;

t=rm+taxa+all;

bal=t-dpt;

}

void Dessert::output()

{

//display menu

//setw is set width position

cout.setf(ios::showpoint);

cout<<fixed<<setprecision(2);

cout<<endl<<setw(15)<<“Caswell Catering and convention Service”<<endl;

cout<<endl<<setw(21)<<“FINAL BILL”<<endl;

cout<<setw(31)<<“Number of Adults”<<setw(12)<<adult<<endl;

cout<<setw(31)<<“Number of childrens”<<setw(12)<<child<<endl;

cout<<“Cost per adult with out desert”<<setw(8)<<ad<<endl;

cout<<“Cost per chaild with out dessert”<<setw(8)<<cd<<endl;

cout<<setw(31)<<“Cost per dessert”<<setw(5)<<“$”<<setw(8)<<dess<<endl;

cout<<setw(31)<<“Room fee”<<setw(5)<<“$”<<setw(8)<<rm<<endl;

cout<<setw(31)<<“Tip and tax rate”<<setw(5)<<“%”<<setw(8)<<ptt<<endl;

cout<<setw(31)<<“Total cost for Adult Meals”<<setw(5)<<setw(8)<<ta<<endl;

cout<<setw(31)<<“Total cost for Child Meals”<<setw(5)<<setw(8)<<td<<endl;

cout<<setw(31)<<“Total food cost”<<setw(5)<<setw(8)<<all<<endl;

cout<<setw(31)<<“Plus Tip and Tax”<<setw(5)<<setw(8)<<taxa<<endl;

cout<<setw(31)<<“Plus Room Fee”<<setw(5)<<setw(8)<<rm<<endl;

cout<<setw(36)<<“$”<<setw(8)<<t<<endl;

cout<<setw(44)<<“————-“<<endl;

cout<<setw(36)<<“$”<<setw(8)<<t<<endl;

cout<<setw(31)<<“Less Deposit”<<setw(5)<<“$”<<setw(8)<<dpt<<endl;

cout<<setw(44)<<“————-“<<endl;

cout<<setw(31)<<“Balance Due”<<setw(5)<<“$”<<setw(8)<<bal<<endl;

}

int main()//main program

{

Dessert d; //create dessert object

d.input();//call input member function

d.calc();//call calc member function

d.output();//call output member function

}

Grand Paper Writers
Order NOW For A 10% Discount!
Pages (550 words)
Approximate price: -

Our Advantages

Plagiarism Free Papers

All papers are written by the best professional writers to ensure 100% originality. We always provide plagiarism reports whenever we deliver completed papers.

Free Revisions

All papers by Grand Paper Writers are completed and submitted on time. This timely delivery of papers gives you time to go through the paper before the official deadline.

Title-page

As an additional service, we will provide a title page that precedes the contents of your paper. Here, you will provide your personal details.

Bibliography

We also ensure that we provide an extra page for the references or bibliographies following referencing rules.

Originality & Security

At Grandpaperwriters.com, we guarantee students for the provision of security and original work. All your personal information is handled with confidentiality and is not shared with third parties. Additionally, we ensure that we provide original content with accompanying plagiarism reports to show originality.

24/7 Customer Support

Our customer support team is always available 24/7 to provide instant responses to any queries raised by students.

Try it now!

Calculate the price of your order

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Grandpaperwriters.com has the best professional essay writers for quality services.

Pricing

Flexible Pricing

Here, a Grandpaperwriters.com, we do not compromise on the time of our clients. We always deliver all completed papers on or before the deadlines.

Communication

Admission Help & Client-Writer Contact

Grandpaperwriters.com provides an interactive portal where students can communicate directly to their writers.

Deadlines

Paper Submission

Here, a Grandpaperwriters.com, we do not compromise on the time of our clients. We always deliver all completed papers on or before the deadlines.

Reviews

Customer Feedback

Grandpaperwriters.com appreciates feedback from our clients to help us improve the delivery of essay writing services. As such, we are constantly changing our policies to ensure maximum customer and writer satisfaction.