From 678be69e327762165f9664c53a388da61ad3bea3 Mon Sep 17 00:00:00 2001 From: Kristian Clark Date: Mon, 7 Jan 2019 20:40:29 -0600 Subject: [PATCH 1/8] Saying hello to myself --- HelloWorld/HelloWorld.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/HelloWorld/HelloWorld.cs b/HelloWorld/HelloWorld.cs index 8168c805..185d81a7 100644 --- a/HelloWorld/HelloWorld.cs +++ b/HelloWorld/HelloWorld.cs @@ -5,8 +5,12 @@ namespace HelloWorld class Program { static void Main(string[] args) - { - Console.WriteLine("Hello World!"); + { + + Console.WriteLine("Hello Kristian!"); + string yourName = Console.ReadLine(); + + } } } From 158d5c6eee5a462b17963b61ffe8a0a0f7c016d9 Mon Sep 17 00:00:00 2001 From: Kristian Clark Date: Wed, 9 Jan 2019 19:14:13 -0600 Subject: [PATCH 2/8] Saying hello to myself --- HelloWorld/HelloWorld.cs | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/HelloWorld/HelloWorld.cs b/HelloWorld/HelloWorld.cs index 185d81a7..05429f85 100644 --- a/HelloWorld/HelloWorld.cs +++ b/HelloWorld/HelloWorld.cs @@ -1,16 +1,25 @@ using System; -namespace HelloWorld +public class Program { - class Program + public static void Main() { - static void Main(string[] args) - { + string name = ""; + int age = 0; + int year = 0; + - Console.WriteLine("Hello Kristian!"); - string yourName = Console.ReadLine(); + Console.WriteLine("Please enter your name: "); + name = Console.ReadLine(); + Console.WriteLine("Please enter your age: "); + age = Convert.ToInt32(Console.ReadLine()); + Console.WriteLine("Please enter the year: "); + year = Convert.ToInt32(Console.ReadLine()); + + Console.WriteLine("Hello! My name is {0} and I am {1} years old I was born in {2}.", name, age, year-age); + } - } - } } + + From c08b948c542ce9c61257c8efd0be92bc22901afb Mon Sep 17 00:00:00 2001 From: Kristian Clark Date: Wed, 16 Jan 2019 17:23:03 -0600 Subject: [PATCH 3/8] TextBasedGame --- PigLatin/PigLatin.cs | 11 ++ TextBasedGame/.vscode/launch.json | 26 ++++ TextBasedGame/.vscode/tasks.json | 15 +++ TextBasedGame/Program.cs | 197 +++++++++++++++++++++++++++++ TextBasedGame/TextBasedGame.csproj | 8 ++ 5 files changed, 257 insertions(+) create mode 100644 TextBasedGame/.vscode/launch.json create mode 100644 TextBasedGame/.vscode/tasks.json create mode 100644 TextBasedGame/Program.cs create mode 100644 TextBasedGame/TextBasedGame.csproj diff --git a/PigLatin/PigLatin.cs b/PigLatin/PigLatin.cs index 702647dd..10961fd7 100644 --- a/PigLatin/PigLatin.cs +++ b/PigLatin/PigLatin.cs @@ -7,6 +7,17 @@ class Program public static void Main() { // your code goes here + string alphabet = "abcdefghijklmnopqrstuvwxyz"; + string firstThird = alphabet.Substring(0, 8); + string secondThird = alphabet.Substring(8, 8); + string thirdThird = alphabet.Substring(17); + + Console.WriteLine("First Third: " + firstThird); + Console.WriteLine("Second Third: " + secondThird); + Console.WriteLine("Third Third: " + thirdThird); + + + // leave this command at the end so your program does not close automatically Console.ReadLine(); diff --git a/TextBasedGame/.vscode/launch.json b/TextBasedGame/.vscode/launch.json new file mode 100644 index 00000000..e28137c5 --- /dev/null +++ b/TextBasedGame/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/TextBasedGame.dll", + "args": [], + "cwd": "${workspaceFolder}", + "console": "internalConsole", + "stopAtEntry": false, + "internalConsoleOptions": "openOnSessionStart" + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} \ No newline at end of file diff --git a/TextBasedGame/.vscode/tasks.json b/TextBasedGame/.vscode/tasks.json new file mode 100644 index 00000000..7c08f701 --- /dev/null +++ b/TextBasedGame/.vscode/tasks.json @@ -0,0 +1,15 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/TextBasedGame.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/TextBasedGame/Program.cs b/TextBasedGame/Program.cs new file mode 100644 index 00000000..921125ea --- /dev/null +++ b/TextBasedGame/Program.cs @@ -0,0 +1,197 @@ +using System; + +namespace TextBasedGame +{ + class Program + { + public static void Main(string[] args) + { + int complete = 0; + bool alive = true; + while ( alive == true) + { + + + + Console.WriteLine("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"); + Console.WriteLine("Welcome to the cavern of secrets!"); + Console.WriteLine("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"); + + Console.WriteLine("You enter a dark cavern out of curiosity." + + "It is dark and you can only make out a small stick on the floor.Do you take it? [y/n]: "); + string ch1 = Console.ReadLine(); + + //Stick taken` + int stick = 0; + if (ch1 == "y") + { + System.Console.WriteLine("You have taken the stick!"); + System.Threading.Thread.Sleep(2000); + stick = 1; + } + + //Stick not takens + else if (ch1 == "n") + { + Console.WriteLine("You did not take the stick"); + stick = 0; + + } + + Console.WriteLine("As you proceed further into the cave, you see a small glowing object Do you approach the object? [y/n]"); + string ch2 = Console.ReadLine(); + + //Approach object + if (ch2 == "y") + { + System.Console.WriteLine("You approach the object"); + System.Threading.Thread.Sleep(2000); + System.Console.WriteLine("As you draw closer, you begin to make out the object as an eye!"); + System.Threading.Thread.Sleep(1000); + System.Console.WriteLine("The eye belongs to a giant spider! Do you try to fight it? [Y/N]"); + + } + string ch3 = Console.ReadLine(); + //Fight spider + if (ch3 == "Y") + { + //With stick + if (stick == 1) + { + System.Console.WriteLine("You only have a stick to fight with! You quickly jab the spider in it's eye and gain an advantage"); + System.Threading.Thread.Sleep(2000); + System.Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + System.Console.WriteLine(" Fighting... "); + System.Console.WriteLine(" YOU MUST HIT ABOVE A 5 TO KILL THE SPIDER "); + System.Console.WriteLine("IF THE SPIDER HITS HIGHER THAN YOU, YOU WILL DIE"); + System.Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + System.Threading.Thread.Sleep(2000); + Random rnd = new Random(); + int fdmg1 = rnd.Next(3, 10); + int edmg1 = rnd.Next(1, 5); + System.Console.WriteLine("you hit a " + fdmg1); + System.Console.WriteLine("the spider hits a " + edmg1); + System.Threading.Thread.Sleep(1000); + if (edmg1 > fdmg1) + { + System.Console.WriteLine("The spider has dealt more damage than you!"); + complete = 0; + //return complete; + } + else if (fdmg1 < 5) + { + System.Console.WriteLine("You didn't do enough damage to kill the spider, but you manage to escape"); + complete = 1; + //return complete; + } + else + { + System.Console.WriteLine("You killed the spider!"); + complete = 1; + //return complete; + } + } + //Without stick + else + { + System.Console.WriteLine("You don't have anything to fight with!"); + System.Threading.Thread.Sleep(2000); + System.Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + System.Console.WriteLine(" Fighting... "); + System.Console.WriteLine(" YOU MUST HIT ABOVE A 5 TO KILL THE SPIDER "); + System.Console.WriteLine("IF THE SPIDER HITS HIGHER THAN YOU, YOU WILL DIE"); + System.Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + System.Threading.Thread.Sleep(2000); + Random rnd = new Random(); + int fdmg2 = rnd.Next(1, 8); + int edmg2 = rnd.Next(1, 5); + System.Console.WriteLine("you hit a " + fdmg2); + System.Console.WriteLine("the spider hits a " + edmg2); + System.Threading.Thread.Sleep(2000); + if (edmg2 > fdmg2) + { + System.Console.WriteLine("The spider has dealt more damage than you!"); + complete = 0; + //return complete; + } + else if (fdmg2 < 5) + { + System.Console.WriteLine("You didn't do enough damage to kill the spider, but you manage to escape"); + complete = 1; + //return complete; + } + else + { + System.Console.WriteLine("You killed the spider!"); + complete = 1; + //return complete; + } + } + } + //Do Not Fight Spider + else if (ch3 == "N") + { + System.Console.WriteLine("You choose not to fight the spider."); + System.Threading.Thread.Sleep(1000); + System.Console.WriteLine("As you turn away, it ambushes you and impales you with it's fangs!!!"); + complete = 0; + //return complete + } + + //Do not approach object + else if (ch2 == "n") + { + System.Console.WriteLine("You turn away from the glowing object, and attempt to leave the cave..."); + System.Threading.Thread.Sleep(1000); + System.Console.WriteLine("But something won't let you...."); + System.Threading.Thread.Sleep(2000); + complete = 0; + //return complete + + } + if (complete == 1) + { Console.WriteLine("You managed to escape the cavern alive! Would you like to play again? [y/n]: "); + string choice = Console.ReadLine(); + if (choice == "y") + { + alive = true; + } + else if (choice == "n") + { + alive = false; + } + } + else + { + Console.WriteLine("You have died! Would you like to play again? [y/n]: "); + string choice2 = Console.ReadLine(); + if (choice2 == "y") + { + alive = true; + } + else + { + alive = false; + } + + } + + } + + + + + + + } + + + + + + + } + + +} + diff --git a/TextBasedGame/TextBasedGame.csproj b/TextBasedGame/TextBasedGame.csproj new file mode 100644 index 00000000..21dff5ca --- /dev/null +++ b/TextBasedGame/TextBasedGame.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp2.2 + + + From 20abb05fab978aa34d669a587472b3764b4edbec Mon Sep 17 00:00:00 2001 From: Kristian Clark Date: Thu, 31 Jan 2019 17:41:13 -0600 Subject: [PATCH 4/8] fixed PigLatin --- PigLatin/.vscode/launch.json | 28 +++++++++++++++++++++++ PigLatin/.vscode/tasks.json | 15 +++++++++++++ PigLatin/PigLatin.cs | 43 ++++++++++++++++++++++++------------ 3 files changed, 72 insertions(+), 14 deletions(-) create mode 100644 PigLatin/.vscode/launch.json create mode 100644 PigLatin/.vscode/tasks.json diff --git a/PigLatin/.vscode/launch.json b/PigLatin/.vscode/launch.json new file mode 100644 index 00000000..dbee6e56 --- /dev/null +++ b/PigLatin/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/bin/Debug/netcoreapp2.0/PigLatin.dll", + "args": [], + "cwd": "${workspaceFolder}", + // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window + "console": "internalConsole", + "stopAtEntry": false, + "internalConsoleOptions": "openOnSessionStart" + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ,] +} \ No newline at end of file diff --git a/PigLatin/.vscode/tasks.json b/PigLatin/.vscode/tasks.json new file mode 100644 index 00000000..a705ed07 --- /dev/null +++ b/PigLatin/.vscode/tasks.json @@ -0,0 +1,15 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/PigLatin.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/PigLatin/PigLatin.cs b/PigLatin/PigLatin.cs index 10961fd7..46fa77c3 100644 --- a/PigLatin/PigLatin.cs +++ b/PigLatin/PigLatin.cs @@ -2,31 +2,46 @@ namespace PigLatin { - class Program + public class Program { public static void Main() { - // your code goes here - string alphabet = "abcdefghijklmnopqrstuvwxyz"; - string firstThird = alphabet.Substring(0, 8); - string secondThird = alphabet.Substring(8, 8); - string thirdThird = alphabet.Substring(17); - Console.WriteLine("First Third: " + firstThird); - Console.WriteLine("Second Third: " + secondThird); - Console.WriteLine("Third Third: " + thirdThird); + System.Console.WriteLine("Translate word: "); + string engWord = Console.ReadLine(); + string PigLatin = TranslateWord(engWord); + System.Console.WriteLine(PigLatin); + + + + + + - - // leave this command at the end so your program does not close automatically Console.ReadLine(); } - + public static string TranslateWord(string word) { - // your code goes here + + + int firstVowelIndex = word.IndexOfAny(new char[] { 'A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u' }); + if (firstVowelIndex == 0) + { + return word + "yay"; + } + else if (firstVowelIndex != 0) + { + string firstLetter = word.Substring(0, 1); + string restWord = word.Substring(1); + // your code goes here + return restWord + firstLetter + "ay"; + } + return word; + } } -} +} \ No newline at end of file From f3b426ab9066a9ab852f81f63971f863f970bc27 Mon Sep 17 00:00:00 2001 From: Kristian Clark Date: Thu, 31 Jan 2019 18:10:03 -0600 Subject: [PATCH 5/8] test --- test.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test.html diff --git a/test.html b/test.html new file mode 100644 index 00000000..1df67406 --- /dev/null +++ b/test.html @@ -0,0 +1,10 @@ + + + + + + + Hello world + + + From b2a5495bcf5fe98f6fc3ad987364c2390933a41e Mon Sep 17 00:00:00 2001 From: Kristian Clark Date: Sun, 10 Feb 2019 01:35:17 -0600 Subject: [PATCH 6/8] StarWars --- StarWars/.vscode/launch.json | 28 +++++++ StarWars/.vscode/tasks.json | 15 ++++ StarWars/Program.cs | 142 +++++++++++++++++++++++++++++++++++ StarWars/StarWars.csproj | 8 ++ 4 files changed, 193 insertions(+) create mode 100644 StarWars/.vscode/launch.json create mode 100644 StarWars/.vscode/tasks.json create mode 100644 StarWars/Program.cs create mode 100644 StarWars/StarWars.csproj diff --git a/StarWars/.vscode/launch.json b/StarWars/.vscode/launch.json new file mode 100644 index 00000000..591195f1 --- /dev/null +++ b/StarWars/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/StarWars.dll", + "args": [], + "cwd": "${workspaceFolder}", + // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window + "console": "internalConsole", + "stopAtEntry": false, + "internalConsoleOptions": "openOnSessionStart" + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ,] +} \ No newline at end of file diff --git a/StarWars/.vscode/tasks.json b/StarWars/.vscode/tasks.json new file mode 100644 index 00000000..8c949ba6 --- /dev/null +++ b/StarWars/.vscode/tasks.json @@ -0,0 +1,15 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/StarWars.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/StarWars/Program.cs b/StarWars/Program.cs new file mode 100644 index 00000000..fc88c0bc --- /dev/null +++ b/StarWars/Program.cs @@ -0,0 +1,142 @@ +using System; + +public class Program +{ + public static void Main() + { + Station star = new Station("Star"); + Station rebel = new Station("Rebel"); + Person leia = new Person("Leia", "Organa", "Rebel"); + Person luke = new Person("Luke", "Skywalker", "Rebel"); + Ship falcon = new Ship("Rebel", "Smuggling", 2); + Ship tie = new Ship("Tie", "Fighter", 1); + Station smallStation = new Station(2); + smallStation.ParkShip(tie, 0); + Console.WriteLine(smallStation.Roster); + Console.WriteLine("Hello world!"); + } +} + +class Person +{ + private string firstName; + private string lastName; + private string alliance; + public Person(string firstName, string lastName, string alliance) + { + this.firstName = firstName; + this.lastName = lastName; + this.alliance = alliance; + } + + public string FullName + { + get + { + return this.firstName + " " + this.lastName; + } + + set + { + string[] names = value.Split(' '); + this.firstName = names[0]; + this.lastName = names[1]; + } + } +} + +class Ship +{ + private Person[] passengers; + public Ship(string initialName) + { + Name = initialName; + } + public string Name { get; private set; } + public Ship(string alliance, string type, int size) + { + this.Type = type; + this.Alliance = alliance; + this.passengers = new Person[size]; + } + + public string Type + { + get; + set; + } + + public string Alliance + { + get; + set; + } + + public string Passengers + { + get + { + foreach (var person in passengers) + { + Console.WriteLine(String.Format("{0}", person.FullName)); + } + + return "That's Everybody!"; + } + } + public void addPerson(Person passengers, int spot) + { + this.passengers[spot] = passengers; + } + + + public void EnterShip(Person person, int seat) + { + this.passengers[seat] = person; + } + + public void ExitShip(int seat) + { + this.passengers[seat] = null; + } +} + +class Station +{ + private Ship[] ships; + public Station(string initialName) + { + Name = initialName; + } + public string Name { get; private set; } + public Station(int initialSize) + { + Size = initialSize; + this.ships = new Ship[initialSize]; + } + public int Size { get; private set; } + public void ParkShip(Ship ship, int spot) + { + ships[spot] = ship; + } + public void ExitStation(int spot) + { + this.ships[spot] = null; + } + + public string Roster + { + get + { + for (int i = 0; i < ships.Length; i++) + { + if (ships[i] != null) + { + Console.WriteLine(String.Format("The {0} ship is in spot {1} ", ships[i].Type, i)); + } + } + return "That's all!"; + + } + } +} \ No newline at end of file diff --git a/StarWars/StarWars.csproj b/StarWars/StarWars.csproj new file mode 100644 index 00000000..21dff5ca --- /dev/null +++ b/StarWars/StarWars.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp2.2 + + + From 1ab375695154509789b1305aa3842b5e8dc32500 Mon Sep 17 00:00:00 2001 From: Kristian Clark Date: Sun, 10 Feb 2019 17:33:29 -0600 Subject: [PATCH 7/8] update --- StarWars/Program.cs | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/StarWars/Program.cs b/StarWars/Program.cs index fc88c0bc..fd6ad904 100644 --- a/StarWars/Program.cs +++ b/StarWars/Program.cs @@ -4,16 +4,17 @@ public class Program { public static void Main() { - Station star = new Station("Star"); - Station rebel = new Station("Rebel"); + Station deathStar = new Station("DeathStar", 2, "Imperial"); + Station rebelSpaceStation = new Station("RebelSpaceStation", 2, "Rebel"); Person leia = new Person("Leia", "Organa", "Rebel"); Person luke = new Person("Luke", "Skywalker", "Rebel"); Ship falcon = new Ship("Rebel", "Smuggling", 2); Ship tie = new Ship("Tie", "Fighter", 1); - Station smallStation = new Station(2); + Station smallStation = new Station("Rebel", 2, "Rebel"); smallStation.ParkShip(tie, 0); + tie.addPerson(leia, 0); Console.WriteLine(smallStation.Roster); - Console.WriteLine("Hello world!"); + } } @@ -78,7 +79,10 @@ public string Passengers { foreach (var person in passengers) { - Console.WriteLine(String.Format("{0}", person.FullName)); + if (person != null) + { + Console.WriteLine(String.Format("{0}", person.FullName)); + } } return "That's Everybody!"; @@ -104,17 +108,18 @@ public void ExitShip(int seat) class Station { private Ship[] ships; - public Station(string initialName) - { - Name = initialName; - } public string Name { get; private set; } - public Station(int initialSize) + public int Size { get; private set; } + public string Alliance { get; private set; } + + public Station(string initialName, int initialSize, string alliance) { - Size = initialSize; + this.Name = initialName; this.ships = new Ship[initialSize]; + this.Size = initialSize; + this.Alliance = alliance; } - public int Size { get; private set; } + public void ParkShip(Ship ship, int spot) { ships[spot] = ship; @@ -132,7 +137,8 @@ public string Roster { if (ships[i] != null) { - Console.WriteLine(String.Format("The {0} ship is in spot {1} ", ships[i].Type, i)); + Console.WriteLine(String.Format("The {0} ship is in spot {1} and the people on that ship are:", ships[i].Type, i)); + Console.WriteLine(ships[i].Passengers); } } return "That's all!"; From e65f0e339e062f7ecdab1f19f7584112b515d0e0 Mon Sep 17 00:00:00 2001 From: Kristian Clark Date: Mon, 11 Feb 2019 13:10:50 -0600 Subject: [PATCH 8/8] deleted line --- StarWars/Program.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/StarWars/Program.cs b/StarWars/Program.cs index fd6ad904..c301909c 100644 --- a/StarWars/Program.cs +++ b/StarWars/Program.cs @@ -4,7 +4,6 @@ public class Program { public static void Main() { - Station deathStar = new Station("DeathStar", 2, "Imperial"); Station rebelSpaceStation = new Station("RebelSpaceStation", 2, "Rebel"); Person leia = new Person("Leia", "Organa", "Rebel"); Person luke = new Person("Luke", "Skywalker", "Rebel");