From d0c6c535b5b32d6c1782a774399554d9e4a768b4 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 8 Jul 2017 08:51:24 +0200 Subject: [PATCH] some updates --- software/1_sem/se-03_first_app/first_app/Car.cs | 2 +- software/1_sem/se-03_first_app/first_app/Program.cs | 2 +- software/1_sem/se-12-log-entry/se-12-log-entry/Program.cs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/software/1_sem/se-03_first_app/first_app/Car.cs b/software/1_sem/se-03_first_app/first_app/Car.cs index c27b78a..4292302 100644 --- a/software/1_sem/se-03_first_app/first_app/Car.cs +++ b/software/1_sem/se-03_first_app/first_app/Car.cs @@ -20,7 +20,7 @@ namespace first_app // set { _number = value; } // } - public Car(string _number) + public Car(string _number = "999") { this.number = _number; } diff --git a/software/1_sem/se-03_first_app/first_app/Program.cs b/software/1_sem/se-03_first_app/first_app/Program.cs index 67ceb49..efc754c 100644 --- a/software/1_sem/se-03_first_app/first_app/Program.cs +++ b/software/1_sem/se-03_first_app/first_app/Program.cs @@ -25,7 +25,7 @@ namespace first_app Console.WriteLine("Please enter your car number"); string car_number = Console.ReadLine(); - Car first_car = new Car(car_number); + Car first_car = new Car(); Console.WriteLine(first_car.number); Console.ReadKey(); diff --git a/software/1_sem/se-12-log-entry/se-12-log-entry/Program.cs b/software/1_sem/se-12-log-entry/se-12-log-entry/Program.cs index 02acf04..71526d7 100644 --- a/software/1_sem/se-12-log-entry/se-12-log-entry/Program.cs +++ b/software/1_sem/se-12-log-entry/se-12-log-entry/Program.cs @@ -10,10 +10,9 @@ namespace se_12_log_entry { Stack logEntries = new Stack(); int idCounter = 0; - while (idCounter < 11) + for (int i = 0; i < 20; i++) { - logEntries.Push(new LogEntry(idCounter, DateTime.Now)); - idCounter++; + logEntries.Push(new LogEntry(i, DateTime.Now)); LogEntry newestEntry = logEntries.Peek(); Console.WriteLine("ID:"