diff --git a/assignmentThree/characters b/assignmentThree/characters new file mode 100755 index 0000000..9e85f42 Binary files /dev/null and b/assignmentThree/characters differ diff --git a/assignmentThree/characters.cpp b/assignmentThree/characters.cpp new file mode 100644 index 0000000..3495e63 --- /dev/null +++ b/assignmentThree/characters.cpp @@ -0,0 +1,46 @@ +/* +Program Name: User Inventory +Process: ??? +Function Input/Parameters: ??? +Function Output/Parameters: ??? +Function Output/Returned: ??? +Device Input/Device: ??? +Device Output/Monitor: ??? +Dependencies: ??? +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +// class definitions +class Character +{ +private: + /* data */ +public: + Character(/* args */) + { + // + } + ~Character() + { + // + } +}; + +// function definitions + +// main function +int main() +{ + // return zero (end program) + return 0; +} diff --git a/assignmentThree/inventory b/assignmentThree/inventory new file mode 100755 index 0000000..bfdefce Binary files /dev/null and b/assignmentThree/inventory differ diff --git a/assignmentThree/inventory.cpp b/assignmentThree/inventory.cpp new file mode 100644 index 0000000..2da93bf --- /dev/null +++ b/assignmentThree/inventory.cpp @@ -0,0 +1,60 @@ +/* +Program Name: Inventory +Process: Write a program that dynamically manages an inventory system for a roleplaying + game. The inventory should be a dynamic array of the following items {“Sword”, + “Health”, “Shield”, “Food”}. Each item in this array should have a quantity + quantity. The quantity should indicate how many of such items exist, for example + the inventory could have 3 swords, 2 healths, 1 shield and 0 food. The array is + dynamic since there is no requirement that all items have to be present in the array. + Starting empty, allow your user to pick the following options: + ● Add an item to the inventory and continue adding till you have at least one + of each item. + ● Display the inventory + ● Use an item (reducing the quantity by 1) + ● Delete an item from the inventory when the quantity is 0 + Hint: Use new and delete operators to allocate and deallocate memory for the + array. Ensure that you handle the memory properly to avoid any memory leaks. +Function Input/Parameters: ??? +Function Output/Parameters: ??? +Function Output/Returned: ??? +Device Input/Device: ??? +Device Output/Monitor: ??? +Dependencies: ??? +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +// class definitions +class Inventory +{ +private: + // variables + +public: + Inventory() + { + // default constructor + } + ~Inventory() + { + // default destructor + } +}; + +// function definitions + +// main function +int main() +{ + // + return 0; +}