In most object oriented programming situations we want to dynamically create varied number of instances(objects) of a specific class. Therefore its impossible to rely on predefined variable. The best solution is to use an array to hold the objects dynamically Read the entire post…