#include "Television.h" #include "cli.hpp" #include Television::Television(mm width, mm height) : Screen(width, height) { } Television::~Television() { } Television* Television::fromCommandLine() { mm iwidth = 0; do { cli::readUserInput(iwidth, "Enter width (in mm): ", "Invalid width, try again!"); if (iwidth == 0) { std::cerr << "Width cannot be zero! Try again!" << std::endl; continue; } break; } while (true); mm iheight = 0; do { cli::readUserInput(iheight, "Enter height (in mm): ", "Invalid height, try again!"); if (iheight == 0) { std::cerr << "Height cannot be zero! Try again!" << std::endl; continue; } break; } while (true); return new Television(iwidth, iheight); } std::string Television::extraOutput() const { return std::string(); }