CNSA-212-Personal/Database3-submit/Database3/state.cs

51 lines
1.2 KiB
C#
Raw Permalink Normal View History

2024-02-16 07:50:40 -05:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Traffic
{
public class state
{
private string nameString;
private string abbreviationString;
/// <summary>
/// used to display the states in 3 different forms
/// Name ("Pennsylvania"), Abbreviation ("PA") ,
/// name and abbreviation ("Pennsylvania (PA) ")
/// </summary>
/// <param name="nameArg"></param>
/// <param name="abbreviationArg"></param>
public state(ref string nameArg, ref string abbreviationArg)
{
abbreviationString = abbreviationArg;
nameString = nameArg;
}
public string Name
{
get
{
return nameString;
}
}
public string Abbreviation
{
get
{
return abbreviationString;
}
}
public string FullAndAbbrev
{
get
{
return nameString + " (" + abbreviationString + ")";
}
}
}
}