Welcome to Westonci.ca, the place where your questions are answered by a community of knowledgeable contributors. Discover reliable solutions to your questions from a wide network of experts on our comprehensive Q&A platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

C++ only!Write code to assign name and density properties to currMat, and store currMat in requestedMaterials. Input first receives a name value, then a density value.Input example: Water 993 Tar 1153 quit -1#include #include #include using namespace std;class Material {public:void SetNameAndDensity(string materialName, int materialDensity) {name = materialName;density = materialDensity;}void PrintMaterial() const {cout << name << " - " << density << endl;}string GetName() const { return name; }int GetDensity() const { return density; }private:string name;int density;};int main() {vector requestedMaterials;Material currMat;string currName;int currDensity;unsigned int i;cin >> currName;cin >> currDensity;while ((currName != "quit") && (currDensity > 0)) {/* Your code goes here */cin >> currName;cin >> currDensity;}for (i = 0; i < requestedMaterials.size(); ++i) {currMat = requestedMaterials.at(i);currMat.PrintMaterial();}return 0;}