-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tarea: UML Class Diagram Relationships
Falta agregar los Diagramas al folder (los tengo en OSX)
- Loading branch information
Showing
11 changed files
with
283 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Express 2012 for Windows Desktop | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UMLClassDiagram", "Association\UMLClassDiagram.csproj", "{A663B49E-02C7-4718-B780-1A04D43F42AA}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A663B49E-02C7-4718-B780-1A04D43F42AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A663B49E-02C7-4718-B780-1A04D43F42AA}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A663B49E-02C7-4718-B780-1A04D43F42AA}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A663B49E-02C7-4718-B780-1A04D43F42AA}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
19 changes: 19 additions & 0 deletions
19
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/Aficionado.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Association | ||
{ | ||
public class Aficionado | ||
{ | ||
public string equipo { get; set; } | ||
|
||
public void AsistirAEstadio(Estadio obj) | ||
{ | ||
Console.Write("Aficionado: Creo que ire al estadio un ratillo\n"); | ||
obj.aficionadosAdentro++; | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/App.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
</startup> | ||
</configuration> |
30 changes: 30 additions & 0 deletions
30
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/Estadio.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Association | ||
{ | ||
public class Estadio | ||
{ | ||
public int aficionadosAdentro { get; set; } | ||
|
||
public void Invitar(Aficionado obj) | ||
{ | ||
Console.Write("Estadio Parlante: Porfavor ven!\n"); | ||
} | ||
|
||
public void Destruir(Gradas obj, Estadio estadio) | ||
{ | ||
Console.Write("Estadio hico Selfdestruct: Destruyeron todo de todo\n"); | ||
obj.existentes = false; | ||
estadio = null; | ||
} | ||
|
||
public void ContarAficionados() | ||
{ | ||
Console.Write("Hay {0} aficionados adentro\n", aficionadosAdentro.ToString()); | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/Gradas.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Association | ||
{ | ||
public class Gradas | ||
{ | ||
public bool existentes { get; set; } | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/HijaAficionado.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Association | ||
{ | ||
class HijaAficionado : Aficionado | ||
{ | ||
|
||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/HijoAficionado.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Association | ||
{ | ||
class HijoAficionado : Aficionado | ||
{ | ||
|
||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Association | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
//Association! | ||
|
||
Estadio objEstadio = new Estadio(); | ||
Aficionado objAficionado = new Aficionado(); | ||
|
||
objEstadio.Invitar(objAficionado); | ||
objAficionado.AsistirAEstadio(objEstadio); | ||
|
||
//Agregation! | ||
VendedorPizza objVendedorPizza = new VendedorPizza(); | ||
|
||
objVendedorPizza.venderPizza(objEstadio); | ||
|
||
//Dependecy! | ||
objEstadio.ContarAficionados(); | ||
|
||
//Generalization! | ||
HijaAficionado objHijaAficionado = new HijaAficionado(); | ||
HijoAficionado objHijoAficionado = new HijoAficionado(); | ||
|
||
objAficionado.equipo = "Xolos"; | ||
objHijaAficionado.equipo = "Real Madrid..."; | ||
objHijoAficionado.equipo = "Barcelona, el mejor equipo de la historia!"; | ||
|
||
Console.Write("El papa es aficionado de {0}, la hija de {1} y el hijo de {2}\n", objAficionado.equipo, objHijaAficionado.equipo, objHijoAficionado.equipo); | ||
|
||
//Composition! | ||
|
||
Gradas objGradas = new Gradas(); | ||
objGradas.existentes = true; | ||
|
||
objEstadio.Destruir(objGradas, objEstadio); | ||
if (objGradas.existentes == false) | ||
{ | ||
Console.Write("Tambien murieron las gradas"); | ||
} | ||
|
||
Console.ReadLine(); | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("Association")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("Association")] | ||
[assembly: AssemblyCopyright("Copyright © 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("57c3ce6c-7817-46f6-b379-a70c570a2f2a")] | ||
|
||
// 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")] |
64 changes: 64 additions & 0 deletions
64
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/UMLClassDiagram.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{A663B49E-02C7-4718-B780-1A04D43F42AA}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Association</RootNamespace> | ||
<AssemblyName>Association</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</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|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</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="Aficionado.cs" /> | ||
<Compile Include="Estadio.cs" /> | ||
<Compile Include="Gradas.cs" /> | ||
<Compile Include="HijaAficionado.cs" /> | ||
<Compile Include="HijoAficionado.cs" /> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="VendedorPizza.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
</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> |
16 changes: 16 additions & 0 deletions
16
Ejercicios Clase/19971_OmarGudiño/UMLClassDiagram/Association/VendedorPizza.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Association | ||
{ | ||
public class VendedorPizza | ||
{ | ||
public void venderPizza(Estadio obj) | ||
{ | ||
Console.Write("Estoy vendiendo pizzas en este estadio\n"); | ||
} | ||
} | ||
} |