Skip to content
Snippets Groups Projects
Commit 7244086d authored by adriansmakaliu's avatar adriansmakaliu
Browse files

Backup

parent f61779f3
Branches
No related tags found
No related merge requests found
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -3,8 +3,11 @@
#include "Time.h"
Time::Time(int h, int m, int s) : hour{h}, minute{m}, second{s}{
Time::Time(int h, int m, int s) : hour{h}, minute{m}, second{s} { }
Time::Time(int text) : hour{0}, minute{0}, second{0} { }
/*
if(check_invalid_time(h, m, s)){
......@@ -12,15 +15,12 @@ throw invalid_argument{"ogiltigt_value"};
}
}
bool Time::check_default_time(int const h, int const m, int const s){ // konstruktor som gör så att andra tal som inte är default value godkänns
if (h != 0 or m != 0 or s != 0) {
int h{};
int m{};
int s{};
if (h != 0 or m != 0 or s != 0) {
}
}
*/
int Time::get_second() { //Gets current hour.
return second;
......@@ -34,7 +34,7 @@ int Time::get_hour() { //Gets current hour.
return hour;
}
/*
bool Time::check_invalid_time(int const h, int const m, int const s){
if(h > 23 || h < 0 || m > 59 || m < 0 || s > 59 || s < 0)
{
......
......@@ -18,7 +18,10 @@ using namespace std;
class Time
{
public:
Time(int h, int m, int s);
Time(int h , int m, int s);
Time() : hour{0}, minute{0}, second{0} {};
Time(int text);
int get_hour();
int get_minute();
int get_second();
......
#include "catch.hpp"
#include "Time.h"
//#include "Time.cc"
using namespace std;
......
File mode changed from 100755 to 100644
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment