Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 05 / Interval / Interval.h
diff options
context:
space:
mode:
Commitb10dc7ab4c7615b16810276a9f9cb2fe2c573d85 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-04-02 13:11:05 +0300
Committer
 GitHub <noreply@github.com>
2021-04-02 13:11:05 +0300
Filesa060e7f1127871d9f6a15c770586c0d288f1d292 /Sem. 05/Interval/Interval.h
Object-oriented_programming_FMI-b10dc7ab4c7615b16810276a9f9cb2fe2c573d85.tar
Object-oriented_programming_FMI-b10dc7ab4c7615b16810276a9f9cb2fe2c573d85.tar.gz
Object-oriented_programming_FMI-b10dc7ab4c7615b16810276a9f9cb2fe2c573d85.zip
Parent5c059d1eeb8dd92b30e6dd39885b332d9fa845b9 (diff)
Add files via upload
1 files changed, 29 insertions, 0 deletions
-rw-r--r--Sem. 05/Interval/Interval.h29
diff --git a/Sem. 05/Interval/Interval.h b/Sem. 05/Interval/Interval.h
new file mode 100644
index 0000000..432b368
--- /dev/null
+++ b/Sem. 05/Interval/Interval.h
@@ -0,0 +1,29 @@
+
+class Interval
+{
+ int a;
+ int b;
+
+ size_t countNumbersInIntervalCondition(bool(*pred)(int)) const;
+
+public:
+
+ Interval();
+ Interval(int a, int b);
+
+ int getA() const;
+ int getB() const;
+
+ void setA(int a);
+ void setB(int b);
+
+ size_t getLength() const;
+ bool isMemberOfInterval(int x) const;
+
+ size_t calcPrimeNumbersInTheInterval() const;
+ size_t calcPalindromicNumbersInTheInterval() const;
+ size_t calcDiffrentDigitNumbersInTheInverval() const;
+ bool areStartAndEndPowersOfTwo() const;
+ Interval intersect(const Interval& other) const;
+ bool isSuperInterval(const Interval& other) const;
+}; \ No newline at end of file