Define a Class in C++ with constructor (SERIAL)


Define a class SERIAL in C++ with following specifications:

Private members
  • ·         SerialCode                   integer
  • ·         Title                             20 charcters
  • ·         Duration                      float
  • ·         No_of_episodes          integer


Public members
  • ·         A constructor function to initialize Duration as 30 and No_of_episodes as 10.
  • ·         NewSerial() function to accept values for Serialcode and Title
  • ·         Otherentries() function to accept values of Duration and No_of_episodes with the help of corresponding values passed as parameters to this function.
  • ·         Dispdata() function to display all the data members on the screen.




No comments

Post your comments

Powered by Blogger.