C# Polymorphism Practice Question

Qu 1. Write a program of function overloading that has a function Convert() that accepts a value in parameter and convert them into string and print on screen.
Hint: Convert(int num);
Convert(Double num);
Convert(Fload num);
Qu 2. Write a program using Virtual and Override keyword that does the following tasks.
  1. A virtual function Engine() that has basic properties of engine like Power of engine, RPM, no of Cylinder etc.
  2. This function should be overridden in child class according to function.

More Articles

 

Share your thought



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.