Class named Basket that holds information about a fruit bas

Class named Basket that holds information about a fruit basket…. Class named Basket that holds information about a fruit basket. Place your class definition in a header file named Basket.h and your function definitions in an implementation file named Basket.cpp.Include in your solution all of the statements necessary for your code to compile under a standard C++ compiler and within the sdds namespace.Add to this module a custom type called Fruit:struct Fruit {  char m_name[30 + 1]; // the name of the fruit  double m_qty;        // quantity in kilograms }; Thank you in advance !!!  Basket ClassDesign and code a class named Basket that holds information about a fruit basket.Basket Private MembersThe class should be able to store the following data:m_fruits: a dynamically allocated array of objects of type Fruit. This is the resource that you must manage.m_cnt: the size of the m_fruits array.m_price: the price of the basket.You can add any other private members in the class, as required by your design.Basket Public Membersthe default constructora custom constructor that receives as parameters an array of objects of type Fruit, the size of the array received in the fist parameter, and the price of the basket (in this order); stores the parameters into the attributes if all the parameters are valid (the numbers are greater than 0, and the array is not null).the copy constructor (deep-copy for the resource, and a shallow copy for the other attributes)the copy assignment operator (deep-copy for the resource, and a shallow copy for the other attributes; note that the copy constructor and copy assignment operator have almost identical logic — reuse the code)the destructorvoid setPrice(double price): updates the m_price attribute to the value received as parameterthe conversion to bool operator: returns true if the basket contains any fruits, false otherwise.an overload of the += operator that receives as a parameter an object of type Fruit (by value) and adds it to the attribute m_fruits (resize the array-attribute; check previous workshops if you need a refresh on resizing a dynamic array)Friend Helper Functionsoverload the insertion operator (operator<<) to insert into the stream (received as the first parameter) the content of an object of type Basket (received as the second parameter).If the basket doesn't contain any fruit, print the message The basket is empty!.If the basket contains fruits, print the content in the format:Basket Content:[FRUIT_1_NAME]: [FRUIT_1_QUANTITY]kg[FRUIT_2_NAME]: [FRUIT_2_QUANTITY]kg…Price: [BASKET_PRICE]The fruit names should be printed on fields of size 10, aligned to the right; the fruit quantities and basket price should be printed with two significant digits. Tester Program// Workshop 6: Classes with Resources// Version: 1.0// Author: Nargis Khan, Cornel Barna// Description:// This file tests lab section of your workshop/////////////////////////////////////////////#include#include#include”Basket.h”#include”Basket.h” //intentionalusing namespace std;using namespace sdds;void printHeader(const char* title){ char oldFill = cout.fill(‘-‘); cout.width(40); cout << "" << endl; cout << "|> ” << title << endl; cout.fill('-'); cout.width(40); cout << "" << endl; cout.fill(oldFill);}int main(){ sdds::Fruit fruits[]{ {"apple", 0.65}, {"banana", 1.25}, {"pear", 0.50}, {"mango", 0.75}, {"plum", 2.00}, }; { printHeader("T1: Default Constructor"); Basket aBasket; cout << aBasket; // conversion to bool operator if (aBasket) cout << "Test failed: the basket should be empty!n"; else cout << "Test succeeded: operator said the basket is empty!n"; cout << endl; } { printHeader("T2: Custom Constructor"); Basket aBasket(fruits, 2, 6.99); cout << aBasket; // conversion to bool operator if (aBasket) cout << "Test succeeded: operator said the basket has content!n"; else cout << "Test failed: the basket should NOT be empty!n"; cout << endl; } { printHeader("T3: += operator"); Basket aBasket; aBasket += fruits[2]; (aBasket += fruits[0]) += fruits[4]; aBasket.setPrice(12.234); cout << aBasket; cout << endl; } { printHeader("T4: Copy Constructor"); Basket b1; Basket b2(b1); cout << "Basket #1 -> ” << b1; cout << "Basket #2 -> ” << b2; b1 += fruits[3]; b1.setPrice(3.50); Basket b3(b1); cout << "Basket #3 -> ” << b3; cout << endl; } { printHeader("T5: Copy Assignment"); Basket b1, b2, b3(fruits, 5, 19.95); b1 = b2; cout << "Basket #1 -> ” << b1; cout << "Basket #2 -> ” << b2; b1 = b3; cout << "Basket #1 -> ” << b1; b3 = b2; cout << "Basket #3 -> ” << b3; } return 0;}Must be a basket.h and basket.cppComputer Science Engineering & Technology C++ Programming OOP 244

How it works

  1. Paste your instructions in the instructions box. You can also attach an instructions file
  2. Select the writer category, deadline, education level and review the instructions 
  3. Make a payment for the order to be assignment to a writer
  4.  Download the paper after the writer uploads it 

Will the writer plagiarize my essay?

You will get a plagiarism-free paper and you can get an originality report upon request.

Is this service safe?

All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 20% with the discount code ESSAYHELP