Create class with constructor in C++. (PLAY)


Create a C++ class, which maintain an array and provides sorting and searching functions on it. It should have the following members:

Private members of class Play:
  • ·         Playcode integer
  • ·         Playtitle 25 character
  • ·         Duration float
  • ·         Numbrofscenes integer


Public members of class Play:
  • ·         A constructor function to initialize duration as 45 and Numberofscenes as 5.
  • ·         NewPlay( ) function to accept values for Playcode and Playtitle.
  • ·         MoreInfo( ) function assign the value of duration and Numbreofscenes with the help of corresponding values passed as parameters to this function.
  • ·         ShowPlay( ) function to display all the data members on the screen.




No comments

Post your comments

Powered by Blogger.