You are provided with code to create a products class see the file PTlabWeek10.cpp . Using this as a base class create a derived class called weapon. This class should have an additional data member named purpose. Create polymorphic functions for reading a weapon record from a file (weapons.dat ) and for displaying weapon data on screen. In these two polymorphic functions use the base class version to read or display the inherited data members and add code to read or display the additional data member.

Create a non class function to read all the weapons into an array passed as a parameter. Create another non class function to display all the weapons passed as a parameter. Finally write a main driver function to call these two functions to demonstrate reading all the weapons and display them.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.