Website Summary Files Commits Branches @commit @diff @stats
path: root / Week05 / Exercise03 / TaxReport.h
diff options
context:
space:
mode:
1 files changed, 29 insertions, 0 deletions
-rw-r--r--Week05/Exercise03/TaxReport.h29
diff --git a/Week05/Exercise03/TaxReport.h b/Week05/Exercise03/TaxReport.h
new file mode 100644
index 0000000..1dee2a4
--- /dev/null
+++ b/Week05/Exercise03/TaxReport.h
@@ -0,0 +1,29 @@
+#ifndef _TAXREPORT
+#define _TAXREPORT
+
+class TaxReport {
+ unsigned long long PN; // Personal Number
+ unsigned short year;
+ double income;
+ double taxRate;
+
+public:
+ TaxReport(unsigned long long PN, unsigned short year, double income, double taxRate);
+
+ /* Помощни член-функции */
+
+ // За да създадем масив се нуждаем от празен конструктор,
+ // обаче отгоре дефинирахме някакъв конструктор, което
+ // означава че празния по подразбиране не се създава.
+ // Можем сами да си го дефинираме, но с този синтаксис
+ // можем да задължим компилатора да използва този,
+ // който би генерирал по принцип.
+ TaxReport() = default;
+
+ unsigned long long GetPN() const;
+ unsigned short GetYear() const;
+ double GetIncome() const;
+ double GetTaxRate() const;
+};
+
+#endif /* _TAXREPORT */