title: the code doesn't display and doesn't run either
body: <p>Below is a program that has class definitions for Item, Customer and Sales. The main simply creates object object of each class and test its member functions. Modify the main program such that it provides a menu driven interface where user can create objects of Item, Customer and a complete a sales transaction with the sales object.The program should also have an option for display the records of items,customers and sales.To make your program more useful,include file handling such that when objects are created for Items,Customers and Transaction,the user will be prompted to save the recordon the file or not.</p>
  <p>here's the code it's not displaying anything pleasee help i'm running it by Dev c++</p>
  <pre><code>#include &lt;conio.h&gt;
  #include &lt;iostream&gt;
  #include &lt;string.h&gt;
  using namespace std;
  
  class Item {
    int itemCode;
  
  private:
    double price;
    double discount;
  
  protected:
    int qtyOnStock;
    char *name;
  
  public:
    Item() {
      itemCode = 0;
      strcpy(name, &quot;UNKNOWN&quot;);
      price = 0;
      discount = 0;
      qtyOnStock = 100;
    }
    void setItemCode(int c) { itemCode = c; }
    int getItemCode() { return itemCode; }
    double getPrice() { return price; }
    void setPrice(double p) { price = p; }
    void setDiscount(double d) { discount = d; }
    double getDiscount(double d) { return ((d &lt; 20 ? d : 20) / 100 * price); }
    void setName(char *n) { name = n; }
    char *getName() { return name; }
  
    void setQtyOnStock(int q) { qtyOnStock = q; }
    int getQtyOnStock() { return qtyOnStock; }
  };
  class Customer {
  private:
    int id;
    char *name;
    char *contactNo;
    int type;
  
  public:
    Customer() {
      id = 0;
      strcpy(contactNo, &quot;No Num&quot;);
      strcpy(name, &quot;No Name&quot;);
      type = 0;
    }
    void setId(int newId) { id = newId; }
    int getId() { return id; }
    void setName(char *n) { strcpy(name, n); }
    char *getName() { return name; }
    void setContactNo(char *c) { strcpy(contactNo, c); }
    char *getContactNo() { return name; }
  };
  class Sales {
  private:
    Item item;
    Customer cust;
    char *date;
    int qtySold;
  
  public:
    Sales() { date = &quot;mm-dd-yyyy&quot;; }
    void setItem(Item newItem) { item = newItem; }
    Item getItem() { return item; }
    void setCustomer(Customer newCust) { cust = newCust; }
    Customer getCustomer() { return cust; }
    void setDate(char *newDate) { strcpy(date, newDate); }
    char *getDate() { return date; }
    void setQtySold(int newQty) { qtySold = newQty; }
    int getQtySold() { return qtySold; }
  };
  int main() {
    Item item1;
    Customer cust1;
    Sales sales1;
    item1.setItemCode(143);
    item1.setName(&quot;Ballpen&quot;);
    item1.setPrice(12.5);
    item1.setQtyOnStock(250);
    cust1.setId(123);
    cust1.setName(&quot;Juan dela Cruz&quot;);
    sales1.setItem(item1);
    sales1.setCustomer(cust1);
    sales1.setDate(&quot;10-27-2018&quot;);
    sales1.setQtySold(98);
    item1.setQtyOnStock(item1.getQtyOnStock() - sales1.getQtySold());
    system(&quot;cls&quot;);
    cout &lt;&lt; sales1.getItem().getName() &lt;&lt; endl &lt;&lt; item1.getQtyOnStock();
    getch();
    return 0;
  }
  </code></pre>