///
/// 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 {
///
/// Represents a fitness tracker device that implements IWearable interface.
///
public class FitTracker : Device, IWearable {
///
/// Gets the type of the device (always "FitTracker").
///
public string DeviceType { get; } = "FitTracker";
///
/// Gets the water resistance rating in meters.
///
public int WaterResistanceMeters { get; }
///
/// Gets the color of the fitness tracker.
///
public string Color { get; }
///
/// Initializes a new instance of the FitTracker class.
///
/// The unique device identifier.
/// The name of the fitness tracker.
/// Water resistance rating in meters.
/// The color of the device.
public FitTracker(int id, string name, int waterResistanceMeters, string color)
: base(id, name)
{
WaterResistanceMeters = waterResistanceMeters;
Color = color;
}
///
/// Gets detailed information about the fitness tracker.
///
/// Formatted string with device details.
public override string GetDetails()
{
return $"{DeviceType} - Id: {Id}, Name: {Name}, " +
$"Water Resistance: {WaterResistanceMeters}m, " +
$"Color: {Color}";
}
///
/// Gets the water resistance rating.
///
/// Water resistance in meters.
public int GetWaterResistanceMeters()
{
return WaterResistanceMeters;
}
}
}