Skip to content

Instantly share code, notes, and snippets.

View jtuttas's full-sized avatar

jtuttas jtuttas

  • http://www.mmbbs.de
View GitHub Profile
@jtuttas
jtuttas / oktal.ps1
Created September 5, 2014 12:24
Oktalzahlen Wandlung
[int]$z=0
$out=""
while ($z -le 0) {
$z=Read-Host "Dezimalzahl:"
}
$dezimal=$z
while ($z -gt 0) {
$diff=$z%8
$out=$out.Insert(0,$diff)
$z=($z-$diff)/8
public class Client implements Observer{
private String name;
private String pw;
public Client(String user,String pw) {
this.name=user;
this.pw=pw;
}
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Client c1 = new Client("Thomas","mmbbs");
Client c2= new Client("Frank","mbs");
Client c3= new Client("Simone","mmbbs");
@jtuttas
jtuttas / Main.java
Created September 14, 2014 13:43
Threads Fork and Join
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Zaehler z1 = new Zaehler("Nummer 1", 3);
Zaehler z2 = new Zaehler("Nummer 2", 6);
z1.start();
Write-Host "Zählen startet"
$z1 = Start-Job {
for ($i=0;$i -lt 3;$i++) {
"Zaehler 1 ist bei $i"
sleep 1
}
}
$z2 = Start-Job {
for ($i=0;$i -lt 6;$i++) {
"Zaehler 2 ist bei $i"
public class Fahrzeug {
private double gewicht;
private long laufleistung;
public double getGewicht() {
return gewicht;
}
public void setGewicht(double gewicht) {
this.gewicht = gewicht;
public class Fahrzeug {
private double gewicht;
private long laufleistung;
public double getGewicht() {
return gewicht;
}
public void setGewicht(double gewicht) {
this.gewicht = gewicht;
}
public long getLaufleistung() {
public class ObjTraining {
public ObjTraining() {
Fahrzeug fa1 = new Fahrzeug();
Fahrzeug fa2 = new Fahrzeug();
fa1.setGewicht(15.0);
fa2.setGewicht(20.0);
fa1.drive(300);
fa2.drive(2, 30);
fa1.drive(1,55);
@jtuttas
jtuttas / Fahrzeug.java
Created September 25, 2014 08:21
Aufgabe 3.1
public class Fahrzeug {
private double gewicht;
private long laufleistung;
public Fahrzeug (double gewicht) {
this.gewicht=gewicht;
}
public Fahrzeug (double gewicht, long laufleistung) {
this.gewicht=gewicht;
@jtuttas
jtuttas / Fahrzeug.java
Last active July 16, 2019 06:37
Aufgabe 4
public class Fahrzeug {
private double gewicht;
private long laufleistung;
public Fahrzeug (double gewicht) {
this.gewicht=gewicht;
}
public Fahrzeug (double gewicht, long laufleistung) {
this.gewicht=gewicht;