Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the followings C++ Codes: Do this: code is above explained for the video class Explanation This code defines a C++ class called Video. The
Using the followings C++ Codes:
code is above explained for the video class Explanation This code defines a C++ class called "Video". The class has two constructors: one with no parameters and one with all parameters (videotype, videoname, genre, qualification, anioLanzamiento, and duration). The class also has two member functions: "gradeVideo" which sets the grade of the video and "showData" which displays the data of the video. The class has three private data members: videotype, videoname, and genre, each is a std:istring type. and three more private data members: qualification, anioLanzamiento, and duration, each is an int type. code is above explained video.cpp Explanation This code is the implementation file for the "Video" class defined earlier. It includes the header file "Video.h" and the standard input/output library "iostream". The first constructor, "Video::Video()" initializes the private data members "videotype", "videoname", "genre", "qualification", "anioLanzamiento", and "duration" to empty string, 0, respectively, using the member initialization list. The second constructor, "Video::Video(std::string videotype, std::string videoname, std::string genre, int qualification, int anioLanzamiento, int duration)" initializes the private data members "videotype", "videoname", "genre", "qualification", "anioLanzamiento", and "duration" to the values passed as arguments, using the member initialization list. The member function "void Video::gradeVideo(int grade)" sets the value of the private data member "qualification" to the value passed as an argument "grade". The member function "void Video::showData()" displays the values of the private data members "videotype", "videoname", "genre", "qualification", "anioLanzamiento", and "duration" to the standard output, using the "std::cout" object and the stream insertion operator ( Do this:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started