This commit is contained in:
Rens Pastoor
2025-06-12 11:20:08 +02:00
parent 37013ec1fc
commit 1086760c4a
21 changed files with 444 additions and 256 deletions

View File

@@ -17,18 +17,30 @@ using System.Text;
using System.Threading.Tasks;
namespace PoloClubApp {
internal class SmartPhone : Device {
public string DeviceType = "SmartPhone";
public int Id { get; }
public string Name { get; }
public string PlayerName { get; set; }
public SmartPhone(int id, string name) : base(id, name, null){
Id = id;
Name = name;
}
public override string GetDetails(){
return DeviceType + "Id: " + Id + ", Name: " + Name;
/// <summary>
/// Represents a smartphone device in the Polo Club system.
/// </summary>
public class SmartPhone : Device
{
/// <summary>
/// Gets the type of the device (always "SmartPhone").
/// </summary>
public string DeviceType { get; } = "SmartPhone";
/// <summary>
/// Initializes a new instance of the SmartPhone class.
/// </summary>
/// <param name="id">The unique identifier for the smartphone.</param>
/// <param name="name">The name of the smartphone.</param>
public SmartPhone(int id, string name) : base(id, name) { }
/// <summary>
/// Gets a formatted string with details about the smartphone.
/// </summary>
/// <returns>A string containing device details.</returns>
public override string GetDetails()
{
return $"{DeviceType} - Id: {Id}, Name: {Name}";
}
}
}