Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
3.8k views
in Computer by (64.2k points)

Define a class Serial in C++ with the following specifications: private members of class Serial

Serialcode integer 
Title 25 character
Duration  float
Noofepisodes integer

public member function of class Play

  • A constructor function to initialise Duration as 30 and Noofepisodes as 10.
  • Newserial() unction to accept values for Serialcode and Title.
  • Otherentries() function to assign the values of Duration and Noofepisodes with the help of corresponding values passed as parameters to this function. 
  • Dispdata() function to display all the data member on the screen.

1 Answer

0 votes
by (69.5k points)
selected by
 
Best answer

class Serial

{

int Serialcode;

char Title[20];

float Duration;

int Noofepisodes;

public: Serial()

Duration=30.0;

Noofepisodes =10;

}

 void Newserial()

{ cout<<"enter Serialcode: ";

cin>> Serialcode;

cout<<"enter Title: ";

gets(Title);

}

void Otherentries(float d,int n)

{

Duration=d; Noofepisodes =n;

}

void Dispdata()

{

cout<<" Serialcode: "<< Serialcode <<end1;

cout<<" Title: "<< Title <<end1;

cout<<"Duration: "<<Duration<<end1;

cout<<" No of episodes: "<< Noofepisodes <<end1;

}

};

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...