Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Boolean.CSharp.Main/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ Within the constructor the 'string Make' variable has scope within the construct
//TODO: 1. Change car instantiation code above, pass in the make AND model.

//TIP if you click on the Car class name above, right click and then select 'Go to Definition' it'll take you straight to the code


Car car1 = new Car("VW", "Bubble");


return car;
return car1;

}

Expand Down Expand Up @@ -108,7 +107,7 @@ public Unicycle Question4()

//TIP see we already have an internal member for the unicyclist name: _nameOfUnicyclist so you can use this to store the name internally
// it is good practice to name internal class variable with an _ at the beginning
Unicycle unicycle = new Unicycle();
Unicycle unicycle = new Unicycle("Timmy");



Expand Down Expand Up @@ -136,9 +135,9 @@ What are the parameters and types?
//TODO: 5. Call the FlightDetails method that sets the cancelled message and cancel the flight

//write code here
plane.FlightDetails("Flight cancelled!");

return plane;
}

}
}
5 changes: 5 additions & 0 deletions Boolean.CSharp.Main/Misc/Bicycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ public class Bicycle
{
private int _wheelCount;

public Bicycle()
{
_wheelCount = 2;
}

public int WheelCount { get; set; }
}
}
5 changes: 5 additions & 0 deletions Boolean.CSharp.Main/Misc/Car.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public Car(string Make)
_make = Make;
_model = string.Empty;
}
public Car(string Make, string Model)
{
_make = Make;
_model = Model;
}

public string Make
{
Expand Down
1 change: 1 addition & 0 deletions Boolean.CSharp.Main/Misc/Motorbike.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public Motorbike()

public Motorbike(string Make, string Model)
{
_cc = 373;
_make = Make;
_model = Model;
}
Expand Down
5 changes: 5 additions & 0 deletions Boolean.CSharp.Main/Misc/Unicycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ public class Unicycle
{
private string _nameOfUnicyclist;

public Unicycle(string name)
{
_nameOfUnicyclist = name;
}

public string NameOfUnicyclist { get => _nameOfUnicyclist; set => _nameOfUnicyclist = value; }
public int WheelCount { get; set; } = 1;
}
Expand Down
Loading