Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ program i have included a skeleton for help! COP3014-Foundations of Computer Science Assignment #10 Objectives: 1. Implement a friend function of a class; 2.

C++ program
i have included a skeleton for help!
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
COP3014-Foundations of Computer Science Assignment #10 Objectives: 1. Implement a friend function of a class; 2. Overload the 60 then discount percentage is 14%; Note: Apply discount percentage after the net cost has been calculate discount = net_cost * (discount_percentage) /100: (drop / 100 if you converted the discount_percentage to a decimal) d. The tax on a purchase (order_tax) is calculated by the following formula: purchase_tax =(net_cost * tax_rate/100 (drop/100 if you converted the rate from a percentage) e. The total cost of a purchase (rounded to the nearest hundredth) is calculated by the following formula: total_cost = net_cost + purchase_tax - discount. Note: All tax and cost calculations should be rounded to the nearest hundredths. 9. Overload operator all formatting of output 4. Copy of Nursery_stock.txt: owl dade 10.55 100 hibiscus broward 15.82 15 rose dade 9.99 45 carnation palm 7.99 32 rose palm 7.99 60 widow palm 25.75 5 carnation dade 12.55 10 carnation dade 12.55 8 lilly broward 6.92 xerabtgemum palm 13.63 50 yarrow dade 22.85 20 zenobia palm 37.19 32 zephyranthes broward 62.82 40 150 daisy broward 15.99 80 aconitum dade 30.02 72 amaryllis dade 16.14 65 bogonia broward 18.45 3 bellflowbroward 2.96 200 bergenia palm 85.92 10 //THIS IS ONLY AN EXAMPLE TO HELP YOU GET STARTED WITH THIS ASSIGNMENT //EXAMPLE OF PROGRAM HEADER / Name: Lofton Bullard Z#: Z111111111 Course: Foundations of Computer Science (COP3014) Professor: Dr. Lofton Bullard Due Date: 06/05/2050 Due Time: 11:59 PM Total Points: 2009 Assignment #: xyz.cpp Description: #include #include #include using namespace std; class order record { public: string pname; string cname; double plant_cost; int quantity; double tax rate; double net_cost; double discount_rate; double discount; double purchase tax; double total_cost; }; class order_class { public: order_class(); -order_class(); //de-allocates all memory allocate to STR by operator new. bool is_Empty(); //inline implementation bool is full();//inline implementation int search(const string key);//returns Location of key if in StR; otherwise return -1 vo add(); //adds a order record to STR order_class & operator-(const string key); //removes all items in STR with a plant name that matches key. void double_size(); void process(); friend ostream& operator delete STR: STR = temp: > / . //Name: process //Precondition: //Postcondition: 1/Decription: calculate the net cost, tax rate, order tax, discount and total cost for every order record in STR. for every call record in STR. / void order_class::process() / /Name: operatorce //Precondition: //Postcondition: 1/Decription: prints every field of every call_record in STR formatted to a file and return the stream. / ostream& operatore

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Time Database And Information Systems Research Advances

Authors: Azer Bestavros ,Victor Fay-Wolfe

1st Edition

1461377803, 978-1461377801

More Books

Students also viewed these Databases questions

Question

please try to give correct answer 1 .

Answered: 1 week ago