Setup codebase

This commit is contained in:
Joel Thomas
2026-05-19 09:56:36 +05:30
parent f39f9d0e79
commit a7ad188801
59 changed files with 3840 additions and 0 deletions
@@ -0,0 +1,54 @@
#include "InventoryItem.h"
int InventoryItem::m_uid = 0;
InventoryItem::InventoryItem()
: m_id("IIM" + std::to_string(++m_uid)),
m_quantity(0),
m_price(0.0) {}
InventoryItem::InventoryItem(const std::string& partName, int quantity, double price)
: m_id("IIM" + std::to_string(++m_uid)),
m_partName(partName),
m_quantity(quantity),
m_price(price) {}
const std::string& InventoryItem::getId() const
{
return m_id;
}
const std::string& InventoryItem::getPartName() const
{
return m_partName;
}
int InventoryItem::getQuantity() const
{
return m_quantity;
}
double InventoryItem::getPrice() const
{
return m_price;
}
void InventoryItem::setId(const std::string& id)
{
m_id = id;
}
void InventoryItem::setPartName(const std::string& partName)
{
m_partName = partName;
}
void InventoryItem::setQuantity(int quantity)
{
m_quantity = quantity;
}
void InventoryItem::setPrice(double price)
{
m_price = price;
}