Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
voxel01 committed Oct 26, 2012
0 parents commit 179da8a
Show file tree
Hide file tree
Showing 50 changed files with 2,354 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
163 changes: 163 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
.builds
*.dotCover

## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp

# ReSharper is a .NET coding add-in
_ReSharper*

# Installshield output folder
[Ee]xpress

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Others
[Bb]in
[Oo]bj
sql
TestResults
*.Cache
ClientBin
stylecop.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML



############
## Windows
############

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg

# Mac crap
.DS_Store
90 changes: 90 additions & 0 deletions Konto20121026/Konto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Konto20121026
{
public class Konto
{
//Saldo des Kontos
private double saldo = 0;
//Zinssatz der bei dem Konto angewandt wird
private double zinssatz = 0;
//Inhaber des Kontos
private string inhaber;

/**
* überladene Konstruktoren für die Klasse
*/
public Konto(string inh)
{
this.inhaber = inh;
}
public Konto(string inh, Double saldo):this(inh)
{
this.saldo = saldo;
}
public Konto(string inh, Double saldo, Double zinssatz):this(inh,saldo)
{
this.zinssatz = zinssatz;
}
//Gibt das aktuelle Saldo reour
public double getSaldo()
{
return this.saldo;
}
//Hebt etwas vom Konto ab
public bool abheben(double wert)
{
this.saldo -= wert;
return true;
}
//Zahlt etwas auf das Konto ein
public bool einzahlen(double wert)
{
this.saldo += wert;
return true;
}
//Getter und Setter für den Inhaber des Kontos
public string Inhaber
{
get
{
return this.inhaber;
}
set
{
this.inhaber = value;
}
}
//Getter und Setter für den Zinssatz
public double Zinssatz
{
get
{
return this.zinssatz;
}
set
{
this.zinssatz = value;
}
}
//Überweist einen Betrag von einem Konto auf ein anderes
public void ueberweisenAuf(Konto kto, double wert)
{
this.abheben(wert);
kto.einzahlen(wert);
}
//Ausgabe der Kontodaten
public void ausgabe()
{
Console.WriteLine("Konto von "+this.inhaber+" mit Saldo "+ this.saldo.ToString());
}
//Berechnet die Zinsen auf dem Konto
public void zinsenBerechnen()
{
this.saldo += this.saldo / 100 * this.zinssatz;
}
}
}
58 changes: 58 additions & 0 deletions Konto20121026/Konto20121026.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?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>{31E6570E-FDA3-42C4-B26B-F0DF31369AE3}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Konto20121026</RootNamespace>
<AssemblyName>Konto20121026</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="Konto.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.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>
36 changes: 36 additions & 0 deletions Konto20121026/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Konto20121026
{
class Program
{
static void Main(string[] args)
{
Konto kto1 = new Konto("Max Mustermann",1000.0,10.0);
Konto kto2 = new Konto("Tester", 2000.0);

kto2.Zinssatz = 15.0;

kto1.ausgabe();
kto2.ausgabe();

Console.WriteLine("Vergebe die Zinsen für die Konten");
kto1.zinsenBerechnen();
kto2.zinsenBerechnen();

kto1.ausgabe();
kto2.ausgabe();

Console.WriteLine("Überweise 500 von kto 2 auf kto 1");
kto2.ueberweisenAuf(kto1, 500.0);

kto1.ausgabe();
kto2.ausgabe();


}
}
}
Loading

0 comments on commit 179da8a

Please sign in to comment.