A simple demonstration of OOP styles.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Space.cs 649B

12345678910111213141516171819202122232425262728293031323334
  1. using ParkingLot.Vehicles;
  2. namespace ParkingLot
  3. {
  4. public class Space
  5. {
  6. private SpaceType spaceType;
  7. public SpaceType SpaceType
  8. {
  9. get { return spaceType; }
  10. set { spaceType = value; }
  11. }
  12. private Vehicle currentVehicle;
  13. public Vehicle CurrentVehicle
  14. {
  15. get { return currentVehicle; }
  16. set { currentVehicle = value; }
  17. }
  18. public Space()
  19. {
  20. SetDefaults();
  21. }
  22. public void SetDefaults()
  23. {
  24. SpaceType = SpaceType.Large;
  25. CurrentVehicle = null;
  26. }
  27. }
  28. }