-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVideos.cpp
17 lines (15 loc) · 900 Bytes
/
Videos.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "Videos.h"
// Constructor implementation for Video, inheriting from the base class Tipos
Video::Video(string Titulo, string youtuber, int duracion, string genero)
: Tipos("", Titulo, duracion, genero) { // Use the base class constructor to initialize common properties
this->Titulo = Titulo;
this->youtuber = youtuber;
}
// Method to display information about the video, overriding the virtual method in Tipos
void Video::informacion() {
cout << "Video: " << Titulo << endl; // Print the title of the video
cout << "Canal: " << youtuber << endl; // Print the creator or channel name
cout << "Duración: " << getDuracion() << " minutos" << endl; // Print the video duration
cout << "Género: " << getGenero() << endl; // Print the video genre
cout << "Calificación promedio: " << getPromRate() << endl; // Print the average rating
}