From 5cf3786ec5e3bc52a14de163da0a95e9605f0d55 Mon Sep 17 00:00:00 2001
From: Rudi Buss <rudi.buss@th-deg.de>
Date: Thu, 26 Sep 2024 19:40:03 +0200
Subject: [PATCH] Update Exercise 2 - Vehicle.txt

---
 .../Exercises/Exercise 2 - Vehicle.txt        | 35 ++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/Part 2/6. Operator overloading/Exercises/Exercise 2 - Vehicle.txt b/Part 2/6. Operator overloading/Exercises/Exercise 2 - Vehicle.txt
index 40d552c..e5d76e0 100644
--- a/Part 2/6. Operator overloading/Exercises/Exercise 2 - Vehicle.txt	
+++ b/Part 2/6. Operator overloading/Exercises/Exercise 2 - Vehicle.txt	
@@ -1 +1,34 @@
-Overload the comparative operator so that it outputs whether a vehicle is the same or not. A vehicle is the same if its data members match.
Additionally overload the greater than/ less than operator so that it outputs whether a vehicle is "older", "newer" or "the same age" (data member value yearOfConstruction). 


Use the following program:



#include "iostream" 
#include "cstdlib"

using namespace std; 

class Vehicle
{
private:
	string brand;
	string licencePlate;
	int hp;
	int yearOfConstruction;

public:
	void displayData()
	{
		cout << "Brand: " << brand << endl;
		cout << "Licence plate: " << licencePlate << endl;
		cout << "Number of HP: " << hp << endl;
		cout << "Year of construction: " << yearOfConstruction << endl; 
	}
};

int main()
{

system("pause");
return 0;
};
\ No newline at end of file
+Overload the comparative operator so that it outputs whether a vehicle is the same or not. A vehicle is the same if its data members match.
+Additionally overload the greater than/ less than operator so that it outputs whether a vehicle is "older", "newer" or "the same age" (data member value yearOfConstruction). 
+
+
+Use the following program:
+
+
+#include <iostream> 
+
+using namespace std; 
+
+class Vehicle
+{
+private:
+	string brand;
+	string licencePlate;
+	int hp;
+	int yearOfConstruction;
+
+public:
+	void displayData()
+	{
+		cout << "Brand: " << brand << endl;
+		cout << "Licence plate: " << licencePlate << endl;
+		cout << "Number of HP: " << hp << endl;
+		cout << "Year of construction: " << yearOfConstruction << endl; 
+	}
+};
+
+int main()
+{
+
+	return 0;
+};
-- 
GitLab