Initial commit
This commit is contained in:
40
13.2-Superklass/13.2-Superklass.csproj
Normal file
40
13.2-Superklass/13.2-Superklass.csproj
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{07032C30-0742-4CFB-AC86-BD575D1B6D84}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Superklass</RootNamespace>
|
||||
<AssemblyName>13.2-Superklass</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="Superklass.cs" />
|
||||
<Compile Include="Hund.cs" />
|
||||
<Compile Include="Kanin.cs" />
|
||||
<Compile Include="Katt.cs" />
|
||||
<Compile Include="Husdjur.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
17
13.2-Superklass/13.2-Superklass.sln
Normal file
17
13.2-Superklass/13.2-Superklass.sln
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "13.2-Superklass", "13.2-Superklass.csproj", "{07032C30-0742-4CFB-AC86-BD575D1B6D84}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{07032C30-0742-4CFB-AC86-BD575D1B6D84}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{07032C30-0742-4CFB-AC86-BD575D1B6D84}.Debug|x86.Build.0 = Debug|x86
|
||||
{07032C30-0742-4CFB-AC86-BD575D1B6D84}.Release|x86.ActiveCfg = Release|x86
|
||||
{07032C30-0742-4CFB-AC86-BD575D1B6D84}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
16
13.2-Superklass/13.2-Superklass.userprefs
Normal file
16
13.2-Superklass/13.2-Superklass.userprefs
Normal file
@@ -0,0 +1,16 @@
|
||||
<Properties StartupItem="13.2-Superklass.csproj" RefactoringSettings.EnableRefactorings="True">
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="Superklass.cs">
|
||||
<Files>
|
||||
<File FileName="Superklass.cs" Line="27" Column="1" />
|
||||
<File FileName="Hund.cs" Line="8" Column="2" />
|
||||
<File FileName="Kanin.cs" Line="4" Column="13" />
|
||||
<File FileName="Katt.cs" Line="4" Column="13" />
|
||||
<File FileName="Husdjur.cs" Line="15" Column="2" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||
</Properties>
|
||||
10
13.2-Superklass/Hund.cs
Normal file
10
13.2-Superklass/Hund.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
public class Hund : Husdjur {
|
||||
|
||||
public void geLjud() {
|
||||
Console.WriteLine("Hunden skaller");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
23
13.2-Superklass/Husdjur.cs
Normal file
23
13.2-Superklass/Husdjur.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
public class Husdjur {
|
||||
private string namn;
|
||||
private int vikt;
|
||||
|
||||
public int getVikt() {
|
||||
return vikt;
|
||||
}
|
||||
|
||||
public void setVikt(int v) {
|
||||
vikt = v;
|
||||
}
|
||||
|
||||
public string getNamn() {
|
||||
return namn;
|
||||
}
|
||||
|
||||
public void setNamn(string n) {
|
||||
namn = n;
|
||||
}
|
||||
}
|
||||
|
||||
12
13.2-Superklass/Kanin.cs
Normal file
12
13.2-Superklass/Kanin.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
public class Kanin : Husdjur {
|
||||
public void geLjud() {
|
||||
Console.WriteLine("Kaninen later bara nar den ar radd");
|
||||
}
|
||||
|
||||
public void idissla() {
|
||||
Console.WriteLine("Kaninen tuggar som bara den...");
|
||||
}
|
||||
}
|
||||
|
||||
9
13.2-Superklass/Katt.cs
Normal file
9
13.2-Superklass/Katt.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
public class Katt : Husdjur {
|
||||
public void geLjud() {
|
||||
Console.WriteLine("Katten mjauar");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
28
13.2-Superklass/Superklass.cs
Normal file
28
13.2-Superklass/Superklass.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
class Superklass {
|
||||
public static void Main() {
|
||||
Hund h = new Hund();
|
||||
Kanin k = new Kanin();
|
||||
Katt c = new Katt();
|
||||
|
||||
h.setNamn("Fido");
|
||||
h.setVikt(18);
|
||||
|
||||
k.setNamn("Bambi");
|
||||
k.setVikt(2);
|
||||
|
||||
c.setNamn("Misse");
|
||||
c.setVikt(7);
|
||||
|
||||
Console.WriteLine("Hunden {0} har vikten {1}kg", h.getNamn(), h.getVikt());
|
||||
Console.WriteLine("Kaninen {0} har vikten {1}kg", k.getNamn(), k.getVikt());
|
||||
Console.WriteLine("Katten {0} har vikten {1}kg", c.getNamn(), c.getVikt());
|
||||
|
||||
h.geLjud();
|
||||
k.geLjud();
|
||||
c.geLjud();
|
||||
|
||||
k.idissla();
|
||||
}
|
||||
}
|
||||
BIN
13.2-Superklass/bin/Debug/13.2-Superklass.exe
Normal file
BIN
13.2-Superklass/bin/Debug/13.2-Superklass.exe
Normal file
Binary file not shown.
BIN
13.2-Superklass/bin/Debug/13.2-Superklass.pdb
Normal file
BIN
13.2-Superklass/bin/Debug/13.2-Superklass.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
C:\Users\Crille\CSharp\13.2-Superklass\bin\Debug\13.2-Superklass.exe
|
||||
C:\Users\Crille\CSharp\13.2-Superklass\bin\Debug\13.2-Superklass.pdb
|
||||
C:\Users\Crille\CSharp\13.2-Superklass\obj\x86\Debug\13.2-Superklass.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Crille\CSharp\13.2-Superklass\obj\x86\Debug\13.2-Superklass.exe
|
||||
C:\Users\Crille\CSharp\13.2-Superklass\obj\x86\Debug\13.2-Superklass.pdb
|
||||
Binary file not shown.
BIN
13.2-Superklass/obj/x86/Debug/13.2-Superklass.exe
Normal file
BIN
13.2-Superklass/obj/x86/Debug/13.2-Superklass.exe
Normal file
Binary file not shown.
BIN
13.2-Superklass/obj/x86/Debug/13.2-Superklass.pdb
Normal file
BIN
13.2-Superklass/obj/x86/Debug/13.2-Superklass.pdb
Normal file
Binary file not shown.
Reference in New Issue
Block a user