From 589852f5d42c006ddc9a5105a5eaa58d9f08061a Mon Sep 17 00:00:00 2001 From: David Nilsson Date: Thu, 26 Jan 2012 12:52:37 +0100 Subject: [PATCH 01/14] Add test file. --- file_test | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 file_test diff --git a/file_test b/file_test new file mode 100644 index 0000000..e69de29 From 94bbd106278a22676f857cb2f53de3b943a1e613 Mon Sep 17 00:00:00 2001 From: kazie Date: Tue, 31 Jan 2012 22:41:54 +0100 Subject: [PATCH 02/14] Trying to add file --- truck.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 truck.h diff --git a/truck.h b/truck.h new file mode 100644 index 0000000..ab6b4e3 --- /dev/null +++ b/truck.h @@ -0,0 +1,13 @@ +class Truck : public Vehicle, public Autonomous { + + public: + Truck(std::string a, int b){ + Truck::set_values(a,b); + }; + + void set_values(std::string a,int b){ + brand = a; + year = b; + }; + +} From 420ec971bd3b2cde1473fb064c05dd6383bf8ee4 Mon Sep 17 00:00:00 2001 From: kazie Date: Tue, 31 Jan 2012 22:42:29 +0100 Subject: [PATCH 03/14] Trying to add file --- truck.cpp | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 truck.cpp diff --git a/truck.cpp b/truck.cpp new file mode 100644 index 0000000..261abb1 --- /dev/null +++ b/truck.cpp @@ -0,0 +1,4 @@ +#include + + + From 8f9010c999a3345ff30bdaaba5463c4e9b070e56 Mon Sep 17 00:00:00 2001 From: David Nilsson Date: Wed, 1 Feb 2012 10:34:34 +0100 Subject: [PATCH 04/14] Fix add mistake. --- truck.cpp | 4 ---- truck.h | 13 ------------- 2 files changed, 17 deletions(-) delete mode 100644 truck.cpp delete mode 100644 truck.h diff --git a/truck.cpp b/truck.cpp deleted file mode 100644 index 261abb1..0000000 --- a/truck.cpp +++ /dev/null @@ -1,4 +0,0 @@ -#include - - - diff --git a/truck.h b/truck.h deleted file mode 100644 index ab6b4e3..0000000 --- a/truck.h +++ /dev/null @@ -1,13 +0,0 @@ -class Truck : public Vehicle, public Autonomous { - - public: - Truck(std::string a, int b){ - Truck::set_values(a,b); - }; - - void set_values(std::string a,int b){ - brand = a; - year = b; - }; - -} From 75a802a8d642ed4f1f581760ea56c85eeeb8461a Mon Sep 17 00:00:00 2001 From: Fredrik Date: Wed, 1 Feb 2012 20:01:01 +0100 Subject: [PATCH 05/14] Kom det ngot? --- Autonomous.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Autonomous.h diff --git a/Autonomous.h b/Autonomous.h new file mode 100644 index 0000000..04e1f5a --- /dev/null +++ b/Autonomous.h @@ -0,0 +1,7 @@ +class Autonomous +{ + public: + virtual int range() = 0; + protected: + virtual int radius() = 0; +}; From 21bdf1eb82a72557992f0b8df84ae3b0751aad96 Mon Sep 17 00:00:00 2001 From: Fredrik Date: Wed, 1 Feb 2012 22:24:46 +0100 Subject: [PATCH 06/14] radius e nu en variabel --- Autonomous.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Autonomous.h b/Autonomous.h index 04e1f5a..e1fdf22 100644 --- a/Autonomous.h +++ b/Autonomous.h @@ -3,5 +3,5 @@ class Autonomous public: virtual int range() = 0; protected: - virtual int radius() = 0; + int radius; }; From efbf41579723b36b0d4781e473167af090ad3f19 Mon Sep 17 00:00:00 2001 From: Fredrik Frantzen Date: Thu, 2 Feb 2012 19:11:18 +0100 Subject: [PATCH 07/14] Implementerade abstrakta klassen Vehicle --- vehicle.cpp | 6 ++++++ vehicle.h | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 vehicle.cpp create mode 100644 vehicle.h diff --git a/vehicle.cpp b/vehicle.cpp new file mode 100644 index 0000000..569b2c2 --- /dev/null +++ b/vehicle.cpp @@ -0,0 +1,6 @@ +#include "vehicle.h" + +Vehicle::Vehicle() +{ + cost = 0; //free car :) +} diff --git a/vehicle.h b/vehicle.h new file mode 100644 index 0000000..6236ec4 --- /dev/null +++ b/vehicle.h @@ -0,0 +1,13 @@ +#ifndef VEHICLE_H_ +#define VEHICLE_H_ + +class Vehicle +{ + protected: + float cost; + public: + Vehicle(); + virtual float getCost() = 0; +}; + +#endif From 86540fb9e90b9bc667f1fa9a334b9a7b519eeba9 Mon Sep 17 00:00:00 2001 From: Fredrik Frantzen Date: Thu, 2 Feb 2012 21:58:55 +0100 Subject: [PATCH 08/14] =?UTF-8?q?Ehm=20tog=20bort=20filer=20fr=C3=A5n=20is?= =?UTF-8?q?sue=20004=20som=20hamnat=20d=C3=A4r=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autonomous.h | 7 ------- file_test | 0 2 files changed, 7 deletions(-) delete mode 100644 Autonomous.h delete mode 100644 file_test diff --git a/Autonomous.h b/Autonomous.h deleted file mode 100644 index e1fdf22..0000000 --- a/Autonomous.h +++ /dev/null @@ -1,7 +0,0 @@ -class Autonomous -{ - public: - virtual int range() = 0; - protected: - int radius; -}; diff --git a/file_test b/file_test deleted file mode 100644 index e69de29..0000000 From 8995408d136663b3de3486597fffab5694ba6ef7 Mon Sep 17 00:00:00 2001 From: Fredrik Frantzen Date: Thu, 2 Feb 2012 22:01:24 +0100 Subject: [PATCH 09/14] =?UTF-8?q?Tog=20=C3=A4ven=20bort=20READMEn=20f?= =?UTF-8?q?=C3=B6r=20den=20ska=20nog=20inte=20heller=20vara=20i=20min=20br?= =?UTF-8?q?anch=3F=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README | 1 - 1 file changed, 1 deletion(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index 2fc3a24..0000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -Kolla uppgiften i wikin. From fd31b5b5ba8ac490052493efdd145a56c965f962 Mon Sep 17 00:00:00 2001 From: Fredrik Frantzen Date: Thu, 2 Feb 2012 23:13:53 +0100 Subject: [PATCH 10/14] Nu har jag lagt till filerna igen --- Autonomous.h | 7 +++++++ README | 1 + 2 files changed, 8 insertions(+) create mode 100644 Autonomous.h create mode 100644 README diff --git a/Autonomous.h b/Autonomous.h new file mode 100644 index 0000000..708f5bd --- /dev/null +++ b/Autonomous.h @@ -0,0 +1,7 @@ +class Autonomous +{ + public: + virtual int range() = 0; + protected: + int radius; +}; diff --git a/README b/README new file mode 100644 index 0000000..2fc3a24 --- /dev/null +++ b/README @@ -0,0 +1 @@ +Kolla uppgiften i wikin. From 80492173fd3c8baaac1022d5d539adedfa9ad24f Mon Sep 17 00:00:00 2001 From: David Nilsson Date: Fri, 3 Feb 2012 08:18:10 +0100 Subject: [PATCH 11/14] =?UTF-8?q?Uppdatera=20filnamn;=20anv=C3=A4nd=20allt?= =?UTF-8?q?id=20inledande=20versal.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vehicle.cpp => Vehicle.cpp | 0 vehicle.h => Vehicle.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename vehicle.cpp => Vehicle.cpp (100%) rename vehicle.h => Vehicle.h (100%) diff --git a/vehicle.cpp b/Vehicle.cpp similarity index 100% rename from vehicle.cpp rename to Vehicle.cpp diff --git a/vehicle.h b/Vehicle.h similarity index 100% rename from vehicle.h rename to Vehicle.h From a02b5012a92ac759ec4b21c093bb012b260aa5a1 Mon Sep 17 00:00:00 2001 From: kazie Date: Thu, 2 Feb 2012 14:04:10 +0100 Subject: [PATCH 12/14] No idea what I am doing, commit thing. --- truck.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 truck.cpp diff --git a/truck.cpp b/truck.cpp new file mode 100644 index 0000000..1b961fd --- /dev/null +++ b/truck.cpp @@ -0,0 +1,24 @@ +class Truck : public Vehicle, public Autonomous { + + public: + Truck(std::string a, int b){ + Truck::set_values(a,b); + float Truck::getPrice(); + }; + + void set_values(std::string a,int b){ + brand = a; + year = b; + }; + + float getPrice(){ + return 0; // do magic + } + + void range(){ + //i am 12 and what is this? + } + + float getCost(){ + return getPrice(); + } From a3282376efc82ad2caaa25045ae5ccaec895bd03 Mon Sep 17 00:00:00 2001 From: kazie Date: Thu, 2 Feb 2012 14:04:42 +0100 Subject: [PATCH 13/14] REMOVE THIS OR SOMETHING --- truck.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 truck.h diff --git a/truck.h b/truck.h new file mode 100644 index 0000000..e69de29 From f38e591ae5830c661c4987ce7c48494e46bc0a11 Mon Sep 17 00:00:00 2001 From: David Nilsson Date: Fri, 3 Feb 2012 11:34:54 +0100 Subject: [PATCH 14/14] Fixa inledande gemen. --- truck.cpp => Truck.cpp | 0 truck.h => Truck.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename truck.cpp => Truck.cpp (100%) rename truck.h => Truck.h (100%) diff --git a/truck.cpp b/Truck.cpp similarity index 100% rename from truck.cpp rename to Truck.cpp diff --git a/truck.h b/Truck.h similarity index 100% rename from truck.h rename to Truck.h