There Are Two Parts To This Assignment First You Should Refactor You There are two parts to this assignment. First, you should refactor your class to only have private data members and a public interface using getters/setters as necessary. If your class uses helper functions, then make sure they are appropriately declared as private so a user cannot inadvertently call one of them. Be sure to add const where appropriate for all functions and parameters to prevent modification of the corresponding values. Second, you must acquire three other magic items from your classmates to use (see the next section). Include their .h and .cpp files into your project. Then, in your main.cpp, create objects of these new classes. You can then present the user with a menu as to which magic item they want to use or use all four in sequence.
Paper For Above instruction Refactoring Class and Using Magic Items in C++ Introduction The goal of this assignment is to enhance object-oriented programming skills by practicing class encapsulation through refactoring, and by integrating multiple classes to create an interactive program. The task involves refactoring an existing class to enforce proper encapsulation, acquiring additional class objects created by classmates, and implementing a menu-driven interface allowing user interaction with these classes to simulate a magic item game. Refactoring the Class for Proper Encapsulation The primary step is to refactor the existing class to contain only private data members. This encapsulation ensures data integrity and hides implementation details from the user. All data members should be placed in the private section of the class. Public member functions should include getters and setters to access and modify these private members safely. These methods should be declared with the const qualifier where applicable—specifically, getter functions that do not modify state. Helper functions used internally within the class should be declared as private to prevent external classes or users from invoking them directly. This encapsulation promotes modularity and maintains a clear interface. Constructors and Member Functions