Skip to content

Instantly share code, notes, and snippets.

@Amberlamps
Created August 25, 2025 09:00
Show Gist options
  • Save Amberlamps/c3f6150203fb16df46b7ddf5a2baefd8 to your computer and use it in GitHub Desktop.
Save Amberlamps/c3f6150203fb16df46b7ddf5a2baefd8 to your computer and use it in GitHub Desktop.
Coding 1 - C#
using System;
using System.Collections.Generic;
namespace ClaimsProcessing
{
public class Claim
{
public string Id { get; set; }
public decimal Amount { get; set; }
public Claim(string id, decimal amount)
{
Id = id;
Amount = amount;
}
}
public class Insurer
{
public string Id { get; set; }
public decimal Balance { get; set; }
public Insurer(string id, decimal balance)
{
Id = id;
Balance = balance;
}
}
public class PayoutTransaction
{
public string ClaimId { get; set; }
public string InsurerId { get; set; }
public decimal Amount { get; set; }
public PayoutTransaction(string claimId, string insurerId, decimal amount)
{
ClaimId = claimId;
InsurerId = insurerId;
Amount = amount;
}
}
class Program
{
static void Main(string[] args)
{
List<Claim> claims = new List<Claim>
{
new Claim("a", 100),
new Claim("b", 50),
new Claim("c", 40),
new Claim("d", 60),
new Claim("e", 20),
new Claim("f", 90),
new Claim("g", 120),
new Claim("h", 30)
};
List<Insurer> insurers = new List<Insurer>
{
new Insurer("A", 250),
new Insurer("B", 250),
new Insurer("C", 100)
};
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment