Question
(C++ Program) I am having a hard time trying to complete this program i need help. 1. You are to implement the Consumables and the
(C++ Program)
I am having a hard time trying to complete this program i need help.
1. You are to implement the Consumables and the Accessories class, create files for each containing any number of consumables and accessories. (make sure they contain all the information needed).
2. All files have _ (underscores) for the spaces. I show how you remove the spaces for the weapons, you should remove the spaces for all of the words. **challenge is placing them back when you write to the file** 3. In the main, have the ability to show all the (weapon / armor / accessories / consumables) depending what the user wants to see. display those items only. 4. When the program exits, save all the items back in their respective file. To know what each item is, you will need to create a variable in Item called whatIsIt which holds a string holding the item type, so if your object is a weapon, it will say weapon. This variable should go between the name and the description. You will need to UPDATE all files, all the classes, the way you infile and outfile in order for the program to work well with this new variable. ** also, make sure you start your files with the number of items in the file, so when you are saving everything back to the file, you need to know how many of those items there are... (maybe sort based on item type?)
( please show comments and output)
#includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started