CS
This commit is contained in:
43
CS/CS1 PoloClubApp_RensPastoor/FitTracker.cs
Normal file
43
CS/CS1 PoloClubApp_RensPastoor/FitTracker.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
///
|
||||
/// class: FitTracker.cs
|
||||
///
|
||||
///This file defines the FitTracker class, which represents a fitness tracker device. It implements
|
||||
///the IWearable interface and includes properties for water resistance and other fitness-specific features.
|
||||
///
|
||||
/// Name: Rens Pastoor
|
||||
/// Studentnumber: 555408
|
||||
/// Date: 11 may 2025
|
||||
///
|
||||
///Version: 1
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoloClubApp {
|
||||
internal class FitTracker : Device, IWearable {
|
||||
public string DeviceType = "FitTracker";
|
||||
public int Id { get; }
|
||||
public string Name { get; }
|
||||
public string PlayerName { get; set; }
|
||||
public int WaterResistanceMeters { get; }
|
||||
public string Color { get; }
|
||||
|
||||
public FitTracker(int id, string name, int waterResistanceMeters, string color) : base(id, name, null){
|
||||
Id = id;
|
||||
Name = name;
|
||||
WaterResistanceMeters = waterResistanceMeters;
|
||||
Color = color;
|
||||
}
|
||||
|
||||
public override string GetDetails(){
|
||||
return DeviceType + "Id: " + Id + ", Name: " + Name + ", Type: " + ", WaterResistanceMeters: " + WaterResistanceMeters + ", Color: " + Color;
|
||||
}
|
||||
|
||||
public int GetWaterResistanceMeters(){
|
||||
return WaterResistanceMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user