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.