(i) Create a class called Purchase.
(ii) Data member (set to private) : name(string), qty(int), price(float) and total(float).
Public member function : Define the member functions outside of the class.
(a) set_data(…)
Take in 3 parameters of type string, int and float, and
set the parameters to name, qty and price.
(b) calculate()
Calculate the total amount of payment to be made.
(c) print()
Display all the information on screen.
(iii) In main() function, create an object of class Purchase called p.
(iv) In main() function get input from the user and pass the data to method set_data(...) so that the values can be set to the appropriate variables.
(v) In main() function call function calculate() to calculate the total amount to be paid by a customer.
(vi) In main() function call function print() to display all the information as shown below.
So far I have done
#include<iostream>
#include<string>
using namespace std;
class Purchase{
private:
string name;
int qty;
float price;
float total;