Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
2 files changed, 30 insertions, 0 deletions
-rw-r--r--src/Television.cpp16
-rw-r--r--src/Television.h14
diff --git a/src/Television.cpp b/src/Television.cpp
new file mode 100644
index 0000000..cf60d73
--- /dev/null
+++ b/src/Television.cpp
@@ -0,0 +1,16 @@
+#include "Television.h"
+#include "cli.hpp"
+
+Television::Television(mm width, mm height) : Screen(width, height) { }
+
+Television::~Television() { }
+
+Television* Television::fromCommandLine() {
+ mm iwidth = 0;
+ cli::readUserInput(iwidth, "Enter width (in mm): ", "Invalid width, try again!");
+
+ mm iheight = 0;
+ cli::readUserInput(iheight, "Enter height (in mm): ", "Invalid height, try again!");
+
+ return new Television(iwidth, iheight);
+}
diff --git a/src/Television.h b/src/Television.h
new file mode 100644
index 0000000..2c766a0
--- /dev/null
+++ b/src/Television.h
@@ -0,0 +1,14 @@
+#ifndef SG_TELEVISION
+#define SG_TELEVISION
+
+#include "Screen.h"
+
+class Television : public Screen {
+public:
+ Television(mm width, mm height);
+ virtual ~Television();
+
+ static Television* fromCommandLine();
+};
+
+#endif /* SG_TELEVISION */