static void Main() { // Instantiate two girl scout objects and employe display method GirlScout Jamie = new GirlScout(); GirlScout Amanda = new GirlScout("Amanda Meyer", "Meyer Troop", 45.50); Display(Jamie); Display(Amanda); }
static void Main(string[] args) { GirlScout girl1 = new GirlScout(); GirlScout girl2 = new GirlScout("Taylor", 1025, 10.25); Console.WriteLine($"Name: {girl1.Name} Troop: {girl1.TroopNum} Dues: ${girl1.DuesOwed}"); Console.WriteLine($"Name: {girl2.Name} Troop: {girl2.TroopNum} Dues: ${girl2.DuesOwed}"); Console.WriteLine($"{girl1.Motto}"); }
public static void Main() { GirlScout Slow = new GirlScout(); Slow.Name = "Slow"; Slow.Troop = 20; Slow.Owed = 99999999999999; GirlScout Eugene = new GirlScout("Eugene", 20, 0); Console.WriteLine("Name: {0} Troop #: {1} Money owed: ${2}", Slow.Name, Slow.Troop, Slow.Owed); Console.WriteLine("Name: {0} Troop #: {1} Money owed: ${2}", Eugene.Name, Eugene.Troop, Eugene.Owed); Console.WriteLine(GirlScout.motto); }
public static void Main() { GirlScout Sally = new GirlScout(); Sally.Name = "Sally"; Sally.Troop = 20; Sally.Owed = 99999999999999; GirlScout Susan = new GirlScout("Susan", 20, 0); Console.WriteLine("Name: {0} Troop #: {1} Money owed: ${2}", Sally.Name, Sally.Troop, Sally.Owed); Console.WriteLine("Name: {0} Troop #: {1} Money owed: ${2}", Susan.Name, Susan.Troop, Susan.Owed); Console.WriteLine(GirlScout.motto); }
public static void Main() { GirlScout scout1 = new GirlScout(); GirlScout scout2 = new GirlScout("Courtney", 2132, 47.86); Console.WriteLine(); Console.WriteLine(" {1} - {0} : {2}", scout1.name, scout1.number, scout1.dues.ToString("C2")); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(" {1} - {0} : {2}", scout2.name, scout2.number, scout2.dues.ToString("C2")); Console.WriteLine(); Console.WriteLine(); GirlScout.Motto(); Console.ReadLine(); }
// Method for displaying GirlScout object fields public static void Display(GirlScout scout) { Console.WriteLine("{0,5} {1, -10} {2,6}\n{3}", scout.ScoutName, scout.TroopName, scout.DuesOwed.ToString("C2"), GirlScout.MOTTO); }