Untitled

mail@pastecode.io avatar
unknown
plain_text
17 days ago
694 B
3
Indexable
Never
#ifndef WEBMOVIES_H
#define WEBMOVIES_H

#include "movies.h"

class WebMovies : public Movie {
private:
    std::string url;
    int validDays;

public:
    WebMovies(std::string title, std::string genre, int year, float rating, std::string url, int validDays);
    void DisplayDetails() override;
};

#endif




#include "webmovies.h"

WebMovies::WebMovies(std::string title, std::string genre, int year, float rating, std::string url, int validDays) : Movie(title, genre, year, rating), url(url), validDays(validDays) {}

void WebMovies::DisplayDetails() {
    Movie::DisplayDetails();
    std::cout << "URL: " << url << std::endl;
    std::cout << "Valid Days: " << validDays << std::endl;
}
Leave a Comment