ShoppingCart and Item Classes I've built a class for an e-commerce Item, and the ShoppingCart class for checkout functions.

The thing I'm most concerned about is my use of pointers.  I think I've used them properly in this situation, but I could be wrong.

Item.hpp

#ifndef Item_hpp
#define Item_hpp

#include &lt;iostream&gt;
using namespace std;

class Item {

private:
    string name;
    double price;
    int quantity;

public:
    void setName(string);
    void setPrice(double);
    void setQuantity(int);
    string getName();
    double getPrice();
    int getQuantity();

    // Constructors
    Item();

    Item(string, double, int);

};

#endif


Item.cpp

#include "Item.hpp"
#include &lt;iostream&gt;
using namespace std;

Item::Item() {
    name = "";
    price = 0.0;
    quantity = 0;
}

Item::Item(string itemName, double itemPrice, int itemQuantity) {
    setName(itemName);
    setPrice(itemPrice);
    setQuantity(itemQuantity);
}

void Item::setName(string itemName) {
    name = itemName;
}

void Item::setPrice(double itemPrice) {
    price = itemPrice;
}

void Item::setQuantity(int itemQuantity) {
    quantity = itemQuantity;
}

string Item::getName() {
    return name;
}

double Item::getPrice() {
    return price;
}

int Item::getQuantity() {
    return quantity;
}


ShoppingCart.hpp

#ifndef ShoppingCart_hpp
#define ShoppingCart_hpp

#include "Item.hpp"
#include &lt;iostream&gt;
using namespace std;

class ShoppingCart {

private:
    Item* itemArray[100];
    int arrayEnd;

public:
    void addItem(Item *);
    double totalPrice();

    // Constructors
    ShoppingCart();

};
#endif


ShoppingCart.cpp

#include "ShoppingCart.hpp"
#include "Item.hpp"
#include &lt;iostream&gt;
using namespace std;

ShoppingCart::ShoppingCart() {
    for (int i=0; i&lt;100; i++) {
        itemArray[i] = {NULL};
    }
    arrayEnd = 0;
}

void ShoppingCart::addItem(Item *currentItem) {
    itemArray[arrayEnd] = currentItem;
    arrayEnd++;
}

double ShoppingCart::totalPrice() {
    double totalPrice;

    for (int i=0; i&lt;100; i++) {
        if (itemArray[i] != NULL) {
            totalPrice += itemArray[i]-&gt;getPrice() * itemArray[i]-&gt;getQuantity();
        } else {
            break;
        }
    }

    return totalPrice;
}
using namespace std is considered a bad practice.
Unrestricted getters and setters are as good as making Item's members public. In fact, if there is no class invariant to maintain, do make them public.
arrayEnd is not a particularly good name. Consider calling it items (or items_count) instead. As a side note, use it!

for (int i = 0; i &lt; items; i++)
    total_price += whatever;


This way the shopping cart constructor reduces to

ShoppingCart() {
    items = 0;
}

totalPrice is not initialized.
Having pointers in the shopping card is a dubious decision. You must answer the question who owns items. In other words, who's responsibility is to destroy Item, and what happens to the cart when it is destroyed? I strongly recommend to either have the cart to keep objects, or make cart responsible for their construction and destruction.