HERE IS THE FINAL RESULT.
I completed this code with the advice given thank you for the advice.
For those who need extra help. :)
#include <iostream>
#include <string>
using namespace std;
int i;
int x;
int g;
int j = 5;
class assaultrifle
{
private:
int baseassaultPoints = 10, baseassaultDamage = 35, baseassaultAccuracy = 56, baseassaultRange = 72, baseassaultROF = 78;
int assaultPoints = 10, assaultDamage = 35, assaultAccuracy = 56, assaultRange = 72, assaultROF = 78;
public:
int v = 5, n = 2, o = 5, k = 5, j = 5;
assaultrifle()
{
do {
cout << "These are your base stats for your gun.." << endl;
cout << "Your weapon has a base damage of:" << baseassaultDamage << endl;
cout << "Your weapon has an accuracy of: " << baseassaultAccuracy << endl;
cout << "Your weapon has a range of:" << baseassaultRange << endl;
cout << "Your weapon has a rate of fire of:" << baseassaultROF << endl;
cout << "**************************************" << endl;
cout << "You have " << assaultPoints << "assaultpoints.." << endl;
cout << "1)Would you like to choose something that upgrades your damage output?" << endl;
cout << "2)Would you like something for accuracy?" << endl;
cout << "3)Would you like something for range?" << endl;
cout << "4)Would you like some thing for your rate of fire?" << endl;
cout << "5)Would you like to exit the program?" << endl;
cin >> i;
system("Pause");
system("cls");
if (assaultPoints == 0) {
cout << "You have" << assaultPoints << "points at your disposal" << endl;
cout << "Your upgraded M16 now has better stats." << endl;
cout << "Your final assault rifle stats are.." << endl;
cout << "Base Damage: " << assaultDamage << endl;
cout << "Accuracy:" << assaultAccuracy << endl;
cout << "Range:" << assaultRange << "meters" << endl;
cout << "Rate of Fire:" << assaultRange << "s" << endl;
cout << "**************************************" << endl;
}
switch (i) {
case 1:
cout << "Here are some armor piercing rounds for your damage output.." << endl;
assaultDamage += j;
assaultPoints -= v;
break;
case 2:
cout << "Here is a foregrip for your assault rifle." << endl;
assaultAccuracy += k;
assaultPoints -= v;
break;
case 3:
cout << "Here is a heavy barrel for your assault rifle." << endl;
assaultRange += o;
assaultPoints -= v;
break;
case 4:
cout << "Here is taped magazine for your assault rifle." << endl;
assaultROF += n;
assaultPoints -= v;
break;
case 5:
cout << "Exiting Program" << endl;
g = 5;
}
} while (g != 5);
}
};
class shotgun {
private:
int baseShotgunDamage = 50, baseShotgunAccuracy = 15, baseShotgunRange = 10, baseShotgunROF = 6, baseShotgunPoints = 10;
int shotgunDam = 50, shotgunAccuracy = 15, shotgunRange = 10, shotgunROF = 6, j = 10, shotgunPoints = 10;
int pointstotal = shotgunPoints - v;
int baseDamage = shotgunDam + j;
int accuracy = shotgunAccuracy + k;
int range = shotgunRange + o;
int rateOffire = shotgunROF + k;
public:
int v = 5, n = 2, o = 5, k = 5;
shotgun()
{
do {
cout << "These are your base stats for your gun.." << endl;
cout << "Your weapon has a base damage of:" << baseShotgunDamage << endl;
cout << "Your weapon has an accuracy of: " << baseShotgunAccuracy << endl;
cout << "Your weapon has a range of:" << baseShotgunRange << endl;
cout << "Your weapon has a rate of fire of:" << baseShotgunROF << endl;
cout << "**************************************" << endl;
cout << "You have " << shotgunPoints << "sawed off shotgun points.." << endl;
cout << "1)Would you like to choose something that upgrades your damage output?" << endl;
cout << "2)Would you like something for accuracy?" << endl;
cout << "3)Would you like something for range?" << endl;
cout << "4)Would you like some thing for your rate of fire?" << endl;
cout << "5)Would you like to exit the program?" << endl;
cout << "**************************************" << endl;
cin >> i;
system("Pause");
system("cls");
if (shotgunPoints == 0) {
cout << "You have" << shotgunPoints << "points at your disposal" << endl;
cout << "Your final double barreled shotgun stats are.." << endl;
cout << "Base Damage: " << shotgunDam << endl;
cout << "Accuracy:" << shotgunAccuracy << endl;
cout << "Range:" << shotgunRange << "meters" << endl;
cout << "Rate of Fire:" << shotgunROF << "s" << endl;
cout << "**************************************" << endl;
}
switch (i) {
case 1:
cout << "Here are some slugs for your damage output.." << endl;
shotgunDam += j;
shotgunPoints -= v;
break;
case 2:
cout << "Here is a longer stock for your shotgun." << endl;
shotgunAccuracy += k;
shotgunPoints -= v;
break;
case 3:
cout << "Here is a longer barrel for your shotgun." << endl;
shotgunRange += o;
shotgunPoints -= v;
break;
case 4:
cout << "Here is better break action barrel for your shotgun." << endl;
shotgunROF += n;
shotgunPoints -= v;
break;
case 5:
cout << "Exiting Program" << endl;
g = 5;
}
} while (g != 5);
}
};
class handgun
{
private:
int basehandgunDam = 15, basehandgunAccuracy = 55, basehandgunRange = 25, basehandgunROF = 19, j = 10, basehandgunPoints = 10;
int handgunDam = 15, handgunAccuracy = 55, handgunRange = 25, handgunROF = 19, handgunPoints = 10;
int pointstotal = handgunPoints - v;
int baseDamage = handgunDam + j;
int accuracy = handgunAccuracy + k;
int range = handgunRange + o;
int rateOffire = handgunROF + k;
public:
int v = 5, n = 2, o = 5, k = 5;
handgun()
{
do {
cout << "These are your base stats for your gun.." << endl;
cout << "Your weapon has a base damage of:" << basehandgunDam << endl;
cout << "Your weapon has an accuracy of: " << basehandgunAccuracy << endl;
cout << "Your weapon has a range of:" << basehandgunRange << endl;
cout << "Your weapon has a rate of fire of:" << basehandgunROF << "s" << endl;
cout << "**************************************" << endl;
cout << "You have " << handgunPoints << "glock points.." << endl;
cout << "1)Would you like to choose something that upgrades your damage output?" << endl;
cout << "2)Would you like something for accuracy?" << endl;
cout << "3)Would you like something for range?" << endl;
cout << "4)Would you like some thing for your rate of fire?" << endl;
cout << "5)Would you like to exit the program?" << endl;
cout << "**************************************" << endl;
cin >> i;
system("Pause");
system("cls");
if (handgunPoints == 0) {
cout << "You have" << handgunPoints << "points at your disposal" << endl;
cout << "Your final Glock 17 stats are.." << endl;
cout << "Base Damage: " << handgunDam << endl;
cout << "Accuracy:" << handgunAccuracy << endl;
cout << "Range:" << handgunRange << "meter" << endl;
cout << "Rate of Fire:" << handgunROF << "s" << endl;
cout << "**************************************" << endl;
}
switch (i) {
case 1:
cout << "Here are some hollow points for your damage output.." << endl;
handgunDam += j;
handgunPoints -= v;
break;
case 2:
cout << "Here is a foldable stock for your pistol." << endl;
handgunAccuracy += k;
handgunPoints -= v;
break;
case 3:
cout << "Here is a longer muzzle for your glock 17." << endl;
handgunRange += o;
handgunRange -= v;
break;
case 4:
cout << "Here is a full auto function for you glock 17." << endl;
handgunROF += n;
handgunROF -= v;
break;
case 5:
cout << "Exiting Program" << endl;
g = 5;
}
} while (g != 5);
}
};
class combatshotgun
{
private:
int basecombatDam = 40, basecombatAccuracy = 55, basecombatRange = 25, basecombatRecoil = 20, j = 10, basecombatPoints = 10;
int combatDam = 40, combatAccuracy = 55, combatRange = 25, combatRecoil = 20, combatPoints = 10;
int pointstotal = combatPoints - v;
int baseDamage = combatDam + j;
int accuracy = combatAccuracy + k;
int range = combatRange + o;
int recoil = combatRecoil + k;
public:
int v = 5, n = 2, o = 5, k = 5;
combatshotgun()
{
do {
cout << "These are your base stats for your gun.." << endl;
cout << "Your weapon has a base damage of:" << basecombatDam << endl;
cout << "Your weapon has an accuracy of: " << basecombatAccuracy << endl;
cout << "Your weapon has a range of:" << basecombatRange << endl;
cout << "Your weapon has a rate of fire of:" << basecombatRecoil << endl;
cout << "**************************************" << endl;
cout << "You have " << combatPoints << "combat shotgun points.." << endl;
cout << "1)Would you like to choose something that upgrades your damage output?" << endl;
cout << "2)Would you like something for accuracy?" << endl;
cout << "3)Would you like something for range?" << endl;
cout << "4)Would you like something for the recoil?" << endl;
cout << "5)Would you like to exit the program?" << endl;
cout << "**************************************" << endl;
cin >> i;
system("Pause");
system("cls");
if (combatPoints == 0) {
cout << "You have" << combatPoints << "points at your disposal" << endl;
cout << "Your final shotgun stats are.." << endl;
cout << "Base Damage: " << combatDam << endl;
cout << "Accuracy:" << combatAccuracy << endl;
cout << "Range:" << combatRange << "meters" << endl;
cout << "Recoil:" << combatRecoil << endl;
cout << "**************************************" << endl;
}
switch (i) {
case 1:
cout << "Here are some dragons breath for your Remington 12 gauge.." << endl;
combatDam += j;
combatPoints -= v;
break;
case 2:
cout << "Here is a longer stock for your Remingonton 12 guage." << endl;
combatAccuracy += k;
combatPoints-= v;
break;
case 3:
cout << "Here is a longer barrel for your Remington." << endl;
combatRange += o;
combatPoints -= v;
break;
case 4:
cout << "Here is a foregrip for your remington 12 gauge." << endl;
combatRecoil -= n;
combatPoints -= v;
break;
case 5:
cout << "Exiting Program" << endl;
g = 5;
}
} while (g != 5);
}
};
int main()
{
cout << "Welcome to the weapon customization system!" << endl;
cout << "Choose your Weapon to customize you have ten points" << endl;
cout << "*************************************************" << endl;
cout << "1)Choose the double barreled shotgun?" << endl;
cout << "2)Choose the M16?" << endl;
cout << "3)Choose the Glock 17?" << endl;
cout << "4)Choose the Remington 12 guage?" << endl;
cout << "**************************************" << endl;
cin >> x;
switch (x)
{
case 1:
shotgun();
break;
case 2:
assaultrifle();
break;
case 3:
handgun();
break;
case 4:
combatshotgun();
break;
}
cout << "\n\n";
system("Pause");
}