Archives from S:\ Drive

Good to keep around methinks
This commit is contained in:
Amrit Panesar committed 2015-04-01 21:23:15 -07:00
1 parent eadaf70b9e
commit 6dd63cc439
606 files changed
+50212

No files matched your search

@@ -0,0 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cerealization", "Cerealization\Cerealization.csproj", "{95487408-55E2-47CB-A48E-F8720F938D3E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{95487408-55E2-47CB-A48E-F8720F938D3E}.Debug|x86.ActiveCfg = Debug|x86
{95487408-55E2-47CB-A48E-F8720F938D3E}.Debug|x86.Build.0 = Debug|x86
{95487408-55E2-47CB-A48E-F8720F938D3E}.Release|x86.ActiveCfg = Release|x86
{95487408-55E2-47CB-A48E-F8720F938D3E}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{95487408-55E2-47CB-A48E-F8720F938D3E}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Cerealization</RootNamespace>
<AssemblyName>Cerealization</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RandomThings.cs" />
<Compile Include="StructuredInts.cs" />
<Compile Include="Student.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using System.Runtime.Serialization;
using System.IO;
using System.Diagnostics;
namespace Cerealization
{
public partial class Program
{
static void Main(string[] args)
{
Console.WriteLine(" -=Coffee and cerealization=-\n ( ) ;\n ;)( ;\n :----: o8Oo./\n C|====| ._o8o8o8Oo_.\n | | \\========/\n `----' `------'\n");
int HighOrder = RandNumber(10, 101); // 100 students as the maximum
Console.WriteLine("Generating {0} students...", HighOrder);
CStudent students = new CStudent();
for (int i = 0; i < HighOrder; i++)
{
// do the thing.
students.Add(new Student(i + 1, GenerateFirstName(), GenerateFirstName(), GenerateLastName(), GenerateSSN(), GenerateAddr(), "", GenerateCity(), GenerateState(), GenerateZipCode(), GeneratePhoneNumber(), GeneratePhoneNumber()));
}
XmlSerializer serializer = new XmlSerializer(typeof(CStudent));
TextWriter writer = new StreamWriter("Students.xml");
serializer.Serialize(writer, students);
writer.Close();
Console.WriteLine("Students.xml written!");
Console.WriteLine("Press enter to open in Notepad++");
Console.ReadLine();
Process.Start("notepad++", string.Format("\"{0}\\{1}\"", Directory.GetCurrentDirectory(), "Students.xml"));
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Cerealization")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Coleman University")]
[assembly: AssemblyProduct("Cerealization")]
[assembly: AssemblyCopyright("Copyright © Coleman University 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c843d1de-c3be-47d1-9ee0-1d2ca6b48d77")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,134 @@
using System;
using System.Globalization;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cerealization
{
/// <summary>
/// Various randomly generated things.
/// </summary>
public partial class Program
{
// generate a random number from 0 to the maximum value an integer can hold. Positive values.
public static int RandNumber(int Low = 0, int High = int.MaxValue)
{
Random rndNum = new Random(int.Parse(Guid.NewGuid().ToString().Substring(0, 8), NumberStyles.HexNumber));
int rnd = rndNum.Next(Low, High);
return rnd;
}
// generate a random floating point double. positive values.
public static double RandDouble()
{
Random rndNum = new Random(int.Parse(Guid.NewGuid().ToString().Substring(0, 8), NumberStyles.HexNumber));
double rnd = rndNum.NextDouble() * 28;
if (rnd < 20) // make all numbers greater than 20.
{
rnd *= RandDouble();
}
return rnd;
}
// grab a random firstname from this string array.
public static string GenerateFirstName()
{
string[] firstnames = { "Librada","Jeanne","Krishna","Roni","Kisha","Edison","Freda","Jed","Lorraine","Nelda","Corine","Lien","Daisy","Gita","Suzy","Gwyneth","Krysta","Erinn","Samual","Barney","Rosia","Malik","Franchesca","Cherryl","Ricardo","Inga","Lesley","Kory","Jaunita","Lacey","Chelsie","Kera","Isaac","Aracely","Delmy","Maggie","Rolland","Estela","Otha","Arturo","Devona",
"Wilton","Karey","Hillary","Jared","Tiffiny","Boris","Flavia","Rivka","Casimira","Adria","Odette","Wilbert","Xuan","Allyson","Rosendo","Elijah","Tad","Malisa","Kayleen","Jone","Reina","Laraine","Len","Leora","Fred","Sydney","Sona","Thuy","Sage","Sixta","Joseph","Chantell","Kiesha","Kacie","Maryellen","Fidelia","Anastasia","Stephaine","Johanne","Charlesetta",
"Crista","Jarod","Sherrell","Sebrina","Juliet","Charise","Candida","Jonnie","Daine","Jong","Maida","Danilo","Jeneva","Margret","Domenic","Luanna","Nana","Salley","Hipolito","Sanjuanita","Giuseppina","Domonique","Shayla","Melva","Leora","Ashleigh","Ruben","Delbert","Evelina","Jeanie","Margarett","Marcie","Assunta","Latoria","Jodie","Kenisha","Anamaria","Shirleen",
"Ashton","Yan","Fanny","Vanita","Marlyn","Maryland","Shandi","Adolph","Amina","Manuel","Dawne","Cristine","Alberto","Tabetha","Frida","Awilda","Louann","Karly","Dede","Kristina","Sue","Elissa","Jamika","Margret","Ninfa","Louisa","Vinita","Gigi","Quinn","Maricruz","Jeanmarie","Niesha","Marquita","Hertha","Shawnna","Jetta","Kristel","Shaunta","Kiyoko","Alana","Eduardo",
"Trish","Willa","Darline","Ching","Rosenda","Rufus","Kraig","Tia","Keely","Markita","Georgann","Nicola","Judy","Ignacio","Shantay","Cicely","Astrid","Ladawn","Nia","Babara","Deidre","Geoffrey","Leilani","Lamont","Delphine","Harrison","Anjanette","Zona","Carmen","Hui","Luvenia","Leeann","Marybelle","Shanon","Nicky","Carlene","Laquanda","Aldo","Larisa","Tony",
"Madeleine","Garnett","Shae","Shemika","Erich","Celestina","Foster","Kaitlyn","Mariela","Noe","Rafael","Jesusa","Cole","Lettie","Sherill","Trey","Marg","Shaunda","Randell","Piedad","Marjorie","Verena","Elicia","Mika","Colette","Corene","Veronika","Jerrie","Rosie","Georgene","Serafina","Sherman","Susannah","Annamae","Michell","Kelsey","Rosario","Carolina","Jeanie",
"Lyndia","Ora","Herta","Santa","Erline","Karmen","Griselda","Maud","Linnie","Nicholle","Mistie","Jordan"};
// use the positive random number function above, mod'd by the length to grab a random value
return (firstnames[RandNumber() % firstnames.Length]);
}
// grab a random lastname from this string array.
public static string GenerateLastName()
{
string[] lastnames = { "Ives","Dole","Bechtel","Gilfillan","Fahey","Montrose","Harvin","Arvizo","Letarte","Reidhead","Ahlstrom","Hyneman","Reynoso","Douglass","Prato","Mccutchen","Mohl","Sperry","Greb","Cabell","Laramore","Fujiwara","Arpin","Brumfield","Fortin","Markell","Ballengee","Sanluis","Trickey","Haake","Zirkle","Gaines","Ahern","Lafond","Jude","Robie","Runion","Runyan","Futrell",
"Rather","Kinloch","Rugg","Senecal","Vanhook","Vallance","Stillwell","Haldeman","Thrush","Shomo","Valerius","Cazares","Townley","Rakestraw","Agar","Meinecke","Coll","Redick","Saint","Spight","Mcnaught","Gayman","Yerger","Rivero","Fabela","Wilhoite","Middlebrooks","Jefferys","Massie","Reichel","Lobb","Ristow","Rucks","Heckard","Hosmer","Dingess","Schamber","Hesson",
"Torbett","Goldschmidt","Hayter","Shew","Ugalde","Vicknair","Danks","Tate","Delorme","Ormand","Laughton","Wilkerson","Dickson","Mulvey","Junkin","Camacho","Barsh","Recker","Farnsworth","Gary","Drees","Knoles","Satter","Battin","Costa","Matsumura","Shears","Devinney","Macken","Garrett","Doney","Fulmer","Hoss","Loll","Tanner","Podesta","Asaro","Morningstar","Hilyard",
"Nehls","Fonseca","Eller","Wilkinson","Lamarca","Soliz","Westervelt","Carlino","Kunkle","Loucks","Jansson","Cothren","Darlington","Zahm","Pinegar","Emerick","Tall","Eveland","Umstead","Davisson","Batz","Plata","Ryberg","Beane","Koening","Putz","Daughtrey","Sinha","Gerdes","Arno","Lorch","Shehan","Chenard","Holloway","Castleberry","Bowlin","Battin","Donovan","Calton",
"Huot","Mcmurtrie","Delapp","Lankford","Biel","Kin","Caceres","Ormand","Streicher","Kimbrel","Cornish","Barahona","Southern","Stuart","Stoke","Scharff","Hartwell","Gildersleeve","Tedrick","Rex","Chaudhry","Wetzel","Desai","Ensey","Escobedo","Matranga","Falzone","Ritzman","Marchant","Babin","Friedt","Shoup","Gunder","Seim","Shadrick","Riggs","Moret","Howes","Steenbergen",
"Rodriques","Dries","Jefferson","Hulbert","Menendez","Ellington","Housand","Whitwell","Rearick","Wagnon","Schmitmeyer","Barhorst","Rosenfield","Summerville","Matus","Marrow","Kind","Searfoss","Denn","Appling","Grim","Huffer","Kellen","Roscoe","Garofalo","Simeone","Goucher","Parkhurst","Tarpey","Bassett","Ortman","Segundo","Mattson","Pullum","Kriner","Smiddy","Cohrs",
"Loring","Strebel","Mcnemar","Grossi","Raby","Dubray","Capra","Wittrock","Fazzino","Bedard","Sera","Lisk","Heldt","Barefoot","Heimbach","Hover","Guthrie","Hartigan","Noyes","Jarrard"};
// use the positive random number function above, mod'd by the length to grab a random value
return (lastnames[RandNumber() % lastnames.Length]);
}
public static string GenerateAddr()
{
string[] set1 = { "Amber", "Auburn", "Bent", "Big", "Birch", "Blue", "Bright", "Broad", "Burning", "Calm", "Cinder", "Clear", "Cold", "Colonial", "Cool", "Cotton", "Cozy", "Crimson", "Crystal", "Dewy", "Dusty", "Easy", "Emerald", "Fallen", "Foggy", "Gentle", "Golden", "Grand", "Green", "Happy", "Harvest", "Hazy", "Heather", "Hidden", "High", "Honey", "Hush", "Indian", "Iron", "Ivory",
"Jagged", "Lazy", "Little", "Lone", "Lonely", "Long", "Lost", "Merry", "Middle", "Misty", "Noble", "Old", "Orange", "Pearl", "Pied", "Pleasant", "Pretty", "Quaint", "Quaking", "Quiet", "Red", "Rocky", "Rose", "Rough", "Round", "Rustic", "Sandy", "Shady", "Silent", "Silver", "Sleepy", "Small", "Square", "Still", "Stony", "Strong", "Sunny", "Sweet", "Tawny", "Tender",
"Thunder", "Turning", "Twin", "Umber", "Velvet", "White", "Windy" };
string[] set2 = { "Acorn", "Anchor", "Apple", "Autumn", "Axe", "Barn", "Beacon", "Bear", "Beaver", "Berry", "Bird", "Blossom", "Bluff", "Branch", "Bridge", "Brook", "Butterfly", "Butternut", "Castle", "Chestnut", "Cider", "Butt", "Cottage", "Creek", "Crow", "Dale", "Deer", "Diamond", "Dove", "Elk", "Elm", "Embers", "Fawn", "Feather", "Flower", "Forest", "Fox", "Gate", "Goat", "Goose", "Grove",
"Harbor", "Hickory", "Hills", "Holly", "Horse", "Island", "Lake", "Lamb", "Leaf", "Log", "Maple", "Mill", "Mountain", "Nectar", "Nest", "Nut", "Oak", "Panda", "Peach", "Pebble", "Pine", "Pioneer", "Pond", "Pony", "Prairie", "Pumpkin", "Quail", "Rabbit", "Rise", "River", "Robin", "Rock", "Shadow", "Sky", "Snake", "Spring", "Squirrel", "Stone", "Swan", "Timber", "Treasure",
"Turtle", "View", "Wagon", "Willow", "Zephyr" };
string[] set3 = { "Acres", "Alcove", "Arbor", "Avenue", "Bank", "Bayou", "Bend", "Bluff", "Byway", "Canyon", "Chase", "Circle", "Corner", "Court", "Cove", "Crest", "Cut", "Dale", "Dell", "Drive", "Edge", "Estates", "Falls", "Farms", "Field", "Flats", "Gardens", "Gate", "Glade", "Glen", "Grove", "Haven", "Heights", "Highlands", "Hollow", "Isle", "Jetty", "Journey", "Knoll", "Lace", "Lagoon",
"Landing", "Lane", "Ledge", "Manor", "Meadow", "Mews", "Niche", "Nook", "Orchard", "Pace", "Park", "Pass", "Path", "Pike", "Place", "Point", "Promenade", "Quay", "Race", "Ramble", "Ridge", "Road", "Round", "Rove", "Run", "Saunter", "Shoal", "Stead", "Street", "Stroll", "Summit", "Swale", "Terrace", "Trace", "Trail", "Trek", "Turn", "Twist", "Vale", "Valley", "View", "Villa",
"Vista", "Wander", "Way", "Woods" };
return string.Format("{0} {1} {2} {3}", RandNumber(0,10000), set1[RandNumber() % set1.Length], set2[RandNumber() % set2.Length], set3[RandNumber() % set3.Length]);
}
public static string GenerateState()
{
string[] states = { "AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY" };
return states[RandNumber() % states.Length];
}
public static string GenerateCity()
{
// grabbit from https://developers.google.com/adwords/api/docs/appendix/geotargeting?csw=1
string[] cities = { "Anchorage", "Anderson", "Angoon", "Atqasuk", "Barrow", "Bethel", "Clear", "Cordova", "Craig", "Delta Junction", "Dillingham", "Eagle River", "Eielson AFB", "Elmendorf Air Force Base", "Fairbanks", "Galena", "Girdwood", "Glennallen", "Gustavus", "Haines", "Healy", "Homer", "Hoonah", "Juneau", "Kenai", "Ketchikan", "Klawock", "Kodiak", "Kotzebue", "McGrath", "Metlakatla",
"Mountain Village", "Nikiski", "Nome", "North Pole", "Palmer", "Pelican", "Petersburg", "Port Lions", "Seward", "Sitka", "Skagway", "Soldotna", "Saint Paul Island", "Tanacross", "Thorne Bay", "Tok", "Tununak", "Unalaska", "Valdez", "Wasilla", "Whittier", "Wrangell", "Yakutat", "Abbeville", "Adamsville", "Addison", "Adger", "Alabaster", "Albertville", "Alexander City",
"Alexandria", "Allgood", "Alpine", "Andalusia", "Anniston", "Arab", "Arlington", "Ashford", "Ashland", "Ashville", "Athens", "Atmore", "Attalla", "Auburn", "Auburn University", "Autaugaville", "Axis", "Bay Minette", "Berry", "Bessemer", "Birmingham", "Blountsville", "Boaz", "Bremen", "Brewton", "Brookwood", "Brownsboro", "Bucks", "Buhl", "Butler", "Calera", "Calhoun",
"Camden", "Carrollton", "Centre", "Centreville", "Chapman", "Chelsea", "Cherokee", "Childersburg", "Clanton", "Clayton", "Clio", "Coffeeville", "Columbia", "Columbiana", "Cottondale", "Cottonwood", "Cowarts", "Creola", "Crossville", "Cullman", "Daleville", "Daphne", "Dauphin Island", "Deatsville", "Decatur", "Demopolis", "Dixons Mills", "Dothan", "Eastaboga", "Eclectic",
"Eight Mile", "Elba", "Elberta", "Enterprise", "Eufaula", "Eutaw", "Evergreen", "Excel", "Fairfield", "Fairhope", "Fayette", "Florence", "Foley", "Fruitdale", "Fort Deposit", "Fort Payne", "Fort Rucker", "Fulton", "Fultondale", "Gadsden", "Gardendale", "Geneva", "Glenwood", "Goodwater", "Gordo", "Grand Bay", "Graysville", "Greensboro", "Greenville", "Grove Hill", "Guin",
"Gulf Shores", "Guntersville", "Haleyville", "Hamilton", "Hanceville", "Hartselle", "Hatchechubbee", "Hayden", "Hayneville", "Hazel Green", "Headland", "Heflin", "Helena", "Hodges", "Hope Hull", "Huntsville", "Huxford", "Ider", "Jack", "Jackson", "Jacksonville", "Jasper", "Jefferson", "Kellyton", "Killen", "Laceys Spring", "La Fayette", "Lanett", "Leeds", "Leesburg",
"Lillian", "Lincoln", "Linden", "Lineville", "Livingston", "Loachapoka", "Locust Fork", "Loxley", "Luverne", "Madison", "Marion", "Mathews", "Millport", "Millry", "Mobile", "Monroeville", "Montevallo", "Montgomery", "Montrose", "Morris", "Moulton", "Munford", "Muscle Shoals", "New Brockton", "New Market", "Newton", "Newville", "Normal", "Northport", "Notasulga",
"Oakman", "Oneonta", "Opelika", "Opp", "Orange Beach", "Oxford", "Ozark", "Paint Rock", "Pelham", "Pell City", "Pennington", "Perdue Hill", "Phenix City", "Piedmont", "Pike Road", "Pine Hill", "Pinson", "Pleasant Grove", "Prattville", "Quinton", "Ragland", "Rainbow City", "Rainsville", "Ramer", "Red Bay", "Reform", "Roanoke", "Robertsdale", "Russellville", "Rutledge",
"Saginaw", "Saraland", "Scottsboro", "Selma", "Semmes", "Shannon", "Sheffield", "Shelby", "Spanish Fort", "Springville", "Sulligent", "Sumiton", "Summerdale", "Sycamore", "Sylacauga", "Talladega", "Tallassee", "Theodore", "Thomasville", "Toney", "Troy", "Trussville", "Tuscaloosa", "Tuscumbia", "Tuskegee", "Tuskegee University", "Union Springs", "Valley", "Vernon",
"Vinemont", "Wadley", "Walnut Grove", "Warrior", "Webb", "Wedowee", "Wetumpka", "Winfield", "York", "Adona", "Alexander", "Alma", "Altheimer", "Amity", "Arkadelphia", "Armorel", "Ash Flat", "Ashdown", "Augusta", "Bald Knob", "Barling", "Batesville", "Bauxite", "Bay", "Beebe", "Bella Vista", "Benton", "Bentonville", "Berryville", "Bigelow", "Blytheville", "Booneville",
"Bradford", "Branch", "Brinkley", "Brockwell", "Brookland", "Bryant", "Burdette", "Cabot", "Calico Rock", "Camden", "Carlisle", "Carthage", "Cave City", "Center Ridge", "Charleston", "Charlotte", "Cherokee Village", "Clarendon", "Clarksville", "Clinton", "Compton", "Conway", "Corning", "Crossett", "Danville", "Dardanelle", "De Queen", "DeWitt", "Decatur", "Dermott",
"Des Arc", "Dumas", "Dyess", "El Dorado", "Elm Springs", "England", "Enola", "Eureka Springs", "Fairfield Bay", "Farmington", "Fayetteville", "Flippin", "Floral", "Fordyce", "Forrest City", "Fountain Hill", "Friendship", "Fort Smith", "Gassville", "Gentry", "Gillham", "Glenwood", "Gould", "Grady", "Gravette", "Greenbrier", "Greenwood", "Guion", "Hackett", "Hamburg",
"Hardy", "Harrisburg", "Harrison", "Hartford", "Hattieville", "Hazen", "Heber Springs", "Hector", "Helena", "Higden", "Hope", "Hot Springs National Park", "Hot Springs Village", "Hoxie", "Humphrey", "Huntsville", "Imboden", "Jacksonville", "Jasper", "Jessieville", "Joiner", "Jonesboro", "Keiser", "Kensett", "Lake Village", "Lavaca", "Lead Hill", "Lepanto", "Leslie",
"Little Rock", "Little Rock Air Force Base", "Lockesburg", "London", "Lonoke", "Lowell", "Luxora", "Lynn", "Mabelvale", "Magnolia", "Malvern", "Mammoth Spring", "Mansfield", "Marianna", "Marion", "Marked Tree", "Marmaduke", "Marshall", "Maumelle", "Maynard", "McCrory", "McGehee", "McRae", "Melbourne", "Mena", "Monticello", "Morrilton", "Mount Holly", "Mount Ida",
"Mount Pleasant", "Mount Vernon", "Mountain Home", "Mountain View", "Mountainburg", "Nashville", "Newark", "Newport", "Norfork", "Norman", "North Little Rock", "Osceola", "Ozark", "Palestine", "Paragould", "Paris", "Pea Ridge", "Pearcy", "Piggott", "Pine Bluff", "Plainview", "Plumerville", "Pocahontas", "Poplar Grove", "Pottsville", "Prairie Grove", "Prescott",
"Quitman", "Rector", "Rison", "Rogers", "Romance", "Rosston", "Russellville", "Salem", "Saratoga", "Scotland", "Searcy", "Sheridan", "Sherwood", "Siloam Springs", "Smackover", "Springdale", "Stamps", "Star City", "Arkansas State University", "Stuttgart", "Subiaco", "Sulphur Rock", "Swifton", "Texarkana", "Timbo", "Tontitown", "Trumann", "Valley Springs", "Van Buren" };
return cities[RandNumber() % cities.Length];
}
// make a random social security number
public static SocialSecurityNumber GenerateSSN()
{
int G1 = RandNumber(1, 1000); // 999
int G2 = RandNumber(1, 100); // 99
int G3 = RandNumber(1, 10000); // 9999
// return a socialsecuritynumber
return new SocialSecurityNumber(G1, G2, G3);
}
// make a random phonenumber
public static PhoneNumber GeneratePhoneNumber()
{
int G1 = RandNumber(1, 1000); // 999
int G2 = RandNumber(1, 1000); // 999
int G3 = RandNumber(1, 10000); // 9999
// return a phonenumber
return new PhoneNumber(G1, G2, G3);
}
public static ZipCode GenerateZipCode()
{
int G1 = RandNumber(1, 100000); //99999
int G2 = RandNumber(1, 10000); //9999
return new ZipCode(G1, G2);
}
}
}
@@ -0,0 +1,116 @@
// Structured ints for things that are structured.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cerealization
{
[Serializable]
public class PhoneNumber
{
///<summary>
/// phone numbers are composed of three parts:
/// area code, phone prefix, line number
/// this aggregates all three
///</summary>
public int AreaCode { get; set; }
public int Prefix { get; set; }
public int LineNumber { get; set; }
new public string ToString
{
get
{
return string.Format("({0:D3}) {1:D3}-{2:D4}",AreaCode,Prefix,LineNumber);
}
set
{
}
}
public PhoneNumber(int area, int pre, int line)
{
AreaCode = area;
Prefix = pre;
LineNumber = line;
}
public PhoneNumber() // default constructor for XMLSerialization
{
}
}
[Serializable]
public class SocialSecurityNumber
{
///<summary>
/// Social Security Numbers are composed of 3 parts
/// Group 1 - 3 digits
/// Group 2 - 2 digits
/// Group 3 - 4 digits
/// this class aggregates all groups
///</summary>
public int GroupOne { get; set; }
public int GroupTwo { get; set; }
public int GroupThree { get; set; }
new public string ToString
{
get
{
return string.Format("{0:D3}-{1:D2}-{2:D4}", GroupOne, GroupTwo, GroupThree);
}
set
{
}
}
public SocialSecurityNumber(int g1, int g2, int g3)
{
GroupOne = g1;
GroupTwo = g2;
GroupThree = g3;
}
public SocialSecurityNumber() // default constructor for XMLSerialization
{
}
}
[Serializable]
public class ZipCode
{
/// <summary>
/// Zipcodes are composed of 3 parts
/// Zip code - Maximum of 5 digits
/// Plus four code - maximum of 4 digits
/// this class aggregates all parts
/// </summary>
public int Zip { get; set; }
public int PlusFour { get; set; }
new public string ToString
{
get
{
return string.Format("{0:D5}-{1:D4}", Zip, PlusFour);
}
set
{
}
}
public ZipCode(int zip, int four)
{
Zip = zip;
PlusFour = four;
}
public ZipCode() // default constructor for XMLSerialization
{
}
}
}
@@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Xml.Serialization;
namespace Cerealization
{
/// <summary>
/// Student class aggregates the following information:
/// Student ID, First Name, Middle Name, Last Name,
/// Social Secuirty Number, Address, City, State, Zipcode
/// and 2 phone numbers
/// </summary>
[Serializable]
public class Student
{
public int StudentID { get; set; }
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string LastName { get; set; }
public SocialSecurityNumber SSN { get; set; }
public string Address1 { get; set; }
public string Address2 { get; set; }
public string City { get; set; }
public string State { get; set; }
public ZipCode ZipCode { get; set; }
public PhoneNumber Phone1 { get; set; }
public PhoneNumber Phone2 { get; set; }
public Student(int id, string fn, string mn, string ln, SocialSecurityNumber ssn, string addr1, string addr2, string city, string state, ZipCode zip, PhoneNumber phone1, PhoneNumber phone2)
{
StudentID = id;
FirstName = fn;
MiddleName = mn;
LastName = ln;
SSN = ssn;
Address1 = addr1;
Address2 = addr2;
City = city;
State = state;
ZipCode = zip;
Phone1 = phone1;
Phone2 = phone2;
}
public Student() // default constructor for XMLSerialization
{
}
}
[Serializable]
[XmlRoot("Students_XML")]
public class CStudent
{
/// <summary>
/// The CStudent class is here to allow the XMLSerilizer
/// access to a List without having to loop thorugh the list
/// before writing it to a file. - This is essentially a
/// glue class.
/// </summary>
[XmlAttribute("Count")]
public int Count { get; set; }
[XmlArray("Student_List")]
[XmlArrayItem("Student")]
public List<Student> Students;
public CStudent(List<Student> stud)
{
Students = new List<Student>();
Students = stud;
}
public CStudent() // default constructor for XMLSerialization
{
Students = new List<Student>();
}
public void Add(Student s)
{
Students.Add(s);
Count = Students.Count;
}
}
}