Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C++ please ... thank you Define a structure named StockItem with two string fiel

ID: 3803365 • Letter: C

Question

C++ please ... thank you

Define a structure named  StockItem with two string fields, supplier and productName and one int field, catalogNumber. Then define a structure named  Customer with string fields name , streetAddress, city, postalCode, phone. Assume that structures named  Date andMoney have already been defined (representing a date and a monetary amount respectively.

Finally, define a structure named  Purchase that has these fields: buyer of type  Customer, itemSold of type  StockItem, dateOfSale of type  Date, paid of type  Money, returnable of type  bool.

Explanation / Answer

#include <iostream>

   using namespace std;

//Declaring stock Item structure
   struct StockItem {
string supplier;
   string productName ;
};
//Declaring customer structure  
   struct Customer{
       string name;
       string streetAddress;
       string city;
       string postalCode;
       string phone;
   };

//Declaring Date structure
   struct Date{
       string date;
   };

//Declaring money structure
   struct Money
   {
   double money;  
   };

//Declaring Purchase structure
   struct Purchase{
       Customer buyer;
       StockItem itemSold;
       Date dataOfSale;
       Money paid;
       bool returnable ;
   };
   int main ()
   {
  
  
   return 0;
   }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote