C++ Object Oriented Programming (Introduction of Class) Programming Past Year Question



Asalamualaikom pembaca yang dihormati sekalian.Hari ni saya nak kongsi sedikit pasal Object Oriented Program tapi hari ni saya nak kongsi pasal Introduction of Class.Contoh soalan yang boleh jumpa.

1.Create a programme to calculate the volume of cone.With the class Cone.Must include height,radius and the function of readData,calcArea,calcVol,dispData.

data macam ketinggian or tinggi kena letak kat private sebab dia maklumat
tapi method,formula or fungsi yang akan menjalankan kerja tu kena letakkan kat public


So kita try soalan exam pulak How to make a program to calculate a quadratic equation?


The output will be

Selamat mencuba dan selamat beramal :D

Post a Comment

0 Comments