Create the assignmentThree.

This commit is contained in:
Charles Descamps 2024-10-03 08:30:16 -07:00
parent 331b001c7c
commit 7bb56203ab
4 changed files with 106 additions and 0 deletions

BIN
assignmentThree/characters Executable file

Binary file not shown.

View file

@ -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 <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <vector>
#include <random>
#include <algorithm>
#include <time.h>
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;
}

BIN
assignmentThree/inventory Executable file

Binary file not shown.

View file

@ -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 <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <vector>
#include <random>
#include <algorithm>
#include <time.h>
using namespace std;
// class definitions
class Inventory
{
private:
// variables
public:
Inventory()
{
// default constructor
}
~Inventory()
{
// default destructor
}
};
// function definitions
// main function
int main()
{
//
return 0;
}