diff --git a/C#_Mono/PlanetSimulation/.vs/PlanetSimulation/v14/.suo b/C#_Mono/PlanetSimulation/.vs/PlanetSimulation/v14/.suo new file mode 100644 index 0000000..3fbaf39 Binary files /dev/null and b/C#_Mono/PlanetSimulation/.vs/PlanetSimulation/v14/.suo differ diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation.sln b/C#_Mono/PlanetSimulation/PlanetSimulation.sln new file mode 100644 index 0000000..026b0e8 --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanetSimulation", "PlanetSimulation\PlanetSimulation.csproj", "{2877F3FC-9913-4CA7-91BC-C358597CCCB9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2877F3FC-9913-4CA7-91BC-C358597CCCB9}.Debug|x86.ActiveCfg = Debug|x86 + {2877F3FC-9913-4CA7-91BC-C358597CCCB9}.Debug|x86.Build.0 = Debug|x86 + {2877F3FC-9913-4CA7-91BC-C358597CCCB9}.Release|x86.ActiveCfg = Release|x86 + {2877F3FC-9913-4CA7-91BC-C358597CCCB9}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = PlanetSimulation\PlanetSimulation.csproj + EndGlobalSection +EndGlobal diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/Camera2D.cs b/C#_Mono/PlanetSimulation/PlanetSimulation/Camera2D.cs new file mode 100644 index 0000000..2e9cb7d --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/Camera2D.cs @@ -0,0 +1,56 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace PlanetSimulation +{ + public class Camera2d + { + protected float _zoom; // Camera Zoom + public Matrix _transform; // Matrix Transform + public Vector2 _pos; // Camera Position + protected float _rotation; // Camera Rotation + + public Camera2d() + { + _zoom = 1.0f; + _rotation = 0.0f; + _pos = Vector2.Zero; + } + // Sets and gets zoom + public float Zoom + { + get { return _zoom; } + set { _zoom = value; if (_zoom < 0.1f) _zoom = 0.1f; } // Negative zoom will flip image + } + + public float Rotation + { + get {return _rotation; } + set { _rotation = value; } + } + // Auxiliary function to move the camera + public void Move(Vector2 amount) + { + _pos += amount; + } + // Get set position + public Vector2 Pos + { + get{ return _pos; } + set{ _pos = value; } + } + + public Matrix get_transformation(GraphicsDevice graphicsDevice) + { + _transform = // Thanks to o KB o for this solution + Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) * + Matrix.CreateRotationZ(Rotation) * + Matrix.CreateScale(new Vector3(Zoom, Zoom, 1)) * + Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Width * 0.5f, graphicsDevice.Viewport.Height * 0.5f, 0)); + return _transform; + } + + } +} + diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/Game1.cs b/C#_Mono/PlanetSimulation/PlanetSimulation/Game1.cs new file mode 100644 index 0000000..aabf6f3 --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/Game1.cs @@ -0,0 +1,110 @@ +#region Using Statements +using System; + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Storage; +using Microsoft.Xna.Framework.Input; +using C3.XNA; + +#endregion + +namespace PlanetSimulation +{ + /// + /// This is the main type for your game + /// + public class Game1 : Game + { + Camera2d cam; + + PlanetManager pManager; + + GraphicsDeviceManager graphics; + SpriteBatch spriteBatch; + + public Game1 () + { + graphics = new GraphicsDeviceManager (this); + Content.RootDirectory = "Content"; + graphics.IsFullScreen = true; + //graphics.ApplyChanges(); + } + + /// + /// Allows the game to perform any initialization it needs to before starting to run. + /// This is where it can query for any required services and load any non-graphic + /// related content. Calling base.Initialize will enumerate through any components + /// and initialize them as well. + /// + protected override void Initialize () + { + // TODO: Add your initialization logic here + + pManager = new PlanetManager(); + base.Initialize (); + cam = new Camera2d(); + + } + + /// + /// LoadContent will be called once per game and is the place to load + /// all of your content. + /// + protected override void LoadContent () + { + // Create a new SpriteBatch, which can be used to draw textures. + spriteBatch = new SpriteBatch (GraphicsDevice); + + //TODO: use this.Content to load your game content here + } + + /// + /// Allows the game to run logic such as updating the world, + /// checking for collisions, gathering input, and playing audio. + /// + /// Provides a snapshot of timing values. + protected override void Update (GameTime gameTime) + { + // For Mobile devices, this logic will close the Game when the Back button is pressed + if (GamePad.GetState (PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { + Exit (); + } + + if(Keyboard.GetState().IsKeyDown(Keys.OemMinus)) + cam.Zoom -= 0.025f; + if(Keyboard.GetState().IsKeyDown(Keys.OemPlus)) + cam.Zoom += 0.025f; + + if(Keyboard.GetState().IsKeyDown(Keys.Down)) + cam.Pos = Vector2.Add(cam.Pos, new Vector2(0,cam.Zoom * 20)); + if(Keyboard.GetState().IsKeyDown(Keys.Up)) + cam.Pos = Vector2.Add(cam.Pos, new Vector2(0,-cam.Zoom * 20)); + if(Keyboard.GetState().IsKeyDown(Keys.Right)) + cam.Pos = Vector2.Add(cam.Pos, new Vector2(cam.Zoom * 20 ,0)); + if(Keyboard.GetState().IsKeyDown(Keys.Left)) + cam.Pos = Vector2.Add(cam.Pos, new Vector2(-cam.Zoom * 20 ,0)); + + pManager.Update(gameTime); + // TODO: Add your update logic here + base.Update (gameTime); + } + + /// + /// This is called when the game should draw itself. + /// + /// Provides a snapshot of timing values. + protected override void Draw (GameTime gameTime) + { + graphics.GraphicsDevice.Clear (Color.Black); + //TODO: Add your drawing code here + spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend, null, null, null, null, + cam.get_transformation(GraphicsDevice /*Send the variable that has your graphic device here*/)); + + pManager.Draw(spriteBatch); + spriteBatch.End(); + base.Draw (gameTime); + } + } +} + diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/Icon.png b/C#_Mono/PlanetSimulation/PlanetSimulation/Icon.png new file mode 100644 index 0000000..c57cf36 Binary files /dev/null and b/C#_Mono/PlanetSimulation/PlanetSimulation/Icon.png differ diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/Planet.cs b/C#_Mono/PlanetSimulation/PlanetSimulation/Planet.cs new file mode 100644 index 0000000..7396ce7 --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/Planet.cs @@ -0,0 +1,136 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using C3.XNA; +using System.Collections.Generic; + +namespace PlanetSimulation +{ + public class Planet + { + private long mass; public long Mass { + get{ return mass;} + set{ mass = value;} + } + private long radius; public long Radius { + get{ return radius;} + set{ radius = value;} + } + private Vector2 center; public Vector2 Center { get{return center;}} + + private List forces; public List Forces { + get { return forces; } + set{ forces = value;} + } + private Vector2 acceleration; + private Vector2 velocity; public Vector2 Velocity{ get{ return velocity;}} + + + /// + /// Initializes a new instance of the class. + /// + /// + /// Center of the planet + /// + /// + /// Mass of the Planet + /// + /// + /// Radius of the planet + /// + public Planet (Vector2 center, long mass, long radius) + { + this.velocity = Vector2.Zero; + + this.mass = mass; + this.radius = radius; + this.center = center; + this.forces = new List(); + this.acceleration = Vector2.Zero; + } + /// + /// Initializes a new instance of the class. + /// + /// + /// Center of the planet + /// + /// + /// Mass of the planet + /// + /// + /// Radius of the planet + /// + /// + /// Velocity of the planet + /// + public Planet (Vector2 center, long mass, long radius, Vector2 velocity) + { + this.velocity = velocity; + + this.mass = mass; + this.radius = radius; + this.center = center; + this.forces = new List(); + this.acceleration = Vector2.Zero; + } + + public void Update (GameTime gameTime) + { + calcAcceleration(); + calcVelocity(gameTime); + move(gameTime); + } + public void Draw(SpriteBatch spriteBatch) + { + spriteBatch.DrawCircle(center, radius, (int)radius, Color.Red); + /*foreach (var f in forces) { + spriteBatch.DrawLine(center, Vector2.Add(center, Vector2.Multiply(Vector2.Normalize(f), 100)), Color.Green); + //spriteBatch.DrawLine(center, Vector2.Add(center, f), Color.Green); + }*/ + forces.Clear(); + //Draw Acceleration + spriteBatch.DrawLine(center, Vector2.Add(center, Vector2.Multiply(acceleration, 1)), Color.Orange); + //Draw Velocity + spriteBatch.DrawLine(center, Vector2.Add(center, velocity), Color.White); + } + + /// + /// Moves the Planet according to it's velocity. + /// + /// + /// GameTime element from MonoGame/XNA + /// + private void move (GameTime gameTime) + { + float elapsedSeconds = (float)gameTime.ElapsedGameTime.Milliseconds / 1000; + center = Vector2.Add(center, Vector2.Multiply(velocity, elapsedSeconds)); + } + /// + /// Updates the Velocity of the Planet by using the acceleration. + /// + /// + /// GameTime element from MonoGame/XNA + /// + private void calcVelocity (GameTime gameTime) + { + float elapsedSeconds = (float)gameTime.ElapsedGameTime.Milliseconds / 1000; + + velocity = Vector2.Add(velocity, Vector2.Multiply(acceleration, elapsedSeconds)); + } + /// + /// Calculates the acceleration out of all occouring forces which are saved in the List forces which consists of 2D Vectors. + /// + private void calcAcceleration() + { + Vector2 f = Vector2.Zero; + foreach(Vector2 v in forces) + { + f = Vector2.Add(f,v); + } + + //F = m x a <=> F/m = a + acceleration = Vector2.Divide(f,mass); + } + } +} + diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/PlanetManager.cs b/C#_Mono/PlanetSimulation/PlanetSimulation/PlanetManager.cs new file mode 100644 index 0000000..ed1c74b --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/PlanetManager.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace PlanetSimulation +{ + public class PlanetManager + { + public const float G = 0.02f; + private Rectangle boundsOfUniverse; + List planets; + public PlanetManager () + { + int size = 5000; + boundsOfUniverse = new Rectangle(-size,-size, 2*size, 2*size); + + + Random random = new Random(); + + planets = new List(); + + //planets.Add(new Planet(Vector2.Zero, 30000, 100, new Vector2(0,0))); + //planets.Add(new Planet(new Vector2(0,300), 1000, 20, new Vector2(20,0))); + //p.Add(new Planet(new Vector2(0,500), 20, 5, new Vector2(75,0))); + for (int i = 0; i < 200; i++) { + + int radius = random.Next(1,40); + planets.Add(new Planet(new Vector2(random.Next(boundsOfUniverse.X, boundsOfUniverse.Width + boundsOfUniverse.X), + random.Next(boundsOfUniverse.Y, boundsOfUniverse.Height + boundsOfUniverse.Y)) + ,(radius*radius)*6, radius + ,new Vector2(random.Next(-50,50),random.Next(-50,50)))); + } + } + public void Update (GameTime gameTime) + { + for (int i = 0; i < (planets.Count -1); i++) { + for (int j = i+1; j < planets.Count; j++) { + calcForce (planets[i], planets[j]); + checkANDcalcCollision(planets[i], planets[j]); + } + } + foreach (Planet planet in planets) { + planet.Update(gameTime); + } + } + public void Draw(SpriteBatch spriteBatch) + { + foreach(Planet planet in planets) + { + planet.Draw(spriteBatch); + } + } + + /// + /// Checks if a Collision occours between the two planets occours and + /// if they collide it calculates the Impact of the collision and the resulting force. + /// + /// + /// first planet + /// + /// + /// second plane + /// + private void checkANDcalcCollision (Planet p, Planet q) + { + var dx = p.Center.X - q.Center.X; + var dy = p.Center.Y - q.Center.Y; + var dist = p.Radius + q.Radius; + + if (dx * dx + dy * dy <= dist * dist) { + //The planets Crash... + + Vector2 v = Vector2.Add(Vector2.Multiply(p.Velocity,((float)p.Mass/(p.Mass + q.Mass))), Vector2.Multiply(q.Velocity,((float)q.Mass/(q.Mass + p.Mass)))); + Vector2 center = (p.Mass > q.Mass)?p.Center:q.Center; + long r = (long)Math.Sqrt((p.Radius*p.Radius + q.Radius* q.Radius)); + + Planet _tmp = new Planet(center, p.Mass + q.Mass, r, v); + planets.Add(_tmp); + planets.Remove(p); + planets.Remove(q); + //Insert What happens when the planets crash here + } + } + /// +/// Calculates the force of gravity which occours between the two planets +/// and adds it to the List of Forces of each Planet +/// +/// +/// first planet. +/// +/// +/// second planet. +/// + private void calcForce(Planet p, Planet q) + { + //http://goo.gl/Yt6vdj Newtons law of Gravity + Vector2 direction = Vector2.Add(-p.Center,q.Center); + float F = G* ((p.Mass * q.Mass)/(Vector2.Distance(p.Center,q.Center))); + + Vector2 Force = Vector2.Multiply(Vector2.Normalize(direction), F); + p.Forces.Add(Force); + q.Forces.Add(Vector2.Multiply(Force, -1f)); + } + + } +} + diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/PlanetSimulation.csproj b/C#_Mono/PlanetSimulation/PlanetSimulation/PlanetSimulation.csproj new file mode 100644 index 0000000..64f73c8 --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/PlanetSimulation.csproj @@ -0,0 +1,57 @@ + + + + Debug + x86 + 10.0.0 + 2.0 + {2877F3FC-9913-4CA7-91BC-C358597CCCB9} + {9B831FEF-F496-498F-9FE8-180DA5CB4258};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Exe + PlanetSimulation + Linux + PlanetSimulation + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + x86 + false + + + none + true + bin\Release + prompt + 4 + x86 + false + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/Primitives2D.cs b/C#_Mono/PlanetSimulation/PlanetSimulation/Primitives2D.cs new file mode 100644 index 0000000..e647ae0 --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/Primitives2D.cs @@ -0,0 +1,539 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace C3.XNA +{ + /// + /// + public static class Primitives2D + { + + + #region Private Members + + private static readonly Dictionary> circleCache = new Dictionary>(); + //private static readonly Dictionary> arcCache = new Dictionary>(); + private static Texture2D pixel; + + #endregion + + + #region Private Methods + + private static void CreateThePixel(SpriteBatch spriteBatch) + { + pixel = new Texture2D(spriteBatch.GraphicsDevice, 1, 1, false, SurfaceFormat.Color); + pixel.SetData(new[]{ Color.White }); + } + + + /// + /// Draws a list of connecting points + /// + /// The destination drawing surface + /// /// Where to position the points + /// The points to connect with lines + /// The color to use + /// The thickness of the lines + private static void DrawPoints(SpriteBatch spriteBatch, Vector2 position, List points, Color color, float thickness) + { + if (points.Count < 2) + return; + + for (int i = 1; i < points.Count; i++) + { + DrawLine(spriteBatch, points[i - 1] + position, points[i] + position, color, thickness); + } + } + + + /// + /// Creates a list of vectors that represents a circle + /// + /// The radius of the circle + /// The number of sides to generate + /// A list of vectors that, if connected, will create a circle + private static List CreateCircle(double radius, int sides) + { + // Look for a cached version of this circle + String circleKey = radius + "x" + sides; + if (circleCache.ContainsKey(circleKey)) + { + return circleCache[circleKey]; + } + + List vectors = new List(); + + const double max = 2.0 * Math.PI; + double step = max / sides; + + for (double theta = 0.0; theta < max; theta += step) + { + vectors.Add(new Vector2((float)(radius * Math.Cos(theta)), (float)(radius * Math.Sin(theta)))); + } + + // then add the first vector again so it's a complete loop + vectors.Add(new Vector2((float)(radius * Math.Cos(0)), (float)(radius * Math.Sin(0)))); + + // Cache this circle so that it can be quickly drawn next time + circleCache.Add(circleKey, vectors); + + return vectors; + } + + + /// + /// Creates a list of vectors that represents an arc + /// + /// The radius of the arc + /// The number of sides to generate in the circle that this will cut out from + /// The starting angle of arc, 0 being to the east, increasing as you go clockwise + /// The radians to draw, clockwise from the starting angle + /// A list of vectors that, if connected, will create an arc + private static List CreateArc(float radius, int sides, float startingAngle, float radians) + { + List points = new List(); + points.AddRange(CreateCircle(radius, sides)); + points.RemoveAt(points.Count - 1); // remove the last point because it's a duplicate of the first + + // The circle starts at (radius, 0) + double curAngle = 0.0; + double anglePerSide = MathHelper.TwoPi / sides; + + // "Rotate" to the starting point + while ((curAngle + (anglePerSide / 2.0)) < startingAngle) + { + curAngle += anglePerSide; + + // move the first point to the end + points.Add(points[0]); + points.RemoveAt(0); + } + + // Add the first point, just in case we make a full circle + points.Add(points[0]); + + // Now remove the points at the end of the circle to create the arc + int sidesInArc = (int)((radians / anglePerSide) + 0.5); + points.RemoveRange(sidesInArc + 1, points.Count - sidesInArc - 1); + + return points; + } + + #endregion + + + #region FillRectangle + + /// + /// Draws a filled rectangle + /// + /// The destination drawing surface + /// The rectangle to draw + /// The color to draw the rectangle in + public static void FillRectangle(this SpriteBatch spriteBatch, Rectangle rect, Color color) + { + if (pixel == null) + { + CreateThePixel(spriteBatch); + } + + // Simply use the function already there + spriteBatch.Draw(pixel, rect, color); + } + + + /// + /// Draws a filled rectangle + /// + /// The destination drawing surface + /// The rectangle to draw + /// The color to draw the rectangle in + /// The angle in radians to draw the rectangle at + public static void FillRectangle(this SpriteBatch spriteBatch, Rectangle rect, Color color, float angle) + { + if (pixel == null) + { + CreateThePixel(spriteBatch); + } + + spriteBatch.Draw(pixel, rect, null, color, angle, Vector2.Zero, SpriteEffects.None, 0); + } + + + /// + /// Draws a filled rectangle + /// + /// The destination drawing surface + /// Where to draw + /// The size of the rectangle + /// The color to draw the rectangle in + public static void FillRectangle(this SpriteBatch spriteBatch, Vector2 location, Vector2 size, Color color) + { + FillRectangle(spriteBatch, location, size, color, 0.0f); + } + + + /// + /// Draws a filled rectangle + /// + /// The destination drawing surface + /// Where to draw + /// The size of the rectangle + /// The angle in radians to draw the rectangle at + /// The color to draw the rectangle in + public static void FillRectangle(this SpriteBatch spriteBatch, Vector2 location, Vector2 size, Color color, float angle) + { + if (pixel == null) + { + CreateThePixel(spriteBatch); + } + + // stretch the pixel between the two vectors + spriteBatch.Draw(pixel, + location, + null, + color, + angle, + Vector2.Zero, + size, + SpriteEffects.None, + 0); + } + + + /// + /// Draws a filled rectangle + /// + /// The destination drawing surface + /// The X coord of the left side + /// The Y coord of the upper side + /// Width + /// Height + /// The color to draw the rectangle in + public static void FillRectangle(this SpriteBatch spriteBatch, float x, float y, float w, float h, Color color) + { + FillRectangle(spriteBatch, new Vector2(x, y), new Vector2(w, h), color, 0.0f); + } + + + /// + /// Draws a filled rectangle + /// + /// The destination drawing surface + /// The X coord of the left side + /// The Y coord of the upper side + /// Width + /// Height + /// The color to draw the rectangle in + /// The angle of the rectangle in radians + public static void FillRectangle(this SpriteBatch spriteBatch, float x, float y, float w, float h, Color color, float angle) + { + FillRectangle(spriteBatch, new Vector2(x, y), new Vector2(w, h), color, angle); + } + + #endregion + + + #region DrawRectangle + + /// + /// Draws a rectangle with the thickness provided + /// + /// The destination drawing surface + /// The rectangle to draw + /// The color to draw the rectangle in + public static void DrawRectangle(this SpriteBatch spriteBatch, Rectangle rect, Color color) + { + DrawRectangle(spriteBatch, rect, color, 1.0f); + } + + + /// + /// Draws a rectangle with the thickness provided + /// + /// The destination drawing surface + /// The rectangle to draw + /// The color to draw the rectangle in + /// The thickness of the lines + public static void DrawRectangle(this SpriteBatch spriteBatch, Rectangle rect, Color color, float thickness) + { + + // TODO: Handle rotations + // TODO: Figure out the pattern for the offsets required and then handle it in the line instead of here + + DrawLine(spriteBatch, new Vector2(rect.X, rect.Y), new Vector2(rect.Right, rect.Y), color, thickness); // top + DrawLine(spriteBatch, new Vector2(rect.X + 1f, rect.Y), new Vector2(rect.X + 1f, rect.Bottom + thickness), color, thickness); // left + DrawLine(spriteBatch, new Vector2(rect.X, rect.Bottom), new Vector2(rect.Right, rect.Bottom), color, thickness); // bottom + DrawLine(spriteBatch, new Vector2(rect.Right + 1f, rect.Y), new Vector2(rect.Right + 1f, rect.Bottom + thickness), color, thickness); // right + } + + + /// + /// Draws a rectangle with the thickness provided + /// + /// The destination drawing surface + /// Where to draw + /// The size of the rectangle + /// The color to draw the rectangle in + public static void DrawRectangle(this SpriteBatch spriteBatch, Vector2 location, Vector2 size, Color color) + { + DrawRectangle(spriteBatch, new Rectangle((int)location.X, (int)location.Y, (int)size.X, (int)size.Y), color, 1.0f); + } + + + /// + /// Draws a rectangle with the thickness provided + /// + /// The destination drawing surface + /// Where to draw + /// The size of the rectangle + /// The color to draw the rectangle in + /// The thickness of the line + public static void DrawRectangle(this SpriteBatch spriteBatch, Vector2 location, Vector2 size, Color color, float thickness) + { + DrawRectangle(spriteBatch, new Rectangle((int)location.X, (int)location.Y, (int)size.X, (int)size.Y), color, thickness); + } + + #endregion + + + #region DrawLine + + /// + /// Draws a line from point1 to point2 with an offset + /// + /// The destination drawing surface + /// The X coord of the first point + /// The Y coord of the first point + /// The X coord of the second point + /// The Y coord of the second point + /// The color to use + public static void DrawLine(this SpriteBatch spriteBatch, float x1, float y1, float x2, float y2, Color color) + { + DrawLine(spriteBatch, new Vector2(x1, y1), new Vector2(x2, y2), color, 1.0f); + } + + + /// + /// Draws a line from point1 to point2 with an offset + /// + /// The destination drawing surface + /// The X coord of the first point + /// The Y coord of the first point + /// The X coord of the second point + /// The Y coord of the second point + /// The color to use + /// The thickness of the line + public static void DrawLine(this SpriteBatch spriteBatch, float x1, float y1, float x2, float y2, Color color, float thickness) + { + DrawLine(spriteBatch, new Vector2(x1, y1), new Vector2(x2, y2), color, thickness); + } + + + /// + /// Draws a line from point1 to point2 with an offset + /// + /// The destination drawing surface + /// The first point + /// The second point + /// The color to use + public static void DrawLine(this SpriteBatch spriteBatch, Vector2 point1, Vector2 point2, Color color) + { + DrawLine(spriteBatch, point1, point2, color, 1.0f); + } + + + /// + /// Draws a line from point1 to point2 with an offset + /// + /// The destination drawing surface + /// The first point + /// The second point + /// The color to use + /// The thickness of the line + public static void DrawLine(this SpriteBatch spriteBatch, Vector2 point1, Vector2 point2, Color color, float thickness) + { + // calculate the distance between the two vectors + float distance = Vector2.Distance(point1, point2); + + // calculate the angle between the two vectors + float angle = (float)Math.Atan2(point2.Y - point1.Y, point2.X - point1.X); + + DrawLine(spriteBatch, point1, distance, angle, color, thickness); + } + + + /// + /// Draws a line from point1 to point2 with an offset + /// + /// The destination drawing surface + /// The starting point + /// The length of the line + /// The angle of this line from the starting point in radians + /// The color to use + public static void DrawLine(this SpriteBatch spriteBatch, Vector2 point, float length, float angle, Color color) + { + DrawLine(spriteBatch, point, length, angle, color, 1.0f); + } + + + /// + /// Draws a line from point1 to point2 with an offset + /// + /// The destination drawing surface + /// The starting point + /// The length of the line + /// The angle of this line from the starting point + /// The color to use + /// The thickness of the line + public static void DrawLine(this SpriteBatch spriteBatch, Vector2 point, float length, float angle, Color color, float thickness) + { + if (pixel == null) + { + CreateThePixel(spriteBatch); + } + + // stretch the pixel between the two vectors + spriteBatch.Draw(pixel, + point, + null, + color, + angle, + Vector2.Zero, + new Vector2(length, thickness), + SpriteEffects.None, + 0); + } + + #endregion + + + #region PutPixel + + public static void PutPixel(this SpriteBatch spriteBatch, float x, float y, Color color) + { + PutPixel(spriteBatch, new Vector2(x, y), color); + } + + + public static void PutPixel(this SpriteBatch spriteBatch, Vector2 position, Color color) + { + if (pixel == null) + { + CreateThePixel(spriteBatch); + } + + spriteBatch.Draw(pixel, position, color); + } + + #endregion + + + #region DrawCircle + + /// + /// Draw a circle + /// + /// The destination drawing surface + /// The center of the circle + /// The radius of the circle + /// The number of sides to generate + /// The color of the circle + public static void DrawCircle(this SpriteBatch spriteBatch, Vector2 center, float radius, int sides, Color color) + { + DrawPoints(spriteBatch, center, CreateCircle(radius, sides), color, 1.0f); + } + + + /// + /// Draw a circle + /// + /// The destination drawing surface + /// The center of the circle + /// The radius of the circle + /// The number of sides to generate + /// The color of the circle + /// The thickness of the lines used + public static void DrawCircle(this SpriteBatch spriteBatch, Vector2 center, float radius, int sides, Color color, float thickness) + { + DrawPoints(spriteBatch, center, CreateCircle(radius, sides), color, thickness); + } + + + /// + /// Draw a circle + /// + /// The destination drawing surface + /// The center X of the circle + /// The center Y of the circle + /// The radius of the circle + /// The number of sides to generate + /// The color of the circle + public static void DrawCircle(this SpriteBatch spriteBatch, float x, float y, float radius, int sides, Color color) + { + DrawPoints(spriteBatch, new Vector2(x, y), CreateCircle(radius, sides), color, 1.0f); + } + + + /// + /// Draw a circle + /// + /// The destination drawing surface + /// The center X of the circle + /// The center Y of the circle + /// The radius of the circle + /// The number of sides to generate + /// The color of the circle + /// The thickness of the lines used + public static void DrawCircle(this SpriteBatch spriteBatch, float x, float y, float radius, int sides, Color color, float thickness) + { + DrawPoints(spriteBatch, new Vector2(x, y), CreateCircle(radius, sides), color, thickness); + } + + #endregion + + + #region DrawArc + + /// + /// Draw a arc + /// + /// The destination drawing surface + /// The center of the arc + /// The radius of the arc + /// The number of sides to generate + /// The starting angle of arc, 0 being to the east, increasing as you go clockwise + /// The number of radians to draw, clockwise from the starting angle + /// The color of the arc + public static void DrawArc(this SpriteBatch spriteBatch, Vector2 center, float radius, int sides, float startingAngle, float radians, Color color) + { + DrawArc(spriteBatch, center, radius, sides, startingAngle, radians, color, 1.0f); + } + + + /// + /// Draw a arc + /// + /// The destination drawing surface + /// The center of the arc + /// The radius of the arc + /// The number of sides to generate + /// The starting angle of arc, 0 being to the east, increasing as you go clockwise + /// The number of radians to draw, clockwise from the starting angle + /// The color of the arc + /// The thickness of the arc + public static void DrawArc(this SpriteBatch spriteBatch, Vector2 center, float radius, int sides, float startingAngle, float radians, Color color, float thickness) + { + List arc = CreateArc(radius, sides, startingAngle, radians); + //List arc = CreateArc2(radius, sides, startingAngle, degrees); + DrawPoints(spriteBatch, center, arc, color, thickness); + } + + #endregion + + + } +} \ No newline at end of file diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/Program.cs b/C#_Mono/PlanetSimulation/PlanetSimulation/Program.cs new file mode 100644 index 0000000..f0625de --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/Program.cs @@ -0,0 +1,24 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; + +#endregion + +namespace PlanetSimulation +{ + static class Program + { + private static Game1 game; + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main () + { + game = new Game1 (); + game.Run (); + } + } +} diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/Properties/AssemblyInfo.cs b/C#_Mono/PlanetSimulation/PlanetSimulation/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7f62166 --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("PlanetSimulation")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("hannes")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.0")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/Lidgren.Network.dll b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/Lidgren.Network.dll new file mode 100644 index 0000000..a703f66 Binary files /dev/null and b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/Lidgren.Network.dll differ diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/MonoGame.Framework.dll b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/MonoGame.Framework.dll new file mode 100644 index 0000000..65bf7c3 Binary files /dev/null and b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/MonoGame.Framework.dll differ diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/OpenTK.dll b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/OpenTK.dll new file mode 100644 index 0000000..b1cd2e9 Binary files /dev/null and b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/OpenTK.dll differ diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/OpenTK.dll.config b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/OpenTK.dll.config new file mode 100644 index 0000000..409cb8f --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/OpenTK.dll.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/PlanetSimulation.exe b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/PlanetSimulation.exe new file mode 100644 index 0000000..42d43ca Binary files /dev/null and b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/PlanetSimulation.exe differ diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/PlanetSimulation.exe.mdb b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/PlanetSimulation.exe.mdb new file mode 100644 index 0000000..7c9f98d Binary files /dev/null and b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/PlanetSimulation.exe.mdb differ diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/Tao.Sdl.dll b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/Tao.Sdl.dll new file mode 100644 index 0000000..d2e2d47 Binary files /dev/null and b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/Tao.Sdl.dll differ diff --git a/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/Tao.Sdl.dll.config b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/Tao.Sdl.dll.config new file mode 100644 index 0000000..ec83f1e --- /dev/null +++ b/C#_Mono/PlanetSimulation/PlanetSimulation/bin/Debug/Tao.Sdl.dll.config @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/C#_Mono/UI/.vs/UI/v14/.suo b/C#_Mono/UI/.vs/UI/v14/.suo new file mode 100644 index 0000000..8816757 Binary files /dev/null and b/C#_Mono/UI/.vs/UI/v14/.suo differ diff --git a/C#_Mono/UI/UI.sln b/C#_Mono/UI/UI.sln new file mode 100644 index 0000000..c9545ec --- /dev/null +++ b/C#_Mono/UI/UI.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI", "UI\UI.csproj", "{C8A34B07-5506-435E-BD12-2C6E477E2EC5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C8A34B07-5506-435E-BD12-2C6E477E2EC5}.Debug|x86.ActiveCfg = Debug|x86 + {C8A34B07-5506-435E-BD12-2C6E477E2EC5}.Debug|x86.Build.0 = Debug|x86 + {C8A34B07-5506-435E-BD12-2C6E477E2EC5}.Release|x86.ActiveCfg = Release|x86 + {C8A34B07-5506-435E-BD12-2C6E477E2EC5}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = UI\UI.csproj + EndGlobalSection +EndGlobal diff --git a/C#_Mono/UI/UI.userprefs b/C#_Mono/UI/UI.userprefs new file mode 100644 index 0000000..a38577c --- /dev/null +++ b/C#_Mono/UI/UI.userprefs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/C#_Mono/UI/UI/DemoToolBox.cs b/C#_Mono/UI/UI/DemoToolBox.cs new file mode 100644 index 0000000..0685357 --- /dev/null +++ b/C#_Mono/UI/UI/DemoToolBox.cs @@ -0,0 +1,17 @@ +using System; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; + +namespace UI +{ + public class DemoToolBox : ToolWindow + { + Button submit; + public DemoToolBox (Vector2 pos, Vector2 size) : base(pos,size) + { + submit = new Button (offset, new Rectangle (10, 10, 100, 20), Color.Gray, 2, Color.Black); + uiElements.Add(submit); + } + } +} + diff --git a/C#_Mono/UI/UI/Game1.cs b/C#_Mono/UI/UI/Game1.cs new file mode 100644 index 0000000..f644f91 --- /dev/null +++ b/C#_Mono/UI/UI/Game1.cs @@ -0,0 +1,91 @@ +#region Using Statements +using System; + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Storage; +using Microsoft.Xna.Framework.Input; + +#endregion + +namespace UI +{ + /// + /// This is the main type for your game + /// + public class Game1 : Game + { + GraphicsDeviceManager graphics; + SpriteBatch spriteBatch; + + DemoToolBox t; + + public Game1 () + { + graphics = new GraphicsDeviceManager (this); + Content.RootDirectory = "Content"; + graphics.IsFullScreen = false; + } + + /// + /// Allows the game to perform any initialization it needs to before starting to run. + /// This is where it can query for any required services and load any non-graphic + /// related content. Calling base.Initialize will enumerate through any components + /// and initialize them as well. + /// + protected override void Initialize () + { + // TODO: Add your initialization logic here + base.Initialize (); + + + } + + /// + /// LoadContent will be called once per game and is the place to load + /// all of your content. + /// + protected override void LoadContent () + { + // Create a new SpriteBatch, which can be used to draw textures. + spriteBatch = new SpriteBatch (GraphicsDevice); + + //TODO: use this.Content to load your game content here + t = new DemoToolBox(Vector2.Zero, new Vector2(640, 480)); + + } + + /// + /// Allows the game to run logic such as updating the world, + /// checking for collisions, gathering input, and playing audio. + /// + /// Provides a snapshot of timing values. + protected override void Update (GameTime gameTime) + { + // For Mobile devices, this logic will close the Game when the Back button is pressed + if (GamePad.GetState (PlayerIndex.One).Buttons.Back == ButtonState.Pressed) { + Exit (); + } + t.Update(); + // TODO: Add your update logic here + base.Update (gameTime); + } + + /// + /// This is called when the game should draw itself. + /// + /// Provides a snapshot of timing values. + protected override void Draw (GameTime gameTime) + { + graphics.GraphicsDevice.Clear (Color.CornflowerBlue); + + //TODO: Add your drawing code here + //spriteBatch.Begin(); + // b.Draw(graphics.GraphicsDevice, spriteBatch); + //spriteBatch.End(); + t.DrawStatic(GraphicsDevice, spriteBatch); + base.Draw (gameTime); + } + } +} + diff --git a/C#_Mono/UI/UI/Icon.png b/C#_Mono/UI/UI/Icon.png new file mode 100644 index 0000000..c57cf36 Binary files /dev/null and b/C#_Mono/UI/UI/Icon.png differ diff --git a/C#_Mono/UI/UI/Program.cs b/C#_Mono/UI/UI/Program.cs new file mode 100644 index 0000000..9f0aab4 --- /dev/null +++ b/C#_Mono/UI/UI/Program.cs @@ -0,0 +1,24 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; + +#endregion + +namespace UI +{ + static class Program + { + private static Game1 game; + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main () + { + game = new Game1 (); + game.Run (); + } + } +} diff --git a/C#_Mono/UI/UI/Properties/AssemblyInfo.cs b/C#_Mono/UI/UI/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..06d457b --- /dev/null +++ b/C#_Mono/UI/UI/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("UI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("hannes")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.0")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/C#_Mono/UI/UI/UI.csproj b/C#_Mono/UI/UI/UI.csproj new file mode 100644 index 0000000..ee94b33 --- /dev/null +++ b/C#_Mono/UI/UI/UI.csproj @@ -0,0 +1,60 @@ + + + + Debug + x86 + 10.0.0 + 2.0 + {C8A34B07-5506-435E-BD12-2C6E477E2EC5} + {9B831FEF-F496-498F-9FE8-180DA5CB4258};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Exe + UI + Linux + UI + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + x86 + false + + + none + true + bin\Release + prompt + 4 + x86 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/C#_Mono/UI/UI/UI/Button.cs b/C#_Mono/UI/UI/UI/Button.cs new file mode 100644 index 0000000..b0489f6 --- /dev/null +++ b/C#_Mono/UI/UI/UI/Button.cs @@ -0,0 +1,38 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; + +namespace UI +{ + public class Button : UIElement + { + protected Color hColor { + get{ return new Color(Color.Black, 60); }} + protected Color innerColor; + protected int borderSize; + + public Button (Vector2 offset, Rectangle b, Color c, int borderThickness, Color bColor): base(offset, b, bColor) + { + innerColor = c; + borderSize = borderThickness; + } + public override void Update() + { + base.Update(); + } + public override void Draw(GraphicsDevice graphicsDevice, SpriteBatch spriteBatch) + { + base.Draw(graphicsDevice, spriteBatch); + var texture = new SolidColorTexture(graphicsDevice, innerColor); + var hTexture = new SolidColorTexture(graphicsDevice, hColor); + Rectangle inner = new Rectangle(bound.X + borderSize, bound.Y + borderSize , bound.Width - 2*borderSize, bound.Height - 2* borderSize); + + spriteBatch.Draw(texture, inner, Color.White); + if(bound.Contains(m.MousePosition)) + spriteBatch.Draw(hTexture, inner, Color.White); + + } + } +} + diff --git a/C#_Mono/UI/UI/UI/MouseManager.cs b/C#_Mono/UI/UI/UI/MouseManager.cs new file mode 100644 index 0000000..e04eb9d --- /dev/null +++ b/C#_Mono/UI/UI/UI/MouseManager.cs @@ -0,0 +1,48 @@ +using System; +using Microsoft.Xna.Framework.Input; +using Microsoft.Xna.Framework; + +namespace UI +{ + public class MouseManager + { + public event EventHandler LeftButtonClicked; + public event EventHandler LeftButtonReleased; + bool leftButtonLastState; + Point lastClickedPos; + public Point LastClickedPos { + get {return lastClickedPos;}} + + public Point MousePosition { + get{ + MouseState mState = Mouse.GetState(); + return new Point(mState.X, mState.Y); + } + } + + public MouseManager () + { + leftButtonLastState = false; + } + + public void Update () + { + //If Clicked + if (Mouse.GetState ().LeftButton == ButtonState.Pressed && !leftButtonLastState) { + if (LeftButtonClicked != null) + LeftButtonClicked(this, null); + leftButtonLastState = true; + lastClickedPos = MousePosition; + } + //If Released + if(Mouse.GetState ().LeftButton == ButtonState.Released && leftButtonLastState) + { + if (LeftButtonReleased != null) + LeftButtonReleased(this, null); + leftButtonLastState = false; + lastClickedPos = Point.Zero; + } + } + } +} + diff --git a/C#_Mono/UI/UI/UI/SolidColorTexture.cs b/C#_Mono/UI/UI/UI/SolidColorTexture.cs new file mode 100644 index 0000000..80cfc60 --- /dev/null +++ b/C#_Mono/UI/UI/UI/SolidColorTexture.cs @@ -0,0 +1,38 @@ +using System; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; + +namespace UI +{ +public class SolidColorTexture : Texture2D + { + private Color _color; + // Gets or sets the color used to create the texture + public Color Color + { + get { return _color; } + set + { + if (value != _color) + { + _color = value; + SetData(new Color[] { _color }); + } + } + } + + + public SolidColorTexture(GraphicsDevice graphicsDevice) + : base(graphicsDevice, 1, 1) + { + //default constructor + } + public SolidColorTexture(GraphicsDevice graphicsDevice, Color color) + : base(graphicsDevice, 1, 1) + { + Color = color; + } + + } +} + diff --git a/C#_Mono/UI/UI/UI/ToolWindow.cs b/C#_Mono/UI/UI/UI/ToolWindow.cs new file mode 100644 index 0000000..0332b1d --- /dev/null +++ b/C#_Mono/UI/UI/UI/ToolWindow.cs @@ -0,0 +1,60 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; + +namespace UI +{ + public class ToolWindow + { + protected List uiElements; + Button minimizeButton; + + int windowBarHeight; + Vector2 pos; + Vector2 size; + Boolean minimized; + protected Vector2 offset; + + public ToolWindow (Vector2 pos, Vector2 size) + { + uiElements = new List(); + windowBarHeight = 20; + offset = new Vector2(pos.X, pos.Y + windowBarHeight); + minimized = false; + this.pos = pos; + this.size = size; + minimizeButton = new Button(new Vector2(2,2), new Rectangle((int)pos.X, (int) pos.Y, windowBarHeight - 4, windowBarHeight -4), Color.Red, 2, Color.Black); + minimizeButton.Clicked += new EventHandler(minimize); + } + public void Update () + { + minimizeButton.Update(); + foreach (var element in uiElements) { + element.Update(); + } + } + public void DrawStatic (GraphicsDevice graphicsDevice, SpriteBatch spriteBatch) + { + var headBarTexture = new SolidColorTexture(graphicsDevice, Color.DarkGray); + var bodyTexture = new SolidColorTexture(graphicsDevice, Color.DimGray); + + spriteBatch.Begin(); + spriteBatch.Draw(headBarTexture, new Rectangle((int)pos.X, (int)pos.Y, (int)size.X, windowBarHeight), Color.White); + minimizeButton.Draw(graphicsDevice, spriteBatch); + if (!minimized) { + spriteBatch.Draw(bodyTexture, new Rectangle((int)pos.X, (int)pos.Y + windowBarHeight, (int)size.X,(int)size.Y - windowBarHeight), Color.White); + //Draw all UI Elements + foreach (var element in uiElements) { + element.Draw(graphicsDevice, spriteBatch); + } + } + spriteBatch.End(); + } + protected void minimize(object sender, EventArgs e) + { + minimized = !minimized; + } + } +} + diff --git a/C#_Mono/UI/UI/UI/UICamera.cs b/C#_Mono/UI/UI/UI/UICamera.cs new file mode 100644 index 0000000..60a4600 --- /dev/null +++ b/C#_Mono/UI/UI/UI/UICamera.cs @@ -0,0 +1,12 @@ +using System; + +namespace UI +{ + public class UICamera + { + public UICamera () + { + } + } +} + diff --git a/C#_Mono/UI/UI/UI/UIElement.cs b/C#_Mono/UI/UI/UI/UIElement.cs new file mode 100644 index 0000000..c630731 --- /dev/null +++ b/C#_Mono/UI/UI/UI/UIElement.cs @@ -0,0 +1,47 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace UI +{ + public class UIElement + { + protected MouseManager m; + protected Rectangle bound; + protected Color color; + + public event EventHandler Clicked; + + public UIElement (Vector2 offset ,Rectangle b, Color c) + { + m = new MouseManager(); + m.LeftButtonClicked += new EventHandler(click); + + color = c; + bound = new Rectangle((int)(b.X + offset.X), (int)(b.Y + offset.Y), b.Width, b.Height); + } + + public virtual void Update () + { + m.Update(); + } + public virtual void Draw(GraphicsDevice graphicsDevice, SpriteBatch spriteBatch) + { + var texture = new SolidColorTexture(graphicsDevice, color); + spriteBatch.Draw(texture, bound, Color.White); + } + private void click (object sender, EventArgs e) + { + if (Clicked != null && bound.Contains (m.MousePosition)) { + onClick(); + Clicked (this, null); + } + } + public virtual void onClick() + { + //Should be overidden by UI Elements + } + + } +} + diff --git a/C#_Mono/UI/UI/bin/Debug/Lidgren.Network.dll b/C#_Mono/UI/UI/bin/Debug/Lidgren.Network.dll new file mode 100644 index 0000000..a703f66 Binary files /dev/null and b/C#_Mono/UI/UI/bin/Debug/Lidgren.Network.dll differ diff --git a/C#_Mono/UI/UI/bin/Debug/MonoGame.Framework.dll b/C#_Mono/UI/UI/bin/Debug/MonoGame.Framework.dll new file mode 100644 index 0000000..65bf7c3 Binary files /dev/null and b/C#_Mono/UI/UI/bin/Debug/MonoGame.Framework.dll differ diff --git a/C#_Mono/UI/UI/bin/Debug/OpenTK.dll b/C#_Mono/UI/UI/bin/Debug/OpenTK.dll new file mode 100644 index 0000000..b1cd2e9 Binary files /dev/null and b/C#_Mono/UI/UI/bin/Debug/OpenTK.dll differ diff --git a/C#_Mono/UI/UI/bin/Debug/OpenTK.dll.config b/C#_Mono/UI/UI/bin/Debug/OpenTK.dll.config new file mode 100644 index 0000000..409cb8f --- /dev/null +++ b/C#_Mono/UI/UI/bin/Debug/OpenTK.dll.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/C#_Mono/UI/UI/bin/Debug/Tao.Sdl.dll b/C#_Mono/UI/UI/bin/Debug/Tao.Sdl.dll new file mode 100644 index 0000000..d2e2d47 Binary files /dev/null and b/C#_Mono/UI/UI/bin/Debug/Tao.Sdl.dll differ diff --git a/C#_Mono/UI/UI/bin/Debug/Tao.Sdl.dll.config b/C#_Mono/UI/UI/bin/Debug/Tao.Sdl.dll.config new file mode 100644 index 0000000..ec83f1e --- /dev/null +++ b/C#_Mono/UI/UI/bin/Debug/Tao.Sdl.dll.config @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/C#_Mono/UI/UI/bin/Debug/UI.exe b/C#_Mono/UI/UI/bin/Debug/UI.exe new file mode 100644 index 0000000..c058742 Binary files /dev/null and b/C#_Mono/UI/UI/bin/Debug/UI.exe differ diff --git a/C#_Mono/UI/UI/bin/Debug/UI.exe.mdb b/C#_Mono/UI/UI/bin/Debug/UI.exe.mdb new file mode 100644 index 0000000..56e983d Binary files /dev/null and b/C#_Mono/UI/UI/bin/Debug/UI.exe.mdb differ diff --git a/C#_Mono/UI/UpgradeLog.htm b/C#_Mono/UI/UpgradeLog.htm new file mode 100644 index 0000000..74da685 Binary files /dev/null and b/C#_Mono/UI/UpgradeLog.htm differ diff --git a/Java/20x20 (printf)/.idea/.name b/Java/20x20 (printf)/.idea/.name new file mode 100644 index 0000000..2edf5be --- /dev/null +++ b/Java/20x20 (printf)/.idea/.name @@ -0,0 +1 @@ +20x20 (printf) \ No newline at end of file diff --git a/Java/20x20 (printf)/.idea/checkstyle-idea.xml b/Java/20x20 (printf)/.idea/checkstyle-idea.xml new file mode 100644 index 0000000..2a0f48e --- /dev/null +++ b/Java/20x20 (printf)/.idea/checkstyle-idea.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/Java/20x20 (printf)/.idea/compiler.xml b/Java/20x20 (printf)/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/Java/20x20 (printf)/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Java/20x20 (printf)/.idea/copyright/profiles_settings.xml b/Java/20x20 (printf)/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/Java/20x20 (printf)/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Java/20x20 (printf)/.idea/encodings.xml b/Java/20x20 (printf)/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/Java/20x20 (printf)/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Java/20x20 (printf)/.idea/misc.xml b/Java/20x20 (printf)/.idea/misc.xml new file mode 100644 index 0000000..db1dbaa --- /dev/null +++ b/Java/20x20 (printf)/.idea/misc.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8 + + + + + + + + \ No newline at end of file diff --git a/Java/20x20 (printf)/.idea/modules.xml b/Java/20x20 (printf)/.idea/modules.xml new file mode 100644 index 0000000..b97f2be --- /dev/null +++ b/Java/20x20 (printf)/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Java/20x20 (printf)/.idea/workspace.xml b/Java/20x20 (printf)/.idea/workspace.xml new file mode 100644 index 0000000..2160bc3 --- /dev/null +++ b/Java/20x20 (printf)/.idea/workspace.xml @@ -0,0 +1,653 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + Checkstyle + + + + + CheckStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1448631852760 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Java/20x20 (printf)/20x20 (printf).iml b/Java/20x20 (printf)/20x20 (printf).iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/20x20 (printf)/20x20 (printf).iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/20x20 (printf)/build.xml b/Java/20x20 (printf)/build.xml new file mode 100644 index 0000000..53359ff --- /dev/null +++ b/Java/20x20 (printf)/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project 20x20 (printf). + + + diff --git a/Java/20x20 (printf)/build/classes/.netbeans_automatic_build b/Java/20x20 (printf)/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/20x20 (printf)/build/classes/.netbeans_update_resources b/Java/20x20 (printf)/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/20x20 (printf)/build/classes/pkg20x20/Main.class b/Java/20x20 (printf)/build/classes/pkg20x20/Main.class new file mode 100644 index 0000000..a7f9928 Binary files /dev/null and b/Java/20x20 (printf)/build/classes/pkg20x20/Main.class differ diff --git a/Java/20x20 (printf)/manifest.mf b/Java/20x20 (printf)/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/20x20 (printf)/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/20x20 (printf)/nbproject/build-impl.xml b/Java/20x20 (printf)/nbproject/build-impl.xml new file mode 100644 index 0000000..f7ad74c --- /dev/null +++ b/Java/20x20 (printf)/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/20x20 (printf)/nbproject/genfiles.properties b/Java/20x20 (printf)/nbproject/genfiles.properties new file mode 100644 index 0000000..26f67a8 --- /dev/null +++ b/Java/20x20 (printf)/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=138b40f1 +build.xml.script.CRC32=60fb7216 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=138b40f1 +nbproject/build-impl.xml.script.CRC32=bf294911 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/20x20 (printf)/nbproject/private/private.properties b/Java/20x20 (printf)/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/20x20 (printf)/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/20x20 (printf)/nbproject/private/private.xml b/Java/20x20 (printf)/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/20x20 (printf)/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/20x20 (printf)/nbproject/project.properties b/Java/20x20 (printf)/nbproject/project.properties new file mode 100644 index 0000000..82606db --- /dev/null +++ b/Java/20x20 (printf)/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/20x20__printf_.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=pkg20x20.Main +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/20x20 (printf)/nbproject/project.xml b/Java/20x20 (printf)/nbproject/project.xml new file mode 100644 index 0000000..bfb6ebb --- /dev/null +++ b/Java/20x20 (printf)/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + 20x20 (printf) + + + + + + + + + diff --git a/Java/20x20 (printf)/out/production/20x20 (printf)/pkg20x20/Main.class b/Java/20x20 (printf)/out/production/20x20 (printf)/pkg20x20/Main.class new file mode 100644 index 0000000..263c720 Binary files /dev/null and b/Java/20x20 (printf)/out/production/20x20 (printf)/pkg20x20/Main.class differ diff --git a/Java/20x20 (printf)/src/pkg20x20/Main.java b/Java/20x20 (printf)/src/pkg20x20/Main.java new file mode 100644 index 0000000..a56c037 --- /dev/null +++ b/Java/20x20 (printf)/src/pkg20x20/Main.java @@ -0,0 +1,29 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package pkg20x20; + +/** + * + * @author kuchelmeister.hannes + */ +public class Main { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + for (int a = 1; a <= 20; a++) + { + for (int b = 1; b <= 20; b++) + { + System.out.printf("%4d", a * b); + + if (b == 20) { + System.out.print("\n"); + } + } + } + } +} diff --git a/Java/20x20Sternchen/20x20Sternchen.iml b/Java/20x20Sternchen/20x20Sternchen.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/20x20Sternchen/20x20Sternchen.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/20x20Sternchen/build.xml b/Java/20x20Sternchen/build.xml new file mode 100644 index 0000000..8bb645c --- /dev/null +++ b/Java/20x20Sternchen/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project 20x20Sternchen. + + + diff --git a/Java/20x20Sternchen/build/classes/.netbeans_automatic_build b/Java/20x20Sternchen/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/20x20Sternchen/build/classes/.netbeans_update_resources b/Java/20x20Sternchen/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/20x20Sternchen/build/classes/pkg20x20sternchen/Main.class b/Java/20x20Sternchen/build/classes/pkg20x20sternchen/Main.class new file mode 100644 index 0000000..c43310f Binary files /dev/null and b/Java/20x20Sternchen/build/classes/pkg20x20sternchen/Main.class differ diff --git a/Java/20x20Sternchen/manifest.mf b/Java/20x20Sternchen/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/20x20Sternchen/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/20x20Sternchen/nbproject/build-impl.xml b/Java/20x20Sternchen/nbproject/build-impl.xml new file mode 100644 index 0000000..d4d7380 --- /dev/null +++ b/Java/20x20Sternchen/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/20x20Sternchen/nbproject/genfiles.properties b/Java/20x20Sternchen/nbproject/genfiles.properties new file mode 100644 index 0000000..4fae1d4 --- /dev/null +++ b/Java/20x20Sternchen/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=5ef4f2a3 +build.xml.script.CRC32=fc02511f +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=5ef4f2a3 +nbproject/build-impl.xml.script.CRC32=746352cf +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/20x20Sternchen/nbproject/private/private.properties b/Java/20x20Sternchen/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/20x20Sternchen/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/20x20Sternchen/nbproject/private/private.xml b/Java/20x20Sternchen/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/20x20Sternchen/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/20x20Sternchen/nbproject/project.properties b/Java/20x20Sternchen/nbproject/project.properties new file mode 100644 index 0000000..1ea1640 --- /dev/null +++ b/Java/20x20Sternchen/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/20x20Sternchen.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=pkg20x20sternchen.Main +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/20x20Sternchen/nbproject/project.xml b/Java/20x20Sternchen/nbproject/project.xml new file mode 100644 index 0000000..20fa5dd --- /dev/null +++ b/Java/20x20Sternchen/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + 20x20Sternchen + + + + + + + + + diff --git a/Java/20x20Sternchen/src/pkg20x20sternchen/Main.java b/Java/20x20Sternchen/src/pkg20x20sternchen/Main.java new file mode 100644 index 0000000..7158ff6 --- /dev/null +++ b/Java/20x20Sternchen/src/pkg20x20sternchen/Main.java @@ -0,0 +1,64 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package pkg20x20sternchen; + +/** + * + * @author kuchelmeister.hannes + */ +public class Main { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + + for(int x = 1; x <= 20; x++) + { + String s = ""; + for(int y = 0; y < x; y++) + { + s += "*"; + } + System.out.printf("%20s",s); + System.out.print("\n"); + } + + System.out.print("\n\n"); + + for(int x = 20; x > 0; x--) + { + String s = ""; + for(int y = 0; y < x; y++) + { + s += "*"; + } + System.out.printf("%20s",s); + System.out.print("\n"); + } + + System.out.print("\n\n"); + + for(int x = 20; x > 0; x--) + { + for(int y = 0; y < x; y++) + { + System.out.print("*"); + } + System.out.print("\n"); + } + + System.out.print("\n\n"); + + for(int x = 1; x <=20; x++) + { + for(int y = 0; y < x; y++) + { + System.out.print("*"); + } + System.out.print("\n"); + } + } +} diff --git a/Java/Addition/Addition_0/Addition_0.iml b/Java/Addition/Addition_0/Addition_0.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Addition/Addition_0/Addition_0.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Addition/Addition_0/build.xml b/Java/Addition/Addition_0/build.xml new file mode 100644 index 0000000..53841f4 --- /dev/null +++ b/Java/Addition/Addition_0/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Addition_0. + + + diff --git a/Java/Addition/Addition_0/build/classes/.netbeans_automatic_build b/Java/Addition/Addition_0/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Addition/Addition_0/build/classes/.netbeans_update_resources b/Java/Addition/Addition_0/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Addition/Addition_0/build/classes/addition_0/Addition_0.class b/Java/Addition/Addition_0/build/classes/addition_0/Addition_0.class new file mode 100644 index 0000000..9e83549 Binary files /dev/null and b/Java/Addition/Addition_0/build/classes/addition_0/Addition_0.class differ diff --git a/Java/Addition/Addition_0/manifest.mf b/Java/Addition/Addition_0/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Addition/Addition_0/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Addition/Addition_0/nbproject/build-impl.xml b/Java/Addition/Addition_0/nbproject/build-impl.xml new file mode 100644 index 0000000..09b3b45 --- /dev/null +++ b/Java/Addition/Addition_0/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Addition/Addition_0/nbproject/genfiles.properties b/Java/Addition/Addition_0/nbproject/genfiles.properties new file mode 100644 index 0000000..2cda0d2 --- /dev/null +++ b/Java/Addition/Addition_0/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=b88dc5ac +build.xml.script.CRC32=10e3e34d +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=b88dc5ac +nbproject/build-impl.xml.script.CRC32=67a6cbdc +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Addition/Addition_0/nbproject/private/private.properties b/Java/Addition/Addition_0/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Addition/Addition_0/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Addition/Addition_0/nbproject/private/private.xml b/Java/Addition/Addition_0/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Addition/Addition_0/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Addition/Addition_0/nbproject/project.properties b/Java/Addition/Addition_0/nbproject/project.properties new file mode 100644 index 0000000..8857dc7 --- /dev/null +++ b/Java/Addition/Addition_0/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Addition_0.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=addition_0.Addition_0 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Addition/Addition_0/nbproject/project.xml b/Java/Addition/Addition_0/nbproject/project.xml new file mode 100644 index 0000000..ef480ae --- /dev/null +++ b/Java/Addition/Addition_0/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Addition_0 + + + + + + + + + diff --git a/Java/Addition/Addition_0/src/addition_0/Addition_0.java b/Java/Addition/Addition_0/src/addition_0/Addition_0.java new file mode 100644 index 0000000..ecf65c5 --- /dev/null +++ b/Java/Addition/Addition_0/src/addition_0/Addition_0.java @@ -0,0 +1,9 @@ +package addition_0; +public class Addition_0 +{ + public static void main(String[] args) + { + System.out.println("Dieses Programm führt eine Addition zweier Zahlen aus."); + System.out.println("2+3=" + (2+3)); + } +} diff --git a/Java/Addition/Addition_1/Addition_1.iml b/Java/Addition/Addition_1/Addition_1.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Addition/Addition_1/Addition_1.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Addition/Addition_1/build.xml b/Java/Addition/Addition_1/build.xml new file mode 100644 index 0000000..b9a6ec6 --- /dev/null +++ b/Java/Addition/Addition_1/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Addition_1. + + + diff --git a/Java/Addition/Addition_1/build/classes/.netbeans_automatic_build b/Java/Addition/Addition_1/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Addition/Addition_1/build/classes/.netbeans_update_resources b/Java/Addition/Addition_1/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Addition/Addition_1/build/classes/addition_1/Addition_1.class b/Java/Addition/Addition_1/build/classes/addition_1/Addition_1.class new file mode 100644 index 0000000..5871d7f Binary files /dev/null and b/Java/Addition/Addition_1/build/classes/addition_1/Addition_1.class differ diff --git a/Java/Addition/Addition_1/manifest.mf b/Java/Addition/Addition_1/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Addition/Addition_1/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Addition/Addition_1/nbproject/build-impl.xml b/Java/Addition/Addition_1/nbproject/build-impl.xml new file mode 100644 index 0000000..4645475 --- /dev/null +++ b/Java/Addition/Addition_1/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Addition/Addition_1/nbproject/genfiles.properties b/Java/Addition/Addition_1/nbproject/genfiles.properties new file mode 100644 index 0000000..5b13b6b --- /dev/null +++ b/Java/Addition/Addition_1/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=b09e498a +build.xml.script.CRC32=26e76c07 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=b09e498a +nbproject/build-impl.xml.script.CRC32=b4aad381 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Addition/Addition_1/nbproject/private/private.properties b/Java/Addition/Addition_1/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Addition/Addition_1/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Addition/Addition_1/nbproject/private/private.xml b/Java/Addition/Addition_1/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Addition/Addition_1/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Addition/Addition_1/nbproject/project.properties b/Java/Addition/Addition_1/nbproject/project.properties new file mode 100644 index 0000000..5046308 --- /dev/null +++ b/Java/Addition/Addition_1/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Addition_1.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=addition_1.Addition_1 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Addition/Addition_1/nbproject/project.xml b/Java/Addition/Addition_1/nbproject/project.xml new file mode 100644 index 0000000..73dcae1 --- /dev/null +++ b/Java/Addition/Addition_1/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Addition_1 + + + + + + + + + diff --git a/Java/Addition/Addition_1/src/addition_1/Addition_1.java b/Java/Addition/Addition_1/src/addition_1/Addition_1.java new file mode 100644 index 0000000..e482792 --- /dev/null +++ b/Java/Addition/Addition_1/src/addition_1/Addition_1.java @@ -0,0 +1,13 @@ +package addition_1; +public class Addition_1 +{ + public static void main(String[] args) + { + int summand1, summand2, summe; + summand1=2; + summand2=3; + summe=summand1+summand2; + System.out.print("Dieses Programm führt eine Addition zweier Zahlen aus: "); + System.out.println(summand1+"+"+summand2+"="+summe); + } +} diff --git a/Java/Addition/Addition_2/Addition_2.iml b/Java/Addition/Addition_2/Addition_2.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Addition/Addition_2/Addition_2.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Addition/Addition_2/build.xml b/Java/Addition/Addition_2/build.xml new file mode 100644 index 0000000..2e49d85 --- /dev/null +++ b/Java/Addition/Addition_2/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Addition_2. + + + diff --git a/Java/Addition/Addition_2/build/classes/.netbeans_automatic_build b/Java/Addition/Addition_2/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Addition/Addition_2/build/classes/.netbeans_update_resources b/Java/Addition/Addition_2/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Addition/Addition_2/build/classes/addition_2/Addition_2.class b/Java/Addition/Addition_2/build/classes/addition_2/Addition_2.class new file mode 100644 index 0000000..59296d0 Binary files /dev/null and b/Java/Addition/Addition_2/build/classes/addition_2/Addition_2.class differ diff --git a/Java/Addition/Addition_2/manifest.mf b/Java/Addition/Addition_2/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Addition/Addition_2/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Addition/Addition_2/nbproject/build-impl.xml b/Java/Addition/Addition_2/nbproject/build-impl.xml new file mode 100644 index 0000000..0be9832 --- /dev/null +++ b/Java/Addition/Addition_2/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Addition/Addition_2/nbproject/genfiles.properties b/Java/Addition/Addition_2/nbproject/genfiles.properties new file mode 100644 index 0000000..40ef9ba --- /dev/null +++ b/Java/Addition/Addition_2/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=a8aadde0 +build.xml.script.CRC32=7ceafdd9 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=a8aadde0 +nbproject/build-impl.xml.script.CRC32=1acffd27 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Addition/Addition_2/nbproject/private/private.properties b/Java/Addition/Addition_2/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Addition/Addition_2/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Addition/Addition_2/nbproject/private/private.xml b/Java/Addition/Addition_2/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Addition/Addition_2/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Addition/Addition_2/nbproject/project.properties b/Java/Addition/Addition_2/nbproject/project.properties new file mode 100644 index 0000000..5a6bfc3 --- /dev/null +++ b/Java/Addition/Addition_2/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Addition_2.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=addition_2.Addition_2 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Addition/Addition_2/nbproject/project.xml b/Java/Addition/Addition_2/nbproject/project.xml new file mode 100644 index 0000000..365bf7c --- /dev/null +++ b/Java/Addition/Addition_2/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Addition_2 + + + + + + + + + diff --git a/Java/Addition/Addition_2/src/addition_2/Addition_2.java b/Java/Addition/Addition_2/src/addition_2/Addition_2.java new file mode 100644 index 0000000..c250af4 --- /dev/null +++ b/Java/Addition/Addition_2/src/addition_2/Addition_2.java @@ -0,0 +1,17 @@ +package addition_2; +import java.util.Scanner; +public class Addition_2 +{ + public static void main(String[] args) + { + Scanner scan = new Scanner( System.in ); + int summand1=0, summand2=0, summe=0; + System.out.println("Geben Sie nun den ersten Summanden ein. (Bestätigen sie mit Enter"); + summand1=scan.nextInt(); + System.out.println("Geben Sie nun den zweiten Summanden ein. (Bestätigen sie mit Enter"); + summand2=scan.nextInt(); + summe=summand1+summand2; + System.out.print("Dieses Programm führt eine Addition zweier Zahlen aus: "); + System.out.println(summand1+"+"+summand2+"="+summe); + } +} diff --git a/Java/BackTracking/BackTracking.iml b/Java/BackTracking/BackTracking.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/BackTracking/BackTracking.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/BackTracking/build.xml b/Java/BackTracking/build.xml new file mode 100644 index 0000000..0a378be --- /dev/null +++ b/Java/BackTracking/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project BackTracking. + + + diff --git a/Java/BackTracking/build/classes/.netbeans_automatic_build b/Java/BackTracking/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/BackTracking/build/classes/.netbeans_update_resources b/Java/BackTracking/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/BackTracking/build/classes/backtracking/BackTracking.class b/Java/BackTracking/build/classes/backtracking/BackTracking.class new file mode 100644 index 0000000..34d3ad6 Binary files /dev/null and b/Java/BackTracking/build/classes/backtracking/BackTracking.class differ diff --git a/Java/BackTracking/manifest.mf b/Java/BackTracking/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/BackTracking/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/BackTracking/nbproject/build-impl.xml b/Java/BackTracking/nbproject/build-impl.xml new file mode 100644 index 0000000..e2083fb --- /dev/null +++ b/Java/BackTracking/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/BackTracking/nbproject/genfiles.properties b/Java/BackTracking/nbproject/genfiles.properties new file mode 100644 index 0000000..f6aa53c --- /dev/null +++ b/Java/BackTracking/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=d38d6736 +build.xml.script.CRC32=86c37df0 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=d38d6736 +nbproject/build-impl.xml.script.CRC32=151427ed +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/BackTracking/nbproject/private/private.properties b/Java/BackTracking/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/BackTracking/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/BackTracking/nbproject/private/private.xml b/Java/BackTracking/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/BackTracking/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/BackTracking/nbproject/project.properties b/Java/BackTracking/nbproject/project.properties new file mode 100644 index 0000000..1201745 --- /dev/null +++ b/Java/BackTracking/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/BackTracking.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=backtracking.BackTracking +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/BackTracking/nbproject/project.xml b/Java/BackTracking/nbproject/project.xml new file mode 100644 index 0000000..662f5e2 --- /dev/null +++ b/Java/BackTracking/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + BackTracking + + + + + + + + + diff --git a/Java/BackTracking/src/backtracking/BackTracking.java b/Java/BackTracking/src/backtracking/BackTracking.java new file mode 100644 index 0000000..198e7f8 --- /dev/null +++ b/Java/BackTracking/src/backtracking/BackTracking.java @@ -0,0 +1,106 @@ +package backtracking; + +/** + * @author Hannes + */ +public class BackTracking { + private static int anzahl = 0; + private static int[][] brett = new int[8][8]; + //Negative Zahlen = Dame + //0 = unbesetzt + // >0 => gesperrt + + private static void setze(int zeile, int spalte, int addiere) { + brett[zeile][spalte] -= addiere; + //sperre Zeile + for (int i = 0; i < 8; i++) { + if (i != spalte) { + brett[zeile][i] += addiere; + } + } + //spalte + for (int i = 0; i < 8; i++) { + if (i != zeile) { + brett[i][spalte] += addiere; + } + } + + //sperre Diagonalen + int z = zeile + 1; + int s = spalte + 1; + while (s < 8 && z < 8) { + brett[z][s] += addiere; + z++; + s++; + } + z = zeile - 1; + s = spalte - 1; + while (s >= 0 && z >= 0) { + brett[z][s] += addiere; + z--; + s--; + } + z = zeile + 1; + s = spalte - 1; + while (s >= 0 && z < 8) { + brett[z][s] += addiere; + z++; + s--; + } + z = zeile - 1; + s = spalte + 1; + while (s < 8 && z >= 0) { + brett[z][s] += addiere; + z--; + s++; + } + + + } + + private static void draw() { + for (int z = 0; z < 8; z++) { + for (int s = 0; s < 8; s++) { + if (brett[z][s] == -1) { + System.out.print(" D"); + } else { + System.out.print(" " + brett[z][s]); + } + } + System.out.print("\n"); + } + System.out.print("\n"); + anzahl++; + } + + private static int nächsteStelle(int zeile, int spalte) { + while (spalte < 8 && brett[zeile][spalte] != 0) { + spalte++; + } + + return spalte; + } + + private static void dame(int zeile, int spalte) { + int nSpalte = nächsteStelle(zeile, spalte); + //System.out.println("z:" + zeile + " s:" + spalte + " n:" + nSpalte); + if (zeile == 7 && nSpalte != 8) { + setze(zeile, spalte, 1); + draw(); + setze(zeile, spalte, -1); + + } else { + if (nSpalte < 8) { + setze(zeile, nSpalte, 1); + dame(zeile +1, 0); + setze(zeile,nSpalte, -1); + dame(zeile, nSpalte +1); + } + } + } + + public static void main(String[] args) { + dame(0,0); + System.out.println("Anzahl: " + anzahl); + } +} diff --git a/Java/Begruessung/Begruessung.iml b/Java/Begruessung/Begruessung.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Begruessung/Begruessung.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Begruessung/build.xml b/Java/Begruessung/build.xml new file mode 100644 index 0000000..3f6493b --- /dev/null +++ b/Java/Begruessung/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Begruessung. + + + diff --git a/Java/Begruessung/build/classes/.netbeans_automatic_build b/Java/Begruessung/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Begruessung/build/classes/.netbeans_update_resources b/Java/Begruessung/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Begruessung/build/classes/begruessung/Begruessung.class b/Java/Begruessung/build/classes/begruessung/Begruessung.class new file mode 100644 index 0000000..53c7440 Binary files /dev/null and b/Java/Begruessung/build/classes/begruessung/Begruessung.class differ diff --git a/Java/Begruessung/manifest.mf b/Java/Begruessung/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Begruessung/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Begruessung/nbproject/build-impl.xml b/Java/Begruessung/nbproject/build-impl.xml new file mode 100644 index 0000000..62ee9ec --- /dev/null +++ b/Java/Begruessung/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Begruessung/nbproject/genfiles.properties b/Java/Begruessung/nbproject/genfiles.properties new file mode 100644 index 0000000..9ea1e2f --- /dev/null +++ b/Java/Begruessung/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=65e23a38 +build.xml.script.CRC32=3a495ca6 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=65e23a38 +nbproject/build-impl.xml.script.CRC32=e28e0a1d +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Begruessung/nbproject/private/private.properties b/Java/Begruessung/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Begruessung/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Begruessung/nbproject/private/private.xml b/Java/Begruessung/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Begruessung/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Begruessung/nbproject/project.properties b/Java/Begruessung/nbproject/project.properties new file mode 100644 index 0000000..339d1e5 --- /dev/null +++ b/Java/Begruessung/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Begruessung.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=begruessung.Begruessung +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Begruessung/nbproject/project.xml b/Java/Begruessung/nbproject/project.xml new file mode 100644 index 0000000..385f54a --- /dev/null +++ b/Java/Begruessung/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Begruessung + + + + + + + + + diff --git a/Java/Begruessung/src/begruessung/Begruessung.java b/Java/Begruessung/src/begruessung/Begruessung.java new file mode 100644 index 0000000..067c25d --- /dev/null +++ b/Java/Begruessung/src/begruessung/Begruessung.java @@ -0,0 +1,10 @@ +package begruessung; +public class Begruessung +{ + public static void main(String[] args) + { + String name; + name="Lenerd"; + System.out.println("Guten Tag, "+name+"!"); + } +} diff --git a/Java/Bubblesort/Bubblesort.iml b/Java/Bubblesort/Bubblesort.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Bubblesort/Bubblesort.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Bubblesort/build.xml b/Java/Bubblesort/build.xml new file mode 100644 index 0000000..2e351b2 --- /dev/null +++ b/Java/Bubblesort/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Bubblesort. + + + diff --git a/Java/Bubblesort/build/classes/.netbeans_automatic_build b/Java/Bubblesort/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Bubblesort/build/classes/.netbeans_update_resources b/Java/Bubblesort/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Bubblesort/build/classes/bubblesort/Bubblesort.class b/Java/Bubblesort/build/classes/bubblesort/Bubblesort.class new file mode 100644 index 0000000..1fd5dc1 Binary files /dev/null and b/Java/Bubblesort/build/classes/bubblesort/Bubblesort.class differ diff --git a/Java/Bubblesort/manifest.mf b/Java/Bubblesort/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Bubblesort/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Bubblesort/nbproject/build-impl.xml b/Java/Bubblesort/nbproject/build-impl.xml new file mode 100644 index 0000000..97f45cd --- /dev/null +++ b/Java/Bubblesort/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Bubblesort/nbproject/genfiles.properties b/Java/Bubblesort/nbproject/genfiles.properties new file mode 100644 index 0000000..8e289e5 --- /dev/null +++ b/Java/Bubblesort/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=5f9c0708 +build.xml.script.CRC32=f1eef8ad +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=5f9c0708 +nbproject/build-impl.xml.script.CRC32=19dc59d9 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Bubblesort/nbproject/private/private.properties b/Java/Bubblesort/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Bubblesort/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Bubblesort/nbproject/private/private.xml b/Java/Bubblesort/nbproject/private/private.xml new file mode 100644 index 0000000..d6ba960 --- /dev/null +++ b/Java/Bubblesort/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/C:/Users/Hannes/Google%20Drive/NetBeansProjects/Bubblesort/src/bubblesort/Bubblesort.java + + + diff --git a/Java/Bubblesort/nbproject/private/profiler/configurations.xml b/Java/Bubblesort/nbproject/private/profiler/configurations.xml new file mode 100644 index 0000000..17c0a34 --- /dev/null +++ b/Java/Bubblesort/nbproject/private/profiler/configurations.xml @@ -0,0 +1,116 @@ + + + +1000 +false +profiler.simple.filter +false + +64 +true + +10 +false +true +0 +false +true +1 +false +false +false +profiler.simple.filter +32 +false +1 +true +1 +10 +1 +true +Analyze Memory +false +10 +1 +true +10 +0 +profiler.simple.filter +0 +false +true + + +1 +true + + +false +10 +false +true +false +false +32 +Quick filter... +false +0 +false +0 + +10 +0 +true +true + +true +10 + +1000 +0 +profiler.simple.filter +false +Analyze Performance + +1 +2 + +0 +false +profiler.simple.filter +Quick filter... +true +false +0 +true + +2 +false +32 + +0 +false +Profile only project classes +0 +0 +profiler.simple.filter +true +1 +10 +false +false +10 +false +true +false +false +Quick filter... +0 +false + +128 +Monitor Application +1000 +true +true + diff --git a/Java/Bubblesort/nbproject/private/profiler/snapshot-1453291927121.nps b/Java/Bubblesort/nbproject/private/profiler/snapshot-1453291927121.nps new file mode 100644 index 0000000..066fbe0 Binary files /dev/null and b/Java/Bubblesort/nbproject/private/profiler/snapshot-1453291927121.nps differ diff --git a/Java/Bubblesort/nbproject/private/profiler/snapshot-1453292067017.nps b/Java/Bubblesort/nbproject/private/profiler/snapshot-1453292067017.nps new file mode 100644 index 0000000..964c4d1 Binary files /dev/null and b/Java/Bubblesort/nbproject/private/profiler/snapshot-1453292067017.nps differ diff --git a/Java/Bubblesort/nbproject/project.properties b/Java/Bubblesort/nbproject/project.properties new file mode 100644 index 0000000..b7a8c4e --- /dev/null +++ b/Java/Bubblesort/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Bubblesort.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=bubblesort.Bubblesort +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Bubblesort/nbproject/project.xml b/Java/Bubblesort/nbproject/project.xml new file mode 100644 index 0000000..fb522c9 --- /dev/null +++ b/Java/Bubblesort/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Bubblesort + + + + + + + + + diff --git a/Java/Bubblesort/src/bubblesort/Bubblesort.java b/Java/Bubblesort/src/bubblesort/Bubblesort.java new file mode 100644 index 0000000..e39c9bf --- /dev/null +++ b/Java/Bubblesort/src/bubblesort/Bubblesort.java @@ -0,0 +1,48 @@ +package bubblesort; +public class Bubblesort { + static double[] arr = new double[400000]; + static int start = 0, ende = arr.length - 1; + + public static void main(String[] args) { + // TODO code application logic here + fillArray(); + + while(start != ende) + { + int aktuelles = start; + int bestes = start; + + do { + aktuelles++; + if(bestes < aktuelles) + { + bestes = aktuelles; + } + } while (aktuelles != ende); + tausche(bestes, start); + + } + //ausgabe(); + + + } + public static void ausgabe() + { + for (int i = 0; i < arr.length; i++) { + System.out.println(arr[i]); + } + } + public static void tausche(int zeiger1, int zeiger2) + { + double tmp = arr[zeiger1]; + arr[zeiger1] = arr[zeiger2]; + arr[zeiger2] = tmp; + start++; + } + public static void fillArray() + { + for (int i = 0; i < arr.length; i++) { + arr[i] = Math.random(); + } + } +} diff --git a/Java/Division/Division_0/Division_0.iml b/Java/Division/Division_0/Division_0.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Division/Division_0/Division_0.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Division/Division_0/build.xml b/Java/Division/Division_0/build.xml new file mode 100644 index 0000000..e52a39a --- /dev/null +++ b/Java/Division/Division_0/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Division_0. + + + diff --git a/Java/Division/Division_0/build/classes/.netbeans_automatic_build b/Java/Division/Division_0/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Division/Division_0/build/classes/.netbeans_update_resources b/Java/Division/Division_0/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Division/Division_0/build/classes/division_0/Division_0.class b/Java/Division/Division_0/build/classes/division_0/Division_0.class new file mode 100644 index 0000000..d822ad3 Binary files /dev/null and b/Java/Division/Division_0/build/classes/division_0/Division_0.class differ diff --git a/Java/Division/Division_0/manifest.mf b/Java/Division/Division_0/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Division/Division_0/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Division/Division_0/nbproject/build-impl.xml b/Java/Division/Division_0/nbproject/build-impl.xml new file mode 100644 index 0000000..2c9fd11 --- /dev/null +++ b/Java/Division/Division_0/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Division/Division_0/nbproject/genfiles.properties b/Java/Division/Division_0/nbproject/genfiles.properties new file mode 100644 index 0000000..9c2e0c6 --- /dev/null +++ b/Java/Division/Division_0/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=0d2c20b6 +build.xml.script.CRC32=8824a94f +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=0d2c20b6 +nbproject/build-impl.xml.script.CRC32=8b155f26 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Division/Division_0/nbproject/private/private.properties b/Java/Division/Division_0/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Division/Division_0/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Division/Division_0/nbproject/private/private.xml b/Java/Division/Division_0/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Division/Division_0/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Division/Division_0/nbproject/project.properties b/Java/Division/Division_0/nbproject/project.properties new file mode 100644 index 0000000..70f2e24 --- /dev/null +++ b/Java/Division/Division_0/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Division_0.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=division_0.Division_0 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Division/Division_0/nbproject/project.xml b/Java/Division/Division_0/nbproject/project.xml new file mode 100644 index 0000000..1dbb805 --- /dev/null +++ b/Java/Division/Division_0/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Division_0 + + + + + + + + + diff --git a/Java/Division/Division_0/src/division_0/Division_0.java b/Java/Division/Division_0/src/division_0/Division_0.java new file mode 100644 index 0000000..2291471 --- /dev/null +++ b/Java/Division/Division_0/src/division_0/Division_0.java @@ -0,0 +1,9 @@ +package division_0; +public class Division_0 +{ + public static void main(String[] args) + { + System.out.println("Diese programm führt eine Subtraktion zweier Zahlen aus"); + System.out.println("6:2=" +(6/2) ); + } +} diff --git a/Java/Division/Division_1/Division_1.iml b/Java/Division/Division_1/Division_1.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Division/Division_1/Division_1.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Division/Division_1/build.xml b/Java/Division/Division_1/build.xml new file mode 100644 index 0000000..297238d --- /dev/null +++ b/Java/Division/Division_1/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Division_1. + + + diff --git a/Java/Division/Division_1/build/classes/.netbeans_automatic_build b/Java/Division/Division_1/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Division/Division_1/build/classes/.netbeans_update_resources b/Java/Division/Division_1/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Division/Division_1/build/classes/division_1/Division_1.class b/Java/Division/Division_1/build/classes/division_1/Division_1.class new file mode 100644 index 0000000..d28c059 Binary files /dev/null and b/Java/Division/Division_1/build/classes/division_1/Division_1.class differ diff --git a/Java/Division/Division_1/manifest.mf b/Java/Division/Division_1/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Division/Division_1/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Division/Division_1/nbproject/build-impl.xml b/Java/Division/Division_1/nbproject/build-impl.xml new file mode 100644 index 0000000..57caad1 --- /dev/null +++ b/Java/Division/Division_1/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Division/Division_1/nbproject/genfiles.properties b/Java/Division/Division_1/nbproject/genfiles.properties new file mode 100644 index 0000000..4db750b --- /dev/null +++ b/Java/Division/Division_1/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=053fac90 +build.xml.script.CRC32=be202605 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=053fac90 +nbproject/build-impl.xml.script.CRC32=5819477b +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Division/Division_1/nbproject/private/private.properties b/Java/Division/Division_1/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Division/Division_1/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Division/Division_1/nbproject/private/private.xml b/Java/Division/Division_1/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Division/Division_1/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Division/Division_1/nbproject/project.properties b/Java/Division/Division_1/nbproject/project.properties new file mode 100644 index 0000000..fb9a96f --- /dev/null +++ b/Java/Division/Division_1/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Division_1.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=division_1.Division_1 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Division/Division_1/nbproject/project.xml b/Java/Division/Division_1/nbproject/project.xml new file mode 100644 index 0000000..00f5ead --- /dev/null +++ b/Java/Division/Division_1/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Division_1 + + + + + + + + + diff --git a/Java/Division/Division_1/src/division_1/Division_1.java b/Java/Division/Division_1/src/division_1/Division_1.java new file mode 100644 index 0000000..57683a4 --- /dev/null +++ b/Java/Division/Division_1/src/division_1/Division_1.java @@ -0,0 +1,13 @@ +package division_1; +public class Division_1 +{ + public static void main(String[] args) + { + int divisor, divident, quotient; + divisor=6; + divident=2; + quotient=divisor/divident; + System.out.print("Diese programm führt eine Division zweier Zahlen aus: "); + System.out.println(divisor+"/"+divident+"="+quotient); + } +} diff --git a/Java/Division/Division_2/Division_2.iml b/Java/Division/Division_2/Division_2.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Division/Division_2/Division_2.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Division/Division_2/build.xml b/Java/Division/Division_2/build.xml new file mode 100644 index 0000000..0825dc0 --- /dev/null +++ b/Java/Division/Division_2/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Division_2. + + + diff --git a/Java/Division/Division_2/build/classes/.netbeans_automatic_build b/Java/Division/Division_2/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Division/Division_2/build/classes/.netbeans_update_resources b/Java/Division/Division_2/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Division/Division_2/build/classes/division_2/Division_2.class b/Java/Division/Division_2/build/classes/division_2/Division_2.class new file mode 100644 index 0000000..7ac899e Binary files /dev/null and b/Java/Division/Division_2/build/classes/division_2/Division_2.class differ diff --git a/Java/Division/Division_2/manifest.mf b/Java/Division/Division_2/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Division/Division_2/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Division/Division_2/nbproject/build-impl.xml b/Java/Division/Division_2/nbproject/build-impl.xml new file mode 100644 index 0000000..11293f9 --- /dev/null +++ b/Java/Division/Division_2/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Division/Division_2/nbproject/genfiles.properties b/Java/Division/Division_2/nbproject/genfiles.properties new file mode 100644 index 0000000..26fdd27 --- /dev/null +++ b/Java/Division/Division_2/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=1d0b38fa +build.xml.script.CRC32=e42db7db +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=1d0b38fa +nbproject/build-impl.xml.script.CRC32=f67c69dd +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Division/Division_2/nbproject/private/private.properties b/Java/Division/Division_2/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Division/Division_2/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Division/Division_2/nbproject/private/private.xml b/Java/Division/Division_2/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Division/Division_2/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Division/Division_2/nbproject/project.properties b/Java/Division/Division_2/nbproject/project.properties new file mode 100644 index 0000000..aea1d51 --- /dev/null +++ b/Java/Division/Division_2/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Division_2.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=division_2.Division_2 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Division/Division_2/nbproject/project.xml b/Java/Division/Division_2/nbproject/project.xml new file mode 100644 index 0000000..86d0f64 --- /dev/null +++ b/Java/Division/Division_2/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Division_2 + + + + + + + + + diff --git a/Java/Division/Division_2/src/division_2/Division_2.java b/Java/Division/Division_2/src/division_2/Division_2.java new file mode 100644 index 0000000..41ccc8d --- /dev/null +++ b/Java/Division/Division_2/src/division_2/Division_2.java @@ -0,0 +1,17 @@ +package division_2; +import java.util.Scanner; +public class Division_2 +{ + public static void main(String[] args) + { + Scanner scan = new Scanner( System.in ); + int divisor=0, divident=0, quotient=0; + System.out.println("Geben Sie nun den Divisor ein. (Bestätigen sie mit Enter"); + divisor=scan.nextInt(); + System.out.println("Geben Sie nun den Divident ein. (Bestätigen sie mit Enter"); + divident=scan.nextInt(); + quotient=divisor/divident; + System.out.print("Diese programm führt eine Division zweier Zahlen aus: "); + System.out.println(divisor+"/"+divident+"="+quotient); + } +} diff --git a/Java/Fenster/Fenster.iml b/Java/Fenster/Fenster.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Fenster/Fenster.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Fenster/build.xml b/Java/Fenster/build.xml new file mode 100644 index 0000000..0d55484 --- /dev/null +++ b/Java/Fenster/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Fenster. + + + diff --git a/Java/Fenster/build/classes/.netbeans_automatic_build b/Java/Fenster/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Fenster/build/classes/.netbeans_update_resources b/Java/Fenster/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Fenster/build/classes/fenster/Fenster.class b/Java/Fenster/build/classes/fenster/Fenster.class new file mode 100644 index 0000000..c1c671f Binary files /dev/null and b/Java/Fenster/build/classes/fenster/Fenster.class differ diff --git a/Java/Fenster/build/classes/fenster/Window$1.class b/Java/Fenster/build/classes/fenster/Window$1.class new file mode 100644 index 0000000..fa8a97b Binary files /dev/null and b/Java/Fenster/build/classes/fenster/Window$1.class differ diff --git a/Java/Fenster/build/classes/fenster/Window$2.class b/Java/Fenster/build/classes/fenster/Window$2.class new file mode 100644 index 0000000..48c79f8 Binary files /dev/null and b/Java/Fenster/build/classes/fenster/Window$2.class differ diff --git a/Java/Fenster/build/classes/fenster/Window$3.class b/Java/Fenster/build/classes/fenster/Window$3.class new file mode 100644 index 0000000..00f979e Binary files /dev/null and b/Java/Fenster/build/classes/fenster/Window$3.class differ diff --git a/Java/Fenster/build/classes/fenster/Window$4.class b/Java/Fenster/build/classes/fenster/Window$4.class new file mode 100644 index 0000000..7a18890 Binary files /dev/null and b/Java/Fenster/build/classes/fenster/Window$4.class differ diff --git a/Java/Fenster/build/classes/fenster/Window.class b/Java/Fenster/build/classes/fenster/Window.class new file mode 100644 index 0000000..4e5ea63 Binary files /dev/null and b/Java/Fenster/build/classes/fenster/Window.class differ diff --git a/Java/Fenster/build/classes/fenster/Window.form b/Java/Fenster/build/classes/fenster/Window.form new file mode 100644 index 0000000..b08d9b3 --- /dev/null +++ b/Java/Fenster/build/classes/fenster/Window.form @@ -0,0 +1,99 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/Fenster/manifest.mf b/Java/Fenster/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Fenster/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Fenster/nbproject/build-impl.xml b/Java/Fenster/nbproject/build-impl.xml new file mode 100644 index 0000000..295ef97 --- /dev/null +++ b/Java/Fenster/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Fenster/nbproject/genfiles.properties b/Java/Fenster/nbproject/genfiles.properties new file mode 100644 index 0000000..f3c3ce2 --- /dev/null +++ b/Java/Fenster/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=2350f5f8 +build.xml.script.CRC32=73da890f +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=2350f5f8 +nbproject/build-impl.xml.script.CRC32=f8fe1dd1 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Fenster/nbproject/private/private.properties b/Java/Fenster/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Fenster/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Fenster/nbproject/private/private.xml b/Java/Fenster/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Fenster/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Fenster/nbproject/project.properties b/Java/Fenster/nbproject/project.properties new file mode 100644 index 0000000..dbfcca1 --- /dev/null +++ b/Java/Fenster/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Fenster.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=fenster.Fenster +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Fenster/nbproject/project.xml b/Java/Fenster/nbproject/project.xml new file mode 100644 index 0000000..a7137ac --- /dev/null +++ b/Java/Fenster/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Fenster + + + + + + + + + diff --git a/Java/Fenster/src/fenster/Fenster.java b/Java/Fenster/src/fenster/Fenster.java new file mode 100644 index 0000000..9daffa9 --- /dev/null +++ b/Java/Fenster/src/fenster/Fenster.java @@ -0,0 +1,20 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package fenster; + +/** + * + * @author kuchelmeister.hannes + */ +public class Fenster { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + Window w = new Window(); + w.setVisible(true); + } +} diff --git a/Java/Fenster/src/fenster/Window.form b/Java/Fenster/src/fenster/Window.form new file mode 100644 index 0000000..b08d9b3 --- /dev/null +++ b/Java/Fenster/src/fenster/Window.form @@ -0,0 +1,99 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/Fenster/src/fenster/Window.java b/Java/Fenster/src/fenster/Window.java new file mode 100644 index 0000000..0eaa5d8 --- /dev/null +++ b/Java/Fenster/src/fenster/Window.java @@ -0,0 +1,166 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package fenster; + +/** + * + * @author kuchelmeister.hannes + */ +public class Window extends javax.swing.JFrame { + + /** + * Creates new form Window + */ + public Window() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jScrollPane1 = new javax.swing.JScrollPane(); + Ausgabe = new javax.swing.JTextArea(); + jToggleButton1 = new javax.swing.JToggleButton(); + jToggleButton2 = new javax.swing.JToggleButton(); + jToggleButton3 = new javax.swing.JToggleButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + Ausgabe.setColumns(20); + Ausgabe.setRows(5); + jScrollPane1.setViewportView(Ausgabe); + + jToggleButton1.setText("Muster A"); + jToggleButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jToggleButton1ActionPerformed(evt); + } + }); + + jToggleButton2.setText("Muster B"); + jToggleButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jToggleButton2ActionPerformed(evt); + } + }); + + jToggleButton3.setText("Muster C"); + jToggleButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jToggleButton3ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane1) + .addGroup(layout.createSequentialGroup() + .addComponent(jToggleButton1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jToggleButton2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jToggleButton3) + .addGap(0, 143, Short.MAX_VALUE))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jToggleButton1) + .addComponent(jToggleButton2) + .addComponent(jToggleButton3)) + .addContainerGap()) + ); + + pack(); + }// //GEN-END:initComponents + + private void jToggleButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton1ActionPerformed + String text = ""; + for(int x = 1; x <=20; x++) + { + for(int y = 0; y < x; y++) + { + text += "*"; + } + text += "\n"; + } + this.Ausgabe.setText(text); + }//GEN-LAST:event_jToggleButton1ActionPerformed + + private void jToggleButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton2ActionPerformed + String text = ""; + for(int x = 20; x > 0; x--) + { + for(int y = 0; y < x; y++) + { + text += "*"; + } + text += "\n"; + } + this.Ausgabe.setText(text); + }//GEN-LAST:event_jToggleButton2ActionPerformed + + private void jToggleButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton3ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jToggleButton3ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Window.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Window.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Window.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Window.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Window().setVisible(true); + } + }); + } + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextArea Ausgabe; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JToggleButton jToggleButton1; + private javax.swing.JToggleButton jToggleButton2; + private javax.swing.JToggleButton jToggleButton3; + // End of variables declaration//GEN-END:variables +} diff --git a/Java/GeometrischeFiguren/GeometrischeFiguren.iml b/Java/GeometrischeFiguren/GeometrischeFiguren.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/GeometrischeFiguren/GeometrischeFiguren.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/GeometrischeFiguren/build.xml b/Java/GeometrischeFiguren/build.xml new file mode 100644 index 0000000..556036c --- /dev/null +++ b/Java/GeometrischeFiguren/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project GeometrischeFiguren. + + + diff --git a/Java/GeometrischeFiguren/build/classes/.netbeans_automatic_build b/Java/GeometrischeFiguren/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/GeometrischeFiguren/build/classes/.netbeans_update_resources b/Java/GeometrischeFiguren/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Dreieck.class b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Dreieck.class new file mode 100644 index 0000000..c534568 Binary files /dev/null and b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Dreieck.class differ diff --git a/Java/GeometrischeFiguren/build/classes/geometrischefiguren/GeometrischeFigurenOberfläche$1.class b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/GeometrischeFigurenOberfläche$1.class new file mode 100644 index 0000000..1603c16 Binary files /dev/null and b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/GeometrischeFigurenOberfläche$1.class differ diff --git a/Java/GeometrischeFiguren/build/classes/geometrischefiguren/GeometrischeFigurenOberfläche.class b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/GeometrischeFigurenOberfläche.class new file mode 100644 index 0000000..97e1bd5 Binary files /dev/null and b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/GeometrischeFigurenOberfläche.class differ diff --git a/Java/GeometrischeFiguren/build/classes/geometrischefiguren/GeometrischeFigurenOberfläche.form b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/GeometrischeFigurenOberfläche.form new file mode 100644 index 0000000..1e949f4 --- /dev/null +++ b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/GeometrischeFigurenOberfläche.form @@ -0,0 +1,35 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Kreis.class b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Kreis.class new file mode 100644 index 0000000..6eb2453 Binary files /dev/null and b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Kreis.class differ diff --git a/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Punkt.class b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Punkt.class new file mode 100644 index 0000000..8ac9dab Binary files /dev/null and b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Punkt.class differ diff --git a/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Strecke.class b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Strecke.class new file mode 100644 index 0000000..10fbaa0 Binary files /dev/null and b/Java/GeometrischeFiguren/build/classes/geometrischefiguren/Strecke.class differ diff --git a/Java/GeometrischeFiguren/manifest.mf b/Java/GeometrischeFiguren/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/GeometrischeFiguren/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/GeometrischeFiguren/nbproject/build-impl.xml b/Java/GeometrischeFiguren/nbproject/build-impl.xml new file mode 100644 index 0000000..6336cbe --- /dev/null +++ b/Java/GeometrischeFiguren/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/GeometrischeFiguren/nbproject/genfiles.properties b/Java/GeometrischeFiguren/nbproject/genfiles.properties new file mode 100644 index 0000000..dde96dc --- /dev/null +++ b/Java/GeometrischeFiguren/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=c64e73ce +build.xml.script.CRC32=b312c9e2 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=c64e73ce +nbproject/build-impl.xml.script.CRC32=b8ca8051 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/GeometrischeFiguren/nbproject/private/private.properties b/Java/GeometrischeFiguren/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/GeometrischeFiguren/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/GeometrischeFiguren/nbproject/private/private.xml b/Java/GeometrischeFiguren/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/GeometrischeFiguren/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/GeometrischeFiguren/nbproject/project.properties b/Java/GeometrischeFiguren/nbproject/project.properties new file mode 100644 index 0000000..b97507a --- /dev/null +++ b/Java/GeometrischeFiguren/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/GeometrischeFiguren.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=geometrischefiguren.GeometrischeFigurenOberfl\u00e4che +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/GeometrischeFiguren/nbproject/project.xml b/Java/GeometrischeFiguren/nbproject/project.xml new file mode 100644 index 0000000..7d9a303 --- /dev/null +++ b/Java/GeometrischeFiguren/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + GeometrischeFiguren + + + + + + + + + diff --git a/Java/GeometrischeFiguren/src/geometrischefiguren/Dreieck.java b/Java/GeometrischeFiguren/src/geometrischefiguren/Dreieck.java new file mode 100644 index 0000000..95dde7b --- /dev/null +++ b/Java/GeometrischeFiguren/src/geometrischefiguren/Dreieck.java @@ -0,0 +1,40 @@ +package geometrischefiguren; + +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.geom.GeneralPath; + +public class Dreieck extends Strecke { + + protected Strecke _b, _a; + + public Dreieck(Punkt a, Punkt b, Punkt c) { + super(a, b); + this._a = new Strecke(b, c); + this._b = new Strecke(c, a); + } + + @Override + public void zeichne(Graphics g) { +// super.zeichne(g); +// _a.zeichne(g); +// _b.zeichne(g); + // draw GeneralPath (polygon) + + int x1Points[] = {this.x, this._a.x, this._b.x}; + int y1Points[] = {this.y, this._a.y, this._b.y}; + GeneralPath polygon = + new GeneralPath(GeneralPath.WIND_EVEN_ODD, + x1Points.length); + polygon.moveTo(x1Points[0], y1Points[0]); + + for (int index = 1; index < x1Points.length; index++) { + polygon.lineTo(x1Points[index], y1Points[index]); + }; + + polygon.closePath(); + ((Graphics2D)g).draw(polygon); + //((Graphics2D)g).fill(polygon); + + } +} diff --git a/Java/GeometrischeFiguren/src/geometrischefiguren/GeometrischeFigurenOberfläche.form b/Java/GeometrischeFiguren/src/geometrischefiguren/GeometrischeFigurenOberfläche.form new file mode 100644 index 0000000..1e949f4 --- /dev/null +++ b/Java/GeometrischeFiguren/src/geometrischefiguren/GeometrischeFigurenOberfläche.form @@ -0,0 +1,35 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/GeometrischeFiguren/src/geometrischefiguren/GeometrischeFigurenOberfläche.java b/Java/GeometrischeFiguren/src/geometrischefiguren/GeometrischeFigurenOberfläche.java new file mode 100644 index 0000000..03da906 --- /dev/null +++ b/Java/GeometrischeFiguren/src/geometrischefiguren/GeometrischeFigurenOberfläche.java @@ -0,0 +1,97 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package geometrischefiguren; + +import java.awt.Graphics; +import java.util.ArrayList; + +/** + * + * @author Hannes + */ +public class GeometrischeFigurenOberfläche extends javax.swing.JFrame { + ArrayList p = new ArrayList(); + + /** + * Creates new form GeometrischeFigurenOberfläche + */ + public GeometrischeFigurenOberfläche() { + initComponents(); + p.add(new Kreis(new Punkt(150, 150), 50)); + p.add(new Punkt(10, 100)); + p.add(new Strecke(10, 20, new Punkt(100, 100))); + p.add(new Dreieck(new Punkt(100,200), new Punkt(200, 300), new Punkt(10, 10))); + } + + @Override + public void paint(Graphics g) { + super.paint(g); + for (Punkt m : p) { + m.zeichne(g); + } + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 400, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 300, Short.MAX_VALUE) + ); + + pack(); + }// //GEN-END:initComponents + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(GeometrischeFigurenOberfläche.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(GeometrischeFigurenOberfläche.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(GeometrischeFigurenOberfläche.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(GeometrischeFigurenOberfläche.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new GeometrischeFigurenOberfläche().setVisible(true); + } + }); + } + // Variables declaration - do not modify//GEN-BEGIN:variables + // End of variables declaration//GEN-END:variables +} diff --git a/Java/GeometrischeFiguren/src/geometrischefiguren/Kreis.java b/Java/GeometrischeFiguren/src/geometrischefiguren/Kreis.java new file mode 100644 index 0000000..2a1f01a --- /dev/null +++ b/Java/GeometrischeFiguren/src/geometrischefiguren/Kreis.java @@ -0,0 +1,28 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package geometrischefiguren; + +import java.awt.Graphics; + +/** + * + * @author Hannes + */ +public class Kreis extends Punkt { + + int r; + + public Kreis(Punkt p, int radius) { + super(p.x, p.y); + r = radius; + } + + @Override + public void zeichne(Graphics g) { + super.zeichne(g); + g.drawOval(x - r, y - r, r*2, r*2); + + } +} diff --git a/Java/GeometrischeFiguren/src/geometrischefiguren/Punkt.java b/Java/GeometrischeFiguren/src/geometrischefiguren/Punkt.java new file mode 100644 index 0000000..d72098a --- /dev/null +++ b/Java/GeometrischeFiguren/src/geometrischefiguren/Punkt.java @@ -0,0 +1,33 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package geometrischefiguren; + +import java.awt.Graphics; + +/** + * + * @author Hannes + */ +public class Punkt { + protected int x, y; //Koordinaten in der Zeichnung + + public Punkt(int posX, int posY) + { + this.x = posX; + this.y = posY; + } + + public void zeichne(Graphics g) + { + g.drawRect(x, y, 1, 1); + } + + @Override + public String toString() + { + return "(" + x + "," + y + ")"; + } + +} diff --git a/Java/GeometrischeFiguren/src/geometrischefiguren/Strecke.java b/Java/GeometrischeFiguren/src/geometrischefiguren/Strecke.java new file mode 100644 index 0000000..a3cf5b5 --- /dev/null +++ b/Java/GeometrischeFiguren/src/geometrischefiguren/Strecke.java @@ -0,0 +1,46 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package geometrischefiguren; + +import java.awt.Graphics; + +/** + * + * @author Hannes + */ +public class Strecke extends Punkt { + protected Punkt _ende; + protected double länge; + + public Strecke(Punkt anfang, Punkt ende) + { + super(anfang.x, anfang.y); //Super ruft den Konstruktor der Elternklasse Punkt auf + //ererbte eigenschaft hat somit die Bedeutung des Punktes von dem aus gezeichnet wird + this._ende = ende; + setLänge(); + } + public Strecke(int x, int y, Punkt ende) + { + super(x,y); + this._ende = ende; + setLänge(); + } + @Override + public void zeichne(Graphics g) + { + g.drawLine(x, y, _ende.x, _ende.y); + } + @Override + public String toString() + { + return "Strecke(" + super.toString() + " bis " + _ende + "; länge( " + länge + " ))"; + } + private void setLänge() + { + int deltaX = x - _ende.x; + int deltaY = y - _ende.y; + länge = Math.sqrt(deltaX*deltaX + deltaY*deltaY); // sqrt(a^2 + b^2) + } +} diff --git a/Java/HA-Test_1/HA-Test_1.iml b/Java/HA-Test_1/HA-Test_1.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/HA-Test_1/HA-Test_1.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/HA-Test_1/build.xml b/Java/HA-Test_1/build.xml new file mode 100644 index 0000000..5657497 --- /dev/null +++ b/Java/HA-Test_1/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project HA-Test_1. + + + diff --git a/Java/HA-Test_1/build/classes/.netbeans_automatic_build b/Java/HA-Test_1/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/HA-Test_1/build/classes/.netbeans_update_resources b/Java/HA-Test_1/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/HA-Test_1/build/classes/ha/test_1/HATest_1.class b/Java/HA-Test_1/build/classes/ha/test_1/HATest_1.class new file mode 100644 index 0000000..601f0ec Binary files /dev/null and b/Java/HA-Test_1/build/classes/ha/test_1/HATest_1.class differ diff --git a/Java/HA-Test_1/manifest.mf b/Java/HA-Test_1/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/HA-Test_1/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/HA-Test_1/nbproject/build-impl.xml b/Java/HA-Test_1/nbproject/build-impl.xml new file mode 100644 index 0000000..953a574 --- /dev/null +++ b/Java/HA-Test_1/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/HA-Test_1/nbproject/genfiles.properties b/Java/HA-Test_1/nbproject/genfiles.properties new file mode 100644 index 0000000..24e9d04 --- /dev/null +++ b/Java/HA-Test_1/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=0e835436 +build.xml.script.CRC32=8262c8ea +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=0e835436 +nbproject/build-impl.xml.script.CRC32=f80ebc33 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/HA-Test_1/nbproject/private/private.properties b/Java/HA-Test_1/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/HA-Test_1/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/HA-Test_1/nbproject/private/private.xml b/Java/HA-Test_1/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/HA-Test_1/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/HA-Test_1/nbproject/project.properties b/Java/HA-Test_1/nbproject/project.properties new file mode 100644 index 0000000..0c76914 --- /dev/null +++ b/Java/HA-Test_1/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/HA-Test_1.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=ha.test_1.HATest_1 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/HA-Test_1/nbproject/project.xml b/Java/HA-Test_1/nbproject/project.xml new file mode 100644 index 0000000..efa2ae6 --- /dev/null +++ b/Java/HA-Test_1/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + HA-Test_1 + + + + + + + + + diff --git a/Java/HA-Test_1/src/ha/test_1/HATest_1.java b/Java/HA-Test_1/src/ha/test_1/HATest_1.java new file mode 100644 index 0000000..909b3bf --- /dev/null +++ b/Java/HA-Test_1/src/ha/test_1/HATest_1.java @@ -0,0 +1,26 @@ +package ha.test_1; +import java.util.Scanner; +public class HATest_1 +{ + public static void main(String[] args) + { + Scanner scan = new Scanner( System.in ); + String name1="", name2=""; + int summand1=0, summand2=0, summe=0; + System.out.println("Bitte geben Sie den ersten Namen ein. (Bestätigen Sie mit Enter.)"); + name1=scan.nextLine(); + System.out.println("Bitte geben Sie den zweiten Namen ein. (Bestätigen Sie mit Enter.)"); + name2=scan.nextLine(); + System.out.println("Bitte geben Sie nun den ersten Summanden ein. (Bestätigen Sie mit Enter.)"); + summand1=scan.nextInt(); + System.out.println("Bitte geben Sie nun den zweiten Summanden ein. (Bestätigen Sie mit Enter.)"); + summand2=scan.nextInt(); + summe=summand1+summand2; + System.out.println("Hallo "+name1+","); + System.out.println("dieses Programm addiert zwei beliebeige Zahlen,"); + System.out.println("z.B. "+summand1+"+"+summand2+"="+summe+"."); + System.out.println("Zeig das bitte mal "+name2+" zum überprüfen, "); + System.out.println("ob die Summe von "+summand1+" und "+summand2); + System.out.println("wirklich "+summe+" ergibt."); + } +} diff --git a/Java/IF/IF_01/IF_01.iml b/Java/IF/IF_01/IF_01.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/IF/IF_01/IF_01.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/IF/IF_01/build.xml b/Java/IF/IF_01/build.xml new file mode 100644 index 0000000..1429070 --- /dev/null +++ b/Java/IF/IF_01/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project IF_01. + + + diff --git a/Java/IF/IF_01/build/classes/.netbeans_automatic_build b/Java/IF/IF_01/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/IF/IF_01/build/classes/.netbeans_update_resources b/Java/IF/IF_01/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/IF/IF_01/build/classes/if_01/IF_01.class b/Java/IF/IF_01/build/classes/if_01/IF_01.class new file mode 100644 index 0000000..547d837 Binary files /dev/null and b/Java/IF/IF_01/build/classes/if_01/IF_01.class differ diff --git a/Java/IF/IF_01/manifest.mf b/Java/IF/IF_01/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/IF/IF_01/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/IF/IF_01/nbproject/build-impl.xml b/Java/IF/IF_01/nbproject/build-impl.xml new file mode 100644 index 0000000..35a0893 --- /dev/null +++ b/Java/IF/IF_01/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/IF/IF_01/nbproject/genfiles.properties b/Java/IF/IF_01/nbproject/genfiles.properties new file mode 100644 index 0000000..f931d36 --- /dev/null +++ b/Java/IF/IF_01/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=95072a7c +build.xml.script.CRC32=97aa8e49 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=95072a7c +nbproject/build-impl.xml.script.CRC32=a590f446 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/IF/IF_01/nbproject/private/private.properties b/Java/IF/IF_01/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/IF/IF_01/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/IF/IF_01/nbproject/private/private.xml b/Java/IF/IF_01/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/IF/IF_01/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/IF/IF_01/nbproject/project.properties b/Java/IF/IF_01/nbproject/project.properties new file mode 100644 index 0000000..d0ea4e0 --- /dev/null +++ b/Java/IF/IF_01/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/IF_01.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=if_01.IF_01 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/IF/IF_01/nbproject/project.xml b/Java/IF/IF_01/nbproject/project.xml new file mode 100644 index 0000000..06cce3a --- /dev/null +++ b/Java/IF/IF_01/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + IF_01 + + + + + + + + + diff --git a/Java/IF/IF_01/src/if_01/IF_01.java b/Java/IF/IF_01/src/if_01/IF_01.java new file mode 100644 index 0000000..4ddd9e1 --- /dev/null +++ b/Java/IF/IF_01/src/if_01/IF_01.java @@ -0,0 +1,19 @@ +package if_01; +import java.util.*; +public class IF_01 { + public static void main(String[] args) { + Random generator = new Random(); + + int zahl1 = generator.nextInt(); + double ergebnis = 0; + if(zahl1 > 0) + { + ergebnis = Math.sqrt(zahl1); + System.out.println("Wurzel aus " + zahl1 + " ergibt " + ergebnis); + } + else + { + System.out.println("Aus diser Zahl (" +zahl1+ ") kann keine Wurzel aus einer Zahl kleiner 0 ziehen."); + } + } +} diff --git a/Java/IF/IF_02/IF_02.iml b/Java/IF/IF_02/IF_02.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/IF/IF_02/IF_02.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/IF/IF_02/build.xml b/Java/IF/IF_02/build.xml new file mode 100644 index 0000000..9ef6551 --- /dev/null +++ b/Java/IF/IF_02/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project IF_02. + + + diff --git a/Java/IF/IF_02/build/classes/.netbeans_automatic_build b/Java/IF/IF_02/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/IF/IF_02/build/classes/.netbeans_update_resources b/Java/IF/IF_02/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/IF/IF_02/build/classes/if_02/IF_02.class b/Java/IF/IF_02/build/classes/if_02/IF_02.class new file mode 100644 index 0000000..81d6017 Binary files /dev/null and b/Java/IF/IF_02/build/classes/if_02/IF_02.class differ diff --git a/Java/IF/IF_02/manifest.mf b/Java/IF/IF_02/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/IF/IF_02/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/IF/IF_02/nbproject/build-impl.xml b/Java/IF/IF_02/nbproject/build-impl.xml new file mode 100644 index 0000000..cdf6131 --- /dev/null +++ b/Java/IF/IF_02/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/IF/IF_02/nbproject/genfiles.properties b/Java/IF/IF_02/nbproject/genfiles.properties new file mode 100644 index 0000000..ab1e79d --- /dev/null +++ b/Java/IF/IF_02/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=8d33be16 +build.xml.script.CRC32=49ee9984 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=8d33be16 +nbproject/build-impl.xml.script.CRC32=b388ef23 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/IF/IF_02/nbproject/private/private.properties b/Java/IF/IF_02/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/IF/IF_02/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/IF/IF_02/nbproject/private/private.xml b/Java/IF/IF_02/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/IF/IF_02/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/IF/IF_02/nbproject/project.properties b/Java/IF/IF_02/nbproject/project.properties new file mode 100644 index 0000000..6712d9d --- /dev/null +++ b/Java/IF/IF_02/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/IF_02.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=if_02.IF_02 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/IF/IF_02/nbproject/project.xml b/Java/IF/IF_02/nbproject/project.xml new file mode 100644 index 0000000..5da3d76 --- /dev/null +++ b/Java/IF/IF_02/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + IF_02 + + + + + + + + + diff --git a/Java/IF/IF_02/src/if_02/IF_02.java b/Java/IF/IF_02/src/if_02/IF_02.java new file mode 100644 index 0000000..d25ced1 --- /dev/null +++ b/Java/IF/IF_02/src/if_02/IF_02.java @@ -0,0 +1,28 @@ +package if_02; +import java.util.*; +public class IF_02 { + public static void main(String[] args) + { + Scanner scan = new Scanner( System.in); + int betrag=0, tag=0, monat=0, tage=0, monate=0; + double zinsen=0; + System.out.println("Bitte geben Sie nun den Betrag ein, den Sie einzahlen möchten."); + betrag=scan.nextInt(); + System.out.println("Bitte geben Sie nun zuerst den heutigen Tag und dann den momentanen Monat ein."); + tag=scan.nextInt(); + monat=scan.nextInt(); + zinsen=betrag*((30-tag)+30*(12-monat))*1.03/(360*100); + if(betrag>0 && betrag!=0) + { + System.out.println("Sie bekommen bis zum Jahresende "+zinsen+" Euro Zinsen."); + } + else if(betrag==0) + { + System.out.println("Sie machen weder neue Schulden, noch bekommen sie Zinsen"); + } + else + { + System.out.println("Sie machen "+zinsen+" Euro neue Schulden."); + } + } +} diff --git a/Java/IF/IF_03/IF_03.iml b/Java/IF/IF_03/IF_03.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/IF/IF_03/IF_03.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/IF/IF_03/build.xml b/Java/IF/IF_03/build.xml new file mode 100644 index 0000000..8c4d3a2 --- /dev/null +++ b/Java/IF/IF_03/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project IF_03. + + + diff --git a/Java/IF/IF_03/build/classes/.netbeans_automatic_build b/Java/IF/IF_03/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/IF/IF_03/build/classes/.netbeans_update_resources b/Java/IF/IF_03/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/IF/IF_03/build/classes/if_03/IF_03.class b/Java/IF/IF_03/build/classes/if_03/IF_03.class new file mode 100644 index 0000000..4651123 Binary files /dev/null and b/Java/IF/IF_03/build/classes/if_03/IF_03.class differ diff --git a/Java/IF/IF_03/manifest.mf b/Java/IF/IF_03/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/IF/IF_03/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/IF/IF_03/nbproject/build-impl.xml b/Java/IF/IF_03/nbproject/build-impl.xml new file mode 100644 index 0000000..27f9585 --- /dev/null +++ b/Java/IF/IF_03/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/IF/IF_03/nbproject/genfiles.properties b/Java/IF/IF_03/nbproject/genfiles.properties new file mode 100644 index 0000000..1c70630 --- /dev/null +++ b/Java/IF/IF_03/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=85203230 +build.xml.script.CRC32=b5026900 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=85203230 +nbproject/build-impl.xml.script.CRC32=08afe43f +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/IF/IF_03/nbproject/private/private.properties b/Java/IF/IF_03/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/IF/IF_03/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/IF/IF_03/nbproject/project.properties b/Java/IF/IF_03/nbproject/project.properties new file mode 100644 index 0000000..9bb434c --- /dev/null +++ b/Java/IF/IF_03/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/IF_03.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=if_03.IF_03 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/IF/IF_03/nbproject/project.xml b/Java/IF/IF_03/nbproject/project.xml new file mode 100644 index 0000000..8289329 --- /dev/null +++ b/Java/IF/IF_03/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + IF_03 + + + + + + + + + diff --git a/Java/IF/IF_03/src/if_03/IF_03.java b/Java/IF/IF_03/src/if_03/IF_03.java new file mode 100644 index 0000000..d56929b --- /dev/null +++ b/Java/IF/IF_03/src/if_03/IF_03.java @@ -0,0 +1,16 @@ +package if_03; +public class IF_03 { + public static void main(String[] args) { + double zahl1 = 2; + double zahl2 = 3; + double zahl3 = 4; + if(Math.pow(zahl1, 2) >= zahl3 && Math.pow(zahl2, 2) >= zahl3) + { + System.out.println("blue"); + } + else + { + System.out.println("rot"); + } + } +} diff --git a/Java/JosefProblem/JosefProblem.iml b/Java/JosefProblem/JosefProblem.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/JosefProblem/JosefProblem.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/JosefProblem/build.xml b/Java/JosefProblem/build.xml new file mode 100644 index 0000000..1041f74 --- /dev/null +++ b/Java/JosefProblem/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project JosefProblem. + + + diff --git a/Java/JosefProblem/build/classes/.netbeans_automatic_build b/Java/JosefProblem/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/JosefProblem/build/classes/.netbeans_update_resources b/Java/JosefProblem/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/JosefProblem/build/classes/josefproblem/JosefProblem.class b/Java/JosefProblem/build/classes/josefproblem/JosefProblem.class new file mode 100644 index 0000000..d9f1fa9 Binary files /dev/null and b/Java/JosefProblem/build/classes/josefproblem/JosefProblem.class differ diff --git a/Java/JosefProblem/manifest.mf b/Java/JosefProblem/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/JosefProblem/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/JosefProblem/nbproject/build-impl.xml b/Java/JosefProblem/nbproject/build-impl.xml new file mode 100644 index 0000000..6c59028 --- /dev/null +++ b/Java/JosefProblem/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/JosefProblem/nbproject/genfiles.properties b/Java/JosefProblem/nbproject/genfiles.properties new file mode 100644 index 0000000..0b1c6a4 --- /dev/null +++ b/Java/JosefProblem/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=8329fe50 +build.xml.script.CRC32=924367a2 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=8329fe50 +nbproject/build-impl.xml.script.CRC32=e7a41867 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/JosefProblem/nbproject/private/private.properties b/Java/JosefProblem/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/JosefProblem/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/JosefProblem/nbproject/private/private.xml b/Java/JosefProblem/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/JosefProblem/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/JosefProblem/nbproject/project.properties b/Java/JosefProblem/nbproject/project.properties new file mode 100644 index 0000000..9874037 --- /dev/null +++ b/Java/JosefProblem/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/JosefProblem.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=josefproblem.JosefProblem +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/JosefProblem/nbproject/project.xml b/Java/JosefProblem/nbproject/project.xml new file mode 100644 index 0000000..73fd717 --- /dev/null +++ b/Java/JosefProblem/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + JosefProblem + + + + + + + + + diff --git a/Java/JosefProblem/src/josefproblem/JosefProblem.java b/Java/JosefProblem/src/josefproblem/JosefProblem.java new file mode 100644 index 0000000..79d9b90 --- /dev/null +++ b/Java/JosefProblem/src/josefproblem/JosefProblem.java @@ -0,0 +1,35 @@ +package josefproblem; +public class JosefProblem { + public static void main(String[] args) { + // TODO code application logic here + boolean arr[] = new boolean[41]; + for (int i = 0; i < arr.length; i++) { + arr[i] = true; + } + + int b = 0; + int count = arr.length; + while (count > 1) { + String output = ""; + for (int i = 0; i < arr.length; i++) { + if (arr[i]) { + b++; + if (b % 3 == 0) { + arr[i] = false; + output += i + " stirbt | "; + count--; + //b = 0; + } + } + } + System.out.println(output); + } + //Ausgabe wenn Schleife zu ende + for (int i = 0; i < arr.length; i++) { + if (arr[i]) { + System.out.println("Stelle: " + i + " überlebt"); + // break; + } + } + } +} diff --git a/Java/JosefProlemObjektorientiert/JosefProlemObjektorientiert.iml b/Java/JosefProlemObjektorientiert/JosefProlemObjektorientiert.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/JosefProlemObjektorientiert/JosefProlemObjektorientiert.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/JosefProlemObjektorientiert/build.xml b/Java/JosefProlemObjektorientiert/build.xml new file mode 100644 index 0000000..68a7daf --- /dev/null +++ b/Java/JosefProlemObjektorientiert/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project JosefProlemObjektorientiert. + + + diff --git a/Java/JosefProlemObjektorientiert/build/classes/.netbeans_automatic_build b/Java/JosefProlemObjektorientiert/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/JosefProlemObjektorientiert/build/classes/.netbeans_update_resources b/Java/JosefProlemObjektorientiert/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/JosefProlemObjektorientiert/build/classes/josefprolemobjektorientiert/JosefProlemObjektorientiert.class b/Java/JosefProlemObjektorientiert/build/classes/josefprolemobjektorientiert/JosefProlemObjektorientiert.class new file mode 100644 index 0000000..e16d623 Binary files /dev/null and b/Java/JosefProlemObjektorientiert/build/classes/josefprolemobjektorientiert/JosefProlemObjektorientiert.class differ diff --git a/Java/JosefProlemObjektorientiert/build/classes/josefprolemobjektorientiert/Person.class b/Java/JosefProlemObjektorientiert/build/classes/josefprolemobjektorientiert/Person.class new file mode 100644 index 0000000..9603b39 Binary files /dev/null and b/Java/JosefProlemObjektorientiert/build/classes/josefprolemobjektorientiert/Person.class differ diff --git a/Java/JosefProlemObjektorientiert/manifest.mf b/Java/JosefProlemObjektorientiert/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/JosefProlemObjektorientiert/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/JosefProlemObjektorientiert/nbproject/build-impl.xml b/Java/JosefProlemObjektorientiert/nbproject/build-impl.xml new file mode 100644 index 0000000..dec2a7b --- /dev/null +++ b/Java/JosefProlemObjektorientiert/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/JosefProlemObjektorientiert/nbproject/genfiles.properties b/Java/JosefProlemObjektorientiert/nbproject/genfiles.properties new file mode 100644 index 0000000..6163bc8 --- /dev/null +++ b/Java/JosefProlemObjektorientiert/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=1c6e50b2 +build.xml.script.CRC32=7be94971 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=1c6e50b2 +nbproject/build-impl.xml.script.CRC32=163ead6c +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/JosefProlemObjektorientiert/nbproject/private/private.properties b/Java/JosefProlemObjektorientiert/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/JosefProlemObjektorientiert/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/JosefProlemObjektorientiert/nbproject/private/private.xml b/Java/JosefProlemObjektorientiert/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/JosefProlemObjektorientiert/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/JosefProlemObjektorientiert/nbproject/project.properties b/Java/JosefProlemObjektorientiert/nbproject/project.properties new file mode 100644 index 0000000..b64fe6e --- /dev/null +++ b/Java/JosefProlemObjektorientiert/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/JosefProlemObjektorientiert.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=josefprolemobjektorientiert.JosefProlemObjektorientiert +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/JosefProlemObjektorientiert/nbproject/project.xml b/Java/JosefProlemObjektorientiert/nbproject/project.xml new file mode 100644 index 0000000..254bc65 --- /dev/null +++ b/Java/JosefProlemObjektorientiert/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + JosefProlemObjektorientiert + + + + + + + + + diff --git a/Java/JosefProlemObjektorientiert/src/josefprolemobjektorientiert/JosefProlemObjektorientiert.java b/Java/JosefProlemObjektorientiert/src/josefprolemobjektorientiert/JosefProlemObjektorientiert.java new file mode 100644 index 0000000..b4dd832 --- /dev/null +++ b/Java/JosefProlemObjektorientiert/src/josefprolemobjektorientiert/JosefProlemObjektorientiert.java @@ -0,0 +1,69 @@ +package josefprolemobjektorientiert; + +public class JosefProlemObjektorientiert { + + public static void main(String[] args) { + Person erster = new Person(1); + int personenCount = 41; + for (int i = personenCount; i > 1; i--) { + erster.addNext(new Person(i)); + } + Person current = erster; + int counter = 0; + Ausgabe(current); + counter = 0; + do { + counter ++; + if (counter % 3 == 0) { + current = current.remove(); + Ausgabe(current); + } else { + current = current.next; + } + } while (current != current.next); + + + } + + public static void Ausgabe(Person current) { + Person erster = current; + do { + System.out.print(current + " "); + current = current.next; + + } while (current != erster); + + System.out.println(); + } +} + +class Person { + + private int id = 0; + public Person next, previous; + + public Person(int nr) { + this.id = nr; + next = this; + previous = this; + } + + public void addNext(Person p) { + p.next = this.next; + p.previous = this; + + this.next.previous = p; + this.next = p; + } + + @Override + public String toString() { + return Integer.toString(id); + } + + public Person remove() { + this.next.previous = this.previous; + this.previous.next = this.next; + return this.next; + } +} diff --git a/Java/Kochkurve/Kochkurve.iml b/Java/Kochkurve/Kochkurve.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Kochkurve/Kochkurve.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Kochkurve/build.xml b/Java/Kochkurve/build.xml new file mode 100644 index 0000000..4dc948d --- /dev/null +++ b/Java/Kochkurve/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Kochkurve. + + + diff --git a/Java/Kochkurve/build/classes/.netbeans_automatic_build b/Java/Kochkurve/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Kochkurve/build/classes/.netbeans_update_resources b/Java/Kochkurve/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Kochkurve/build/classes/kochkurve/KKurve.class b/Java/Kochkurve/build/classes/kochkurve/KKurve.class new file mode 100644 index 0000000..1de1b6d Binary files /dev/null and b/Java/Kochkurve/build/classes/kochkurve/KKurve.class differ diff --git a/Java/Kochkurve/build/classes/kochkurve/Kurve$1.class b/Java/Kochkurve/build/classes/kochkurve/Kurve$1.class new file mode 100644 index 0000000..3469077 Binary files /dev/null and b/Java/Kochkurve/build/classes/kochkurve/Kurve$1.class differ diff --git a/Java/Kochkurve/build/classes/kochkurve/Kurve.class b/Java/Kochkurve/build/classes/kochkurve/Kurve.class new file mode 100644 index 0000000..187afad Binary files /dev/null and b/Java/Kochkurve/build/classes/kochkurve/Kurve.class differ diff --git a/Java/Kochkurve/build/classes/kochkurve/Kurve.form b/Java/Kochkurve/build/classes/kochkurve/Kurve.form new file mode 100644 index 0000000..e7b4aa4 --- /dev/null +++ b/Java/Kochkurve/build/classes/kochkurve/Kurve.form @@ -0,0 +1,38 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/Kochkurve/manifest.mf b/Java/Kochkurve/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Kochkurve/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Kochkurve/nbproject/build-impl.xml b/Java/Kochkurve/nbproject/build-impl.xml new file mode 100644 index 0000000..28cba74 --- /dev/null +++ b/Java/Kochkurve/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Kochkurve/nbproject/genfiles.properties b/Java/Kochkurve/nbproject/genfiles.properties new file mode 100644 index 0000000..b92c471 --- /dev/null +++ b/Java/Kochkurve/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=d2f275d7 +build.xml.script.CRC32=10bc805b +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=d2f275d7 +nbproject/build-impl.xml.script.CRC32=b2883ddc +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Kochkurve/nbproject/private/private.properties b/Java/Kochkurve/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Kochkurve/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Kochkurve/nbproject/private/private.xml b/Java/Kochkurve/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Kochkurve/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Kochkurve/nbproject/project.properties b/Java/Kochkurve/nbproject/project.properties new file mode 100644 index 0000000..1d4b342 --- /dev/null +++ b/Java/Kochkurve/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Kochkurve.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=kochkurve.Kurve +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Kochkurve/nbproject/project.xml b/Java/Kochkurve/nbproject/project.xml new file mode 100644 index 0000000..0ec145a --- /dev/null +++ b/Java/Kochkurve/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Kochkurve + + + + + + + + + diff --git a/Java/Kochkurve/src/kochkurve/KKurve.java b/Java/Kochkurve/src/kochkurve/KKurve.java new file mode 100644 index 0000000..81d2e1f --- /dev/null +++ b/Java/Kochkurve/src/kochkurve/KKurve.java @@ -0,0 +1,62 @@ +package kochkurve; + +/* + * Klasse, die einen Text zur Kochkurve berechnet + * F steht für forwärts + * l steht für links drehen + * r steht für rechts drehen + */ + +public class KKurve { + private int maxLevel = 8; + private int level; + private String initiator = "F"; + private String generator ="FlFrrFlF"; + private String kkurve; + + public KKurve(int l) { + level = Math.min(maxLevel, l); + kkurve = generiereKurve(level,initiator); + // speichert den String, so muss er immer nur einmal berechnet werden + } + @Override public String toString() {return kkurve;} + + public void paint(java.awt.Graphics g) { + double länge = 800 / Math.pow(3,level), + x = 10.0, + y = 30.0, + x1, + y1, + winkel = 0.0; + for (char c: kkurve.toCharArray()) { + // Durchlaufe alle Buchstaben des Strings + switch (c) { + case 'F': + x1 = x + länge * Math.cos(winkel); + y1 = y + länge * Math.sin(winkel); + g.drawLine((int)x, (int)y, (int)x1, (int)y1); + x = x1; + y = y1; + break; + case 'l': + winkel += Math.PI/3; // 60° + break; + case 'r': + winkel -= Math.PI/3; + break; + } + } + } + /* + * generiereKurve liefert als Ergebnis einen String + * @param level: gibt an, die wievielte Generation ausgegeben werden soll + * @out: String, der den Verlauf der Kurve beschreibt + */ + private String generiereKurve(int level, String kurve){ + if (level == 0) { + return kurve.replaceAll(initiator, generator); + } else { + return generiereKurve(level - 1, kurve.replaceAll(initiator, generator)); + } + } +} diff --git a/Java/Kochkurve/src/kochkurve/Kurve.form b/Java/Kochkurve/src/kochkurve/Kurve.form new file mode 100644 index 0000000..e7b4aa4 --- /dev/null +++ b/Java/Kochkurve/src/kochkurve/Kurve.form @@ -0,0 +1,38 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/Kochkurve/src/kochkurve/Kurve.java b/Java/Kochkurve/src/kochkurve/Kurve.java new file mode 100644 index 0000000..2ad0d2b --- /dev/null +++ b/Java/Kochkurve/src/kochkurve/Kurve.java @@ -0,0 +1,81 @@ +/* + * Stellt die Kochkurve dar + * 1. interpretiert den String (Turtle-Grafik) + */ +package kochkurve; +import java.awt.Graphics; + +public class Kurve extends javax.swing.JFrame { + private KKurve k = new KKurve(6); + + public Kurve() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setPreferredSize(new java.awt.Dimension(800, 280)); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 400, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 300, Short.MAX_VALUE) + ); + + pack(); + }// //GEN-END:initComponents + + @Override public void paint(Graphics g) { + super.paint(g); + k.paint(g); + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Kurve.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Kurve.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Kurve.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Kurve.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Kurve().setVisible(true); + } + }); + } + // Variables declaration - do not modify//GEN-BEGIN:variables + // End of variables declaration//GEN-END:variables +} diff --git a/Java/Lotto/Lotto.iml b/Java/Lotto/Lotto.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Lotto/Lotto.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Lotto/build.xml b/Java/Lotto/build.xml new file mode 100644 index 0000000..7bb31d7 --- /dev/null +++ b/Java/Lotto/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Lotto. + + + diff --git a/Java/Lotto/build/classes/.netbeans_automatic_build b/Java/Lotto/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Lotto/build/classes/.netbeans_update_resources b/Java/Lotto/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Lotto/build/classes/lotto/Kugel.class b/Java/Lotto/build/classes/lotto/Kugel.class new file mode 100644 index 0000000..186b6a9 Binary files /dev/null and b/Java/Lotto/build/classes/lotto/Kugel.class differ diff --git a/Java/Lotto/build/classes/lotto/Lotto.class b/Java/Lotto/build/classes/lotto/Lotto.class new file mode 100644 index 0000000..9ab5a73 Binary files /dev/null and b/Java/Lotto/build/classes/lotto/Lotto.class differ diff --git a/Java/Lotto/build/classes/lotto/Ziehung.class b/Java/Lotto/build/classes/lotto/Ziehung.class new file mode 100644 index 0000000..96e648b Binary files /dev/null and b/Java/Lotto/build/classes/lotto/Ziehung.class differ diff --git a/Java/Lotto/manifest.mf b/Java/Lotto/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Lotto/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Lotto/nbproject/build-impl.xml b/Java/Lotto/nbproject/build-impl.xml new file mode 100644 index 0000000..e54e296 --- /dev/null +++ b/Java/Lotto/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Lotto/nbproject/genfiles.properties b/Java/Lotto/nbproject/genfiles.properties new file mode 100644 index 0000000..be411d2 --- /dev/null +++ b/Java/Lotto/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=dc281c34 +build.xml.script.CRC32=fe2fd2e0 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=dc281c34 +nbproject/build-impl.xml.script.CRC32=545d393f +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Lotto/nbproject/private/private.properties b/Java/Lotto/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Lotto/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Lotto/nbproject/private/private.xml b/Java/Lotto/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Lotto/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Lotto/nbproject/project.properties b/Java/Lotto/nbproject/project.properties new file mode 100644 index 0000000..65c5ac2 --- /dev/null +++ b/Java/Lotto/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Lotto.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=lotto.Lotto +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Lotto/nbproject/project.xml b/Java/Lotto/nbproject/project.xml new file mode 100644 index 0000000..0b1741d --- /dev/null +++ b/Java/Lotto/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Lotto + + + + + + + + + diff --git a/Java/Lotto/src/lotto/Lotto.java b/Java/Lotto/src/lotto/Lotto.java new file mode 100644 index 0000000..c01933c --- /dev/null +++ b/Java/Lotto/src/lotto/Lotto.java @@ -0,0 +1,125 @@ +package lotto; + +import java.util.Random; + +public class Lotto { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + Ziehung ziehung = new Ziehung((byte)6,(byte)49); + ziehung.zieheAlle(); + ziehung.ausgabeAlle(); + } +} + +class Kugel { + private byte nummer; + private Kugel nächste = null; + + // Konstuktor + public Kugel(byte nr) { + nummer = nr; + } + + // anfügen einer weiteren Kugel (hinten) + public void append(Kugel k) { + // erst das Ende der Liste suchen + Kugel aktuelleKugel = this; + while (aktuelleKugel.nächste != null) aktuelleKugel = aktuelleKugel.nächste; + // am Ende der Kette die neue Kugel anhängen + aktuelleKugel.nächste = k; + } + + // bestimmen der Länge von dieser Kugel aus gesehen + public int length() { + int i = 0; + Kugel k = this; + while (k.nächste != null) { + i++; + k = k.nächste; + } + return i; + } + + // Ausgabe, die eine Kugel macht + @Override public String toString() { return Integer.toString(nummer); } + + // getter und setter + public byte getNummer() { return nummer; } + public Kugel getNächste() { return nächste; } + public void setLetzte() { nächste = null; } + public void entferneNächste() { // setter für nächste + if (nächste != null) nächste = nächste.nächste; + } +} + +class Ziehung { + private Kugel topf; + private Kugel gezogene; + private byte anzahlAlle; + private byte anzahlGezogene; + + // Konstruktor + public Ziehung(byte aG, byte aA) { + anzahlGezogene = aG; + anzahlAlle = aA; + topf = new Kugel( (byte)1 ); + for (byte b = 2; b <= anzahlAlle ; b++) { topf.append(new Kugel(b)); } + gezogene = null; + } + + // zufälliges Entnehmen einer Kugel + public void ziehe() { + // Zufallszahl finden (von 0 bis length()-1) + int stelle = (new Random()).nextInt(topf.length()); + + // Kugel ausbinden + Kugel entnommene; + if (stelle == 0) { + // der Einstiegspunkt muss besonders behandelt werden + entnommene = topf; + topf = topf.getNächste(); + // nächste muss null werden (sonst ist die entnommene Kugel noch erste Kugel einer Kette) + entnommene.setLetzte(); + + if (gezogene == null) + gezogene = entnommene; + else + gezogene.append(entnommene); + + } else { + /* zu so und so vielten Kugel gehen + * vorherige Kugel auswählen, damit diese auch noch bearbeitet werden kann + */ + Kugel vorherigeKugel = topf; + for (int i = 0; i < stelle - 1; i++) { vorherigeKugel = vorherigeKugel.getNächste(); } + + entnommene = vorherigeKugel.getNächste(); // merken, welche Kugel aus der Kette entnommen wird + vorherigeKugel.entferneNächste(); // die Kette ohne die Entnommene + entnommene.setLetzte(); // der Zeiger auf die weiteren Kugeln muss null werden + if (gezogene == null) + gezogene = entnommene; + else + gezogene.append(entnommene); + } + } + + public void zieheAlle() { + for (int i = 0; i < anzahlGezogene; i++) ziehe(); + } + + // Ausgabe + private void ausgabe(Kugel k) { + while (k != null) { + System.out.print(k+" "); + k = k.getNächste(); + } + System.out.println(); + } + public void ausgabeAlle() { + ausgabe(gezogene); + ausgabe(topf); + } +} \ No newline at end of file diff --git a/Java/Matrizen/Matrizen.iml b/Java/Matrizen/Matrizen.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Matrizen/Matrizen.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Matrizen/build.xml b/Java/Matrizen/build.xml new file mode 100644 index 0000000..5915768 --- /dev/null +++ b/Java/Matrizen/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Matrizen. + + + diff --git a/Java/Matrizen/build/classes/.netbeans_automatic_build b/Java/Matrizen/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Matrizen/build/classes/.netbeans_update_resources b/Java/Matrizen/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Matrizen/build/classes/matrizen/Matrix.class b/Java/Matrizen/build/classes/matrizen/Matrix.class new file mode 100644 index 0000000..045571e Binary files /dev/null and b/Java/Matrizen/build/classes/matrizen/Matrix.class differ diff --git a/Java/Matrizen/build/classes/matrizen/Matrizen.class b/Java/Matrizen/build/classes/matrizen/Matrizen.class new file mode 100644 index 0000000..cfe57d6 Binary files /dev/null and b/Java/Matrizen/build/classes/matrizen/Matrizen.class differ diff --git a/Java/Matrizen/manifest.mf b/Java/Matrizen/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Matrizen/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Matrizen/nbproject/build-impl.xml b/Java/Matrizen/nbproject/build-impl.xml new file mode 100644 index 0000000..9bbbb72 --- /dev/null +++ b/Java/Matrizen/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Matrizen/nbproject/genfiles.properties b/Java/Matrizen/nbproject/genfiles.properties new file mode 100644 index 0000000..f389014 --- /dev/null +++ b/Java/Matrizen/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=1584dac0 +build.xml.script.CRC32=6c01ba52 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=1584dac0 +nbproject/build-impl.xml.script.CRC32=427cac4f +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Matrizen/nbproject/private/private.properties b/Java/Matrizen/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Matrizen/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Matrizen/nbproject/private/private.xml b/Java/Matrizen/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Matrizen/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Matrizen/nbproject/project.properties b/Java/Matrizen/nbproject/project.properties new file mode 100644 index 0000000..3a5136f --- /dev/null +++ b/Java/Matrizen/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Matrizen.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=matrizen.Matrizen +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Matrizen/nbproject/project.xml b/Java/Matrizen/nbproject/project.xml new file mode 100644 index 0000000..e197da0 --- /dev/null +++ b/Java/Matrizen/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Matrizen + + + + + + + + + diff --git a/Java/Matrizen/src/matrizen/Matrix.java b/Java/Matrizen/src/matrizen/Matrix.java new file mode 100644 index 0000000..af1fd13 --- /dev/null +++ b/Java/Matrizen/src/matrizen/Matrix.java @@ -0,0 +1,50 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package matrizen; +public class Matrix { + private char[][] feld; + public Matrix(char[][] f) + { + feld = f; + } + public void Tausche(int i, int j) + { + if(i >= feld.length || i >= feld[0].length || + j >= feld.length || j >= feld[0].length || + i <= 0 || j <= 0) + { + System.out.println("Out of Index"); + return; + } + //Tauschen der Spalte + //Tempörär speichern + char[] tmp = feld[i]; + //Feld I überschreiben + feld[i] = feld[j]; + //Feld J überschreiben + feld[j] = tmp; + + tmp = new char[feld.length]; + //Tauschen der Zeile + for (int x = 0; x < feld.length; x++) { + //Tempörär speichern + + tmp[x] = feld[x][i]; + feld[x][i] = feld[x][j]; + feld[x][j] = tmp[x]; + } + } + public void Ausgabe() + { + for (int y = 0; y < feld[0].length; y++) { + for (int x = 0; x < feld.length; x++) { + System.out.print(feld[x][y] + " "); + } + System.out.print("\n"); + } + System.out.print("\n"); + + } +} diff --git a/Java/Matrizen/src/matrizen/Matrizen.java b/Java/Matrizen/src/matrizen/Matrizen.java new file mode 100644 index 0000000..5d5f7a9 --- /dev/null +++ b/Java/Matrizen/src/matrizen/Matrizen.java @@ -0,0 +1,49 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package matrizen; + +import java.util.Scanner; + +/** + * + * @author Hannes + */ +public class Matrizen { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + + // TODO code application logic here + Matrix ma = new Matrix( + new char[][]{ + {' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'}, + {'a', 'x', '1', '1', '1', '0', '1', '0', '1', '1', '0'}, + {'b', '1', 'x', '1', '0', '0', '0', '0', '0', '0', '0'}, + {'c', '1', '1', 'x', '1', '1', '0', '1', '0', '0', '0'}, + {'d', '1', '0', '1', 'x', '0', '0', '0', '0', '0', '0'}, + {'e', '0', '0', '1', '0', 'x', '0', '0', '0', '0', '1'}, + {'f', '1', '0', '0', '0', '0', 'x', '0', '0', '0', '0'}, + {'g', '0', '0', '1', '0', '0', '0', 'x', '0', '0', '0'}, + {'h', '1', '0', '0', '0', '0', '0', '0', 'x', '0', '0'}, + {'i', '1', '0', '0', '0', '0', '0', '0', '0', 'x', '0'}, + {'j', '0', '0', '0', '0', '1', '0', '0', '0', '0', 'x'} + }); + + + while(true) + { + ma.Ausgabe(); + //Eingabe + System.out.print("Tausche: "); + int i = scan.nextInt(); + System.out.print("mit: "); + int j = scan.nextInt(); + ma.Tausche(i, j); + } + } +} diff --git a/Java/Multiplikation/Multiplikation_0/Multiplikation_0.iml b/Java/Multiplikation/Multiplikation_0/Multiplikation_0.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/Multiplikation_0.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Multiplikation/Multiplikation_0/build.xml b/Java/Multiplikation/Multiplikation_0/build.xml new file mode 100644 index 0000000..4615ab5 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Multiplikation_0. + + + diff --git a/Java/Multiplikation/Multiplikation_0/build/classes/.netbeans_automatic_build b/Java/Multiplikation/Multiplikation_0/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Multiplikation/Multiplikation_0/build/classes/.netbeans_update_resources b/Java/Multiplikation/Multiplikation_0/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Multiplikation/Multiplikation_0/build/classes/multiplikation_0/Multiplikation_0.class b/Java/Multiplikation/Multiplikation_0/build/classes/multiplikation_0/Multiplikation_0.class new file mode 100644 index 0000000..aca90a2 Binary files /dev/null and b/Java/Multiplikation/Multiplikation_0/build/classes/multiplikation_0/Multiplikation_0.class differ diff --git a/Java/Multiplikation/Multiplikation_0/manifest.mf b/Java/Multiplikation/Multiplikation_0/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Multiplikation/Multiplikation_0/nbproject/build-impl.xml b/Java/Multiplikation/Multiplikation_0/nbproject/build-impl.xml new file mode 100644 index 0000000..842412b --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Multiplikation/Multiplikation_0/nbproject/genfiles.properties b/Java/Multiplikation/Multiplikation_0/nbproject/genfiles.properties new file mode 100644 index 0000000..eb3be9c --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=05dc93c4 +build.xml.script.CRC32=86912646 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=05dc93c4 +nbproject/build-impl.xml.script.CRC32=e7aa2bee +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Multiplikation/Multiplikation_0/nbproject/private/private.properties b/Java/Multiplikation/Multiplikation_0/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Multiplikation/Multiplikation_0/nbproject/private/private.xml b/Java/Multiplikation/Multiplikation_0/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Multiplikation/Multiplikation_0/nbproject/project.properties b/Java/Multiplikation/Multiplikation_0/nbproject/project.properties new file mode 100644 index 0000000..dd9e6dc --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Multiplikation_0.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=multiplikation_0.Multiplikation_0 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Multiplikation/Multiplikation_0/nbproject/project.xml b/Java/Multiplikation/Multiplikation_0/nbproject/project.xml new file mode 100644 index 0000000..ebb3cf7 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Multiplikation_0 + + + + + + + + + diff --git a/Java/Multiplikation/Multiplikation_0/src/multiplikation_0/Multiplikation_0.java b/Java/Multiplikation/Multiplikation_0/src/multiplikation_0/Multiplikation_0.java new file mode 100644 index 0000000..59fbfc0 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_0/src/multiplikation_0/Multiplikation_0.java @@ -0,0 +1,9 @@ +package multiplikation_0; +public class Multiplikation_0 +{ + public static void main(String[] args) + { + System.out.println("Diese programm führt eine Subtraktion zweier Zahlen aus"); + System.out.println("3*2=" +(3*2) ); + } +} diff --git a/Java/Multiplikation/Multiplikation_1/Multiplikation_1.iml b/Java/Multiplikation/Multiplikation_1/Multiplikation_1.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/Multiplikation_1.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Multiplikation/Multiplikation_1/build.xml b/Java/Multiplikation/Multiplikation_1/build.xml new file mode 100644 index 0000000..9afd564 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Multiplikation_1. + + + diff --git a/Java/Multiplikation/Multiplikation_1/build/classes/.netbeans_automatic_build b/Java/Multiplikation/Multiplikation_1/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Multiplikation/Multiplikation_1/build/classes/.netbeans_update_resources b/Java/Multiplikation/Multiplikation_1/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Multiplikation/Multiplikation_1/build/classes/multiplikation_1/Multiplikation_1.class b/Java/Multiplikation/Multiplikation_1/build/classes/multiplikation_1/Multiplikation_1.class new file mode 100644 index 0000000..5d6259d Binary files /dev/null and b/Java/Multiplikation/Multiplikation_1/build/classes/multiplikation_1/Multiplikation_1.class differ diff --git a/Java/Multiplikation/Multiplikation_1/manifest.mf b/Java/Multiplikation/Multiplikation_1/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Multiplikation/Multiplikation_1/nbproject/build-impl.xml b/Java/Multiplikation/Multiplikation_1/nbproject/build-impl.xml new file mode 100644 index 0000000..4ec0257 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Multiplikation/Multiplikation_1/nbproject/genfiles.properties b/Java/Multiplikation/Multiplikation_1/nbproject/genfiles.properties new file mode 100644 index 0000000..c910622 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=0dcf1fe2 +build.xml.script.CRC32=2666c9ab +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=0dcf1fe2 +nbproject/build-impl.xml.script.CRC32=35cb632a +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Multiplikation/Multiplikation_1/nbproject/private/private.properties b/Java/Multiplikation/Multiplikation_1/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Multiplikation/Multiplikation_1/nbproject/private/private.xml b/Java/Multiplikation/Multiplikation_1/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Multiplikation/Multiplikation_1/nbproject/project.properties b/Java/Multiplikation/Multiplikation_1/nbproject/project.properties new file mode 100644 index 0000000..f5a6529 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Multiplikation_1.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=multiplikation_1.Multiplikation_1 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Multiplikation/Multiplikation_1/nbproject/project.xml b/Java/Multiplikation/Multiplikation_1/nbproject/project.xml new file mode 100644 index 0000000..d994122 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Multiplikation_1 + + + + + + + + + diff --git a/Java/Multiplikation/Multiplikation_1/src/multiplikation_1/Multiplikation_1.java b/Java/Multiplikation/Multiplikation_1/src/multiplikation_1/Multiplikation_1.java new file mode 100644 index 0000000..06e82a7 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_1/src/multiplikation_1/Multiplikation_1.java @@ -0,0 +1,13 @@ +package multiplikation_1; +public class Multiplikation_1 +{ + public static void main(String[] args) + { + int faktor1, faktor2, produkt; + faktor1=3; + faktor2=2; + produkt=faktor1*faktor2; + System.out.print("Diese programm führt eine Multiplikation zweier Zahlen aus: "); + System.out.println(faktor1+"*"+faktor2+"="+produkt); + } +} diff --git a/Java/Multiplikation/Multiplikation_2/Multiplikation_2.iml b/Java/Multiplikation/Multiplikation_2/Multiplikation_2.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/Multiplikation_2.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Multiplikation/Multiplikation_2/build.xml b/Java/Multiplikation/Multiplikation_2/build.xml new file mode 100644 index 0000000..b4a25e3 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Multiplikation_2. + + + diff --git a/Java/Multiplikation/Multiplikation_2/build/classes/.netbeans_automatic_build b/Java/Multiplikation/Multiplikation_2/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Multiplikation/Multiplikation_2/build/classes/.netbeans_update_resources b/Java/Multiplikation/Multiplikation_2/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Multiplikation/Multiplikation_2/build/classes/multiplikation_2/Multiplikation_2.class b/Java/Multiplikation/Multiplikation_2/build/classes/multiplikation_2/Multiplikation_2.class new file mode 100644 index 0000000..d45c5dd Binary files /dev/null and b/Java/Multiplikation/Multiplikation_2/build/classes/multiplikation_2/Multiplikation_2.class differ diff --git a/Java/Multiplikation/Multiplikation_2/manifest.mf b/Java/Multiplikation/Multiplikation_2/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Multiplikation/Multiplikation_2/nbproject/build-impl.xml b/Java/Multiplikation/Multiplikation_2/nbproject/build-impl.xml new file mode 100644 index 0000000..a235453 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Multiplikation/Multiplikation_2/nbproject/genfiles.properties b/Java/Multiplikation/Multiplikation_2/nbproject/genfiles.properties new file mode 100644 index 0000000..4209c73 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=15fb8b88 +build.xml.script.CRC32=1c0fffdd +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=15fb8b88 +nbproject/build-impl.xml.script.CRC32=9819bc27 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Multiplikation/Multiplikation_2/nbproject/private/private.properties b/Java/Multiplikation/Multiplikation_2/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Multiplikation/Multiplikation_2/nbproject/private/private.xml b/Java/Multiplikation/Multiplikation_2/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Multiplikation/Multiplikation_2/nbproject/project.properties b/Java/Multiplikation/Multiplikation_2/nbproject/project.properties new file mode 100644 index 0000000..e6e53a8 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Multiplikation_2.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=multiplikation_2.Multiplikation_2 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Multiplikation/Multiplikation_2/nbproject/project.xml b/Java/Multiplikation/Multiplikation_2/nbproject/project.xml new file mode 100644 index 0000000..b3c7eb4 --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Multiplikation_2 + + + + + + + + + diff --git a/Java/Multiplikation/Multiplikation_2/src/multiplikation_2/Multiplikation_2.java b/Java/Multiplikation/Multiplikation_2/src/multiplikation_2/Multiplikation_2.java new file mode 100644 index 0000000..b3c771a --- /dev/null +++ b/Java/Multiplikation/Multiplikation_2/src/multiplikation_2/Multiplikation_2.java @@ -0,0 +1,17 @@ +package multiplikation_2; +import java.util.Scanner; +public class Multiplikation_2 +{ + public static void main(String[] args) + { + Scanner scan = new Scanner( System.in ); + int faktor1=0, faktor2=0, produkt=0; + System.out.println("Geben Sie nun den ersten Faktor ein. (Bestätigen sie mit Enter"); + faktor1=scan.nextInt(); + System.out.println("Geben Sie nun den zweiten Faktor ein. (Bestätigen sie mit Enter"); + faktor2=scan.nextInt(); + produkt=faktor1*faktor2; + System.out.print("Diese programm führt eine Multiplikation zweier Zahlen aus: "); + System.out.println(faktor1+"*"+faktor2+"="+produkt); + } +} diff --git a/Java/NST/NST.iml b/Java/NST/NST.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/NST/NST.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/NST/build.xml b/Java/NST/build.xml new file mode 100644 index 0000000..6e1b484 --- /dev/null +++ b/Java/NST/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project NST. + + + diff --git a/Java/NST/build/classes/.netbeans_automatic_build b/Java/NST/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/NST/build/classes/.netbeans_update_resources b/Java/NST/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/NST/build/classes/nst/NST.class b/Java/NST/build/classes/nst/NST.class new file mode 100644 index 0000000..a3ddf2a Binary files /dev/null and b/Java/NST/build/classes/nst/NST.class differ diff --git a/Java/NST/manifest.mf b/Java/NST/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/NST/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/NST/nbproject/build-impl.xml b/Java/NST/nbproject/build-impl.xml new file mode 100644 index 0000000..219d7e7 --- /dev/null +++ b/Java/NST/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/NST/nbproject/genfiles.properties b/Java/NST/nbproject/genfiles.properties new file mode 100644 index 0000000..fb5395c --- /dev/null +++ b/Java/NST/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=e5d83726 +build.xml.script.CRC32=65ed9e01 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=e5d83726 +nbproject/build-impl.xml.script.CRC32=14c6e2d9 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/NST/nbproject/private/private.properties b/Java/NST/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/NST/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/NST/nbproject/private/private.xml b/Java/NST/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/NST/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/NST/nbproject/project.properties b/Java/NST/nbproject/project.properties new file mode 100644 index 0000000..8a36625 --- /dev/null +++ b/Java/NST/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/NST.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=nst.NST +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/NST/nbproject/project.xml b/Java/NST/nbproject/project.xml new file mode 100644 index 0000000..80b98f2 --- /dev/null +++ b/Java/NST/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + NST + + + + + + + + + diff --git a/Java/NST/src/nst/NST.java b/Java/NST/src/nst/NST.java new file mode 100644 index 0000000..df582d3 --- /dev/null +++ b/Java/NST/src/nst/NST.java @@ -0,0 +1,24 @@ +package nst; +public class NST { + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + double p = 6, q = -16; + double d = Math.pow(p/2, 2) - q; + if(d < 0) + { + System.out.println("Keine Nullstelle!"); + } + else if(d == 0) + { + System.out.println("x1: " + (-p/2 )); + }else + { + double e = (-p/2); + System.out.println("x1: " + (e + Math.sqrt(d))); + System.out.println("x2: " + (e - Math.sqrt(d))); + } + + } +} diff --git a/Java/Permutation/Permutation.iml b/Java/Permutation/Permutation.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Permutation/Permutation.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Permutation/build.xml b/Java/Permutation/build.xml new file mode 100644 index 0000000..b830bb3 --- /dev/null +++ b/Java/Permutation/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Permutation. + + + diff --git a/Java/Permutation/build/classes/.netbeans_automatic_build b/Java/Permutation/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Permutation/build/classes/.netbeans_update_resources b/Java/Permutation/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Permutation/build/classes/permutation/Permutation.class b/Java/Permutation/build/classes/permutation/Permutation.class new file mode 100644 index 0000000..14808b6 Binary files /dev/null and b/Java/Permutation/build/classes/permutation/Permutation.class differ diff --git a/Java/Permutation/manifest.mf b/Java/Permutation/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Permutation/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Permutation/nbproject/build-impl.xml b/Java/Permutation/nbproject/build-impl.xml new file mode 100644 index 0000000..6d946a4 --- /dev/null +++ b/Java/Permutation/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Permutation/nbproject/genfiles.properties b/Java/Permutation/nbproject/genfiles.properties new file mode 100644 index 0000000..a42f7f4 --- /dev/null +++ b/Java/Permutation/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=b907ccc6 +build.xml.script.CRC32=af089939 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=b907ccc6 +nbproject/build-impl.xml.script.CRC32=5a686b07 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Permutation/nbproject/private/private.properties b/Java/Permutation/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Permutation/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Permutation/nbproject/private/private.xml b/Java/Permutation/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Permutation/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Permutation/nbproject/project.properties b/Java/Permutation/nbproject/project.properties new file mode 100644 index 0000000..649f1dc --- /dev/null +++ b/Java/Permutation/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Permutation.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=permutation.Permutation +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Permutation/nbproject/project.xml b/Java/Permutation/nbproject/project.xml new file mode 100644 index 0000000..be39ef3 --- /dev/null +++ b/Java/Permutation/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Permutation + + + + + + + + + diff --git a/Java/Permutation/src/permutation/Permutation.java b/Java/Permutation/src/permutation/Permutation.java new file mode 100644 index 0000000..350d468 --- /dev/null +++ b/Java/Permutation/src/permutation/Permutation.java @@ -0,0 +1,24 @@ +package permutation; + +public class Permutation { + + static String text = "abcd"; + + private static void perm(String vor, int pos, String nach) { + if (nach.length() == 1) { + System.out.println(vor + nach); + return; + } + String vor1 = vor + nach.charAt(pos); + String nach1 = nach.substring(0, pos) + nach.substring(pos +1); + perm(vor1, 0, nach1); + if(pos + 1 < nach.length()) + { + perm(vor, pos + 1, nach); + } + } + + public static void main(String[] args) { + perm("", 0, text); + } +} diff --git a/Java/Polynomdivision/Polynomdivision.iml b/Java/Polynomdivision/Polynomdivision.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Polynomdivision/Polynomdivision.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Polynomdivision/build.xml b/Java/Polynomdivision/build.xml new file mode 100644 index 0000000..0db03c5 --- /dev/null +++ b/Java/Polynomdivision/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Polynomdivision. + + + diff --git a/Java/Polynomdivision/build/classes/.netbeans_automatic_build b/Java/Polynomdivision/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Polynomdivision/build/classes/.netbeans_update_resources b/Java/Polynomdivision/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Polynomdivision/build/classes/polynomdivision/Polynomdivision.class b/Java/Polynomdivision/build/classes/polynomdivision/Polynomdivision.class new file mode 100644 index 0000000..6de93a8 Binary files /dev/null and b/Java/Polynomdivision/build/classes/polynomdivision/Polynomdivision.class differ diff --git a/Java/Polynomdivision/manifest.mf b/Java/Polynomdivision/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Polynomdivision/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Polynomdivision/nbproject/build-impl.xml b/Java/Polynomdivision/nbproject/build-impl.xml new file mode 100644 index 0000000..523809f --- /dev/null +++ b/Java/Polynomdivision/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Polynomdivision/nbproject/genfiles.properties b/Java/Polynomdivision/nbproject/genfiles.properties new file mode 100644 index 0000000..9cf8410 --- /dev/null +++ b/Java/Polynomdivision/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=cab0dd04 +build.xml.script.CRC32=ecdb7d37 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=cab0dd04 +nbproject/build-impl.xml.script.CRC32=a63fc6dc +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Polynomdivision/nbproject/private/private.properties b/Java/Polynomdivision/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Polynomdivision/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Polynomdivision/nbproject/private/private.xml b/Java/Polynomdivision/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Polynomdivision/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Polynomdivision/nbproject/project.properties b/Java/Polynomdivision/nbproject/project.properties new file mode 100644 index 0000000..5c49727 --- /dev/null +++ b/Java/Polynomdivision/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Polynomdivision.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=polynomdivision.Polynomdivision +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Polynomdivision/nbproject/project.xml b/Java/Polynomdivision/nbproject/project.xml new file mode 100644 index 0000000..773dadd --- /dev/null +++ b/Java/Polynomdivision/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Polynomdivision + + + + + + + + + diff --git a/Java/Polynomdivision/src/polynomdivision/Polynomdivision.java b/Java/Polynomdivision/src/polynomdivision/Polynomdivision.java new file mode 100644 index 0000000..2c6efad --- /dev/null +++ b/Java/Polynomdivision/src/polynomdivision/Polynomdivision.java @@ -0,0 +1,86 @@ +package polynomdivision; + +public class Polynomdivision { + + public static void main(String[] args) { + //arr[X][0 = Koeffizient || 1 = Exponent] + int[][] arr = new int[10][2]; + int[][] dividend = new int[9][2]; + int[][] ergebnis = new int[10][2]; + int[] tmpTerm = new int[2]; + int rest = 0; + + arr[0][0] = 2; + arr[0][1] = 2; + arr[1][0] = 7; + arr[1][1] = 3; + arr[2][0] = 3; + arr[2][1] = 0; + + dividend[0][0] = 1; + dividend[0][1] = 1; + dividend[1][0] = 3; + dividend[1][1] = 0; + + tmpTerm = arr[0]; + int i = 0; + while (true) { + //ergebnis[0] = termDivision(arr[0], dividend[0]); + //tmpTerm = termMultiplikation(ergebnis[0], dividend[1]); + //tmpTerm = termSutraction(arr[1], tmpTerm); + + //ergebnis[1] = termDivision(tmpTerm, dividend[0]); + //tmpTerm = termMultiplikation(ergebnis[1], dividend[1]); + //tmpTerm = termSutraction(arr[2], tmpTerm); + + ergebnis[ergebnis.length - (i+1)] = termDivision(tmpTerm, dividend[i]); + tmpTerm = termMultiplikation(ergebnis[ergebnis.length - (i+1)], dividend[i]); + tmpTerm = termSutraction(arr[i+1], tmpTerm); + if(tmpTerm[1] == 0) + { + rest = tmpTerm[0]; + break; + } + i++; + } + + for (int k = 0; k < ergebnis.length; k++) { + System.out.print(termToString(ergebnis[k])); + } + System.out.println("\nRest: " + rest); + + } + static String termToString(int[] term) + { + String out = ""; + if(term[0] != 0) + out += "(" + term[0] + "x^" + term[1] + ")"; + return out; + } + static int[] termDivision(int[] term1, int[] term2) { + int[] ergebnis = new int[2]; + + ergebnis[0] = term1[0] / term2[0]; + ergebnis[1] = term1[1] - term2[1]; + + return ergebnis; + } + + static int[] termMultiplikation(int[] term1, int[] term2) { + int[] ergebnis = new int[2]; + + ergebnis[0] = term1[0] * term2[0]; + ergebnis[1] = term1[1] + term2[1]; + + return ergebnis; + } + + static int[] termSutraction(int[] term1, int[] term2) { + int[] ergebnis = new int[2]; + + ergebnis[0] = term1[0] - term2[0]; + ergebnis[1] = term1[1]; + + return ergebnis; + } +} diff --git a/Java/Primzahlen/Primzahlen.iml b/Java/Primzahlen/Primzahlen.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Primzahlen/Primzahlen.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Primzahlen/build.xml b/Java/Primzahlen/build.xml new file mode 100644 index 0000000..1d7ba3d --- /dev/null +++ b/Java/Primzahlen/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Primzahlen. + + + diff --git a/Java/Primzahlen/build/classes/.netbeans_automatic_build b/Java/Primzahlen/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Primzahlen/build/classes/.netbeans_update_resources b/Java/Primzahlen/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Primzahlen/build/classes/primzahlen/Primzahl.class b/Java/Primzahlen/build/classes/primzahlen/Primzahl.class new file mode 100644 index 0000000..c46f448 Binary files /dev/null and b/Java/Primzahlen/build/classes/primzahlen/Primzahl.class differ diff --git a/Java/Primzahlen/build/classes/primzahlen/Primzahlen.class b/Java/Primzahlen/build/classes/primzahlen/Primzahlen.class new file mode 100644 index 0000000..f04b0a1 Binary files /dev/null and b/Java/Primzahlen/build/classes/primzahlen/Primzahlen.class differ diff --git a/Java/Primzahlen/manifest.mf b/Java/Primzahlen/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Primzahlen/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Primzahlen/nbproject/build-impl.xml b/Java/Primzahlen/nbproject/build-impl.xml new file mode 100644 index 0000000..22fafae --- /dev/null +++ b/Java/Primzahlen/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Primzahlen/nbproject/genfiles.properties b/Java/Primzahlen/nbproject/genfiles.properties new file mode 100644 index 0000000..ce657c1 --- /dev/null +++ b/Java/Primzahlen/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=adcc1086 +build.xml.script.CRC32=572b7f26 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=adcc1086 +nbproject/build-impl.xml.script.CRC32=fbd738f3 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Primzahlen/nbproject/private/private.properties b/Java/Primzahlen/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Primzahlen/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Primzahlen/nbproject/private/private.xml b/Java/Primzahlen/nbproject/private/private.xml new file mode 100644 index 0000000..2eee429 --- /dev/null +++ b/Java/Primzahlen/nbproject/private/private.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Java/Primzahlen/nbproject/private/profiler/configurations.xml b/Java/Primzahlen/nbproject/private/profiler/configurations.xml new file mode 100644 index 0000000..aacaed6 --- /dev/null +++ b/Java/Primzahlen/nbproject/private/profiler/configurations.xml @@ -0,0 +1,113 @@ + + + +1000 +false +profiler.simple.filter +false + +64 +true + +10 +true +0 +false +true +1 +false +false +false +profiler.simple.filter +32 +false +1 +true +1 +10 +1 +true +Analyze Memory +false +10 +1 +true +10 +0 +profiler.simple.filter +0 +false +true + +1 + +true + + +false +10 +false +true +false +false +32 +Quick filter... +0 +false +0 + +10 +0 +true +true + +true +10 + +1000 +0 +profiler.simple.filter +false +Analyze Performance + +1 +2 + +false +0 +profiler.simple.filter +Quick filter... +false +true +0 +true + +2 + +32 +0 +false +Profile only project classes +0 +0 +true +profiler.simple.filter +1 +10 +false +10 +false +false +true +false +false +0 +Quick filter... +false + +Monitor Application +128 +1000 +true +true + diff --git a/Java/Primzahlen/nbproject/project.properties b/Java/Primzahlen/nbproject/project.properties new file mode 100644 index 0000000..6862336 --- /dev/null +++ b/Java/Primzahlen/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Primzahlen.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=primzahlen.Primzahlen +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Primzahlen/nbproject/project.xml b/Java/Primzahlen/nbproject/project.xml new file mode 100644 index 0000000..21dbb6a --- /dev/null +++ b/Java/Primzahlen/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Primzahlen + + + + + + + + + diff --git a/Java/Primzahlen/src/primzahlen/Primzahlen.java b/Java/Primzahlen/src/primzahlen/Primzahlen.java new file mode 100644 index 0000000..e4bddfd --- /dev/null +++ b/Java/Primzahlen/src/primzahlen/Primzahlen.java @@ -0,0 +1,56 @@ +package primzahlen; +public class Primzahlen { + static Primzahl erste = new Primzahl(2); + public static void main(String[] args) { + int checkRange = 100000; + for (int i = 3; i < checkRange; i++) { + addIfPrime(i); + } + Ausgabe(); + } + static public void Ausgabe() + { + Primzahl current = erste; + int c = 1; + while(current.next != null) + { + System.out.println(current.Zahl()); + current = current.next; + c++; + } + System.out.println("Anzahl: " + c); + } + static public Boolean addIfPrime(int z) + { + Primzahl current = erste; + while(Math.sqrt(z) >= current.Zahl() && current != null) + { + if(z % current.Zahl() == 0) + return false; + current = current.next; + } + erste.append(new Primzahl(z)); + return true; + } +} +class Primzahl +{ + private int id; + public Primzahl next = null; + + + public Primzahl(int nummer) + { + this.id = nummer; + } + public void append(Primzahl p) + { + Primzahl current = this; + while(current.next != null) + { + current = current.next; + } + current.next = p; + } + public int Zahl() {return id;} +} diff --git a/Java/Reaktionstest/Reaktionstest.iml b/Java/Reaktionstest/Reaktionstest.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Reaktionstest/Reaktionstest.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Reaktionstest/build.xml b/Java/Reaktionstest/build.xml new file mode 100644 index 0000000..67e408e --- /dev/null +++ b/Java/Reaktionstest/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Reaktionstest. + + + diff --git a/Java/Reaktionstest/build/classes/.netbeans_automatic_build b/Java/Reaktionstest/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Reaktionstest/build/classes/.netbeans_update_resources b/Java/Reaktionstest/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Reaktionstest/build/classes/reaktionstest/fenster$1.class b/Java/Reaktionstest/build/classes/reaktionstest/fenster$1.class new file mode 100644 index 0000000..e15b51f Binary files /dev/null and b/Java/Reaktionstest/build/classes/reaktionstest/fenster$1.class differ diff --git a/Java/Reaktionstest/build/classes/reaktionstest/fenster$2.class b/Java/Reaktionstest/build/classes/reaktionstest/fenster$2.class new file mode 100644 index 0000000..25e4c7e Binary files /dev/null and b/Java/Reaktionstest/build/classes/reaktionstest/fenster$2.class differ diff --git a/Java/Reaktionstest/build/classes/reaktionstest/fenster$3.class b/Java/Reaktionstest/build/classes/reaktionstest/fenster$3.class new file mode 100644 index 0000000..a06f2d5 Binary files /dev/null and b/Java/Reaktionstest/build/classes/reaktionstest/fenster$3.class differ diff --git a/Java/Reaktionstest/build/classes/reaktionstest/fenster$4.class b/Java/Reaktionstest/build/classes/reaktionstest/fenster$4.class new file mode 100644 index 0000000..4542d14 Binary files /dev/null and b/Java/Reaktionstest/build/classes/reaktionstest/fenster$4.class differ diff --git a/Java/Reaktionstest/build/classes/reaktionstest/fenster.class b/Java/Reaktionstest/build/classes/reaktionstest/fenster.class new file mode 100644 index 0000000..4ee119c Binary files /dev/null and b/Java/Reaktionstest/build/classes/reaktionstest/fenster.class differ diff --git a/Java/Reaktionstest/build/classes/reaktionstest/fenster.form b/Java/Reaktionstest/build/classes/reaktionstest/fenster.form new file mode 100644 index 0000000..83eaa12 --- /dev/null +++ b/Java/Reaktionstest/build/classes/reaktionstest/fenster.form @@ -0,0 +1,73 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/Reaktionstest/manifest.mf b/Java/Reaktionstest/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Reaktionstest/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Reaktionstest/nbproject/build-impl.xml b/Java/Reaktionstest/nbproject/build-impl.xml new file mode 100644 index 0000000..813f7fa --- /dev/null +++ b/Java/Reaktionstest/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Reaktionstest/nbproject/genfiles.properties b/Java/Reaktionstest/nbproject/genfiles.properties new file mode 100644 index 0000000..854cc35 --- /dev/null +++ b/Java/Reaktionstest/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=5c347750 +build.xml.script.CRC32=1250508f +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=5c347750 +nbproject/build-impl.xml.script.CRC32=1b3d63c0 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Reaktionstest/nbproject/private/private.properties b/Java/Reaktionstest/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Reaktionstest/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Reaktionstest/nbproject/private/private.xml b/Java/Reaktionstest/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Reaktionstest/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Reaktionstest/nbproject/project.properties b/Java/Reaktionstest/nbproject/project.properties new file mode 100644 index 0000000..c665240 --- /dev/null +++ b/Java/Reaktionstest/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Reaktionstest.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=reaktionstest.fenster +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Reaktionstest/nbproject/project.xml b/Java/Reaktionstest/nbproject/project.xml new file mode 100644 index 0000000..29f6b2c --- /dev/null +++ b/Java/Reaktionstest/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Reaktionstest + + + + + + + + + diff --git a/Java/Reaktionstest/src/reaktionstest/fenster.form b/Java/Reaktionstest/src/reaktionstest/fenster.form new file mode 100644 index 0000000..83eaa12 --- /dev/null +++ b/Java/Reaktionstest/src/reaktionstest/fenster.form @@ -0,0 +1,73 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/Reaktionstest/src/reaktionstest/fenster.java b/Java/Reaktionstest/src/reaktionstest/fenster.java new file mode 100644 index 0000000..7347079 --- /dev/null +++ b/Java/Reaktionstest/src/reaktionstest/fenster.java @@ -0,0 +1,149 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package reaktionstest; + +import java.util.Timer; +import java.util.TimerTask; +import javax.swing.JButton; + +/** + * + * @author Hannes + */ +public class fenster extends javax.swing.JFrame { + + private long starttime = 0, endtime = 0; + + /** + * Creates new form fenster + */ + public fenster() { + initComponents(); + jButton2.setVisible(false); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jButton1 = new javax.swing.JButton(); + ergebnisLaber = new javax.swing.JLabel(); + jButton2 = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jButton1.setText("StarteTest"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + ergebnisLaber.setText("Ergebnis"); + + jButton2.setText("Drückmich"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(ergebnisLaber) + .addGap(101, 101, 101) + .addComponent(jButton1) + .addContainerGap(165, Short.MAX_VALUE)) + .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(ergebnisLaber)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + + pack(); + }// //GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + jButton1.setVisible(false); + + new Timer().schedule(new TimerTask() { + public void run() { + jButton2.setVisible(true); + starttime = System.currentTimeMillis(); + } + }, (int) (Math.random() * 3000)); + + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + ende(); + }//GEN-LAST:event_jButton2ActionPerformed +private void ende() +{ + if (jButton2.isVisible()) { + endtime = System.currentTimeMillis(); + ergebnisLaber.setText("Zeit: " + (endtime - starttime) + "ms"); + + jButton2.setVisible(false); + jButton1.setVisible(true); + } +} + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(fenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(fenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(fenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(fenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new fenster().setVisible(true); + } + }); + } + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel ergebnisLaber; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + // End of variables declaration//GEN-END:variables +} diff --git a/Java/Rekursion/build.xml b/Java/Rekursion/build.xml new file mode 100644 index 0000000..ce923f9 --- /dev/null +++ b/Java/Rekursion/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Rekursion. + + + diff --git a/Java/Rekursion/build/classes/.netbeans_automatic_build b/Java/Rekursion/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Rekursion/build/classes/.netbeans_update_resources b/Java/Rekursion/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Rekursion/build/classes/fakultätrekursiv/FakultätRekursiv.class b/Java/Rekursion/build/classes/fakultätrekursiv/FakultätRekursiv.class new file mode 100644 index 0000000..32c7cb2 Binary files /dev/null and b/Java/Rekursion/build/classes/fakultätrekursiv/FakultätRekursiv.class differ diff --git a/Java/Rekursion/manifest.mf b/Java/Rekursion/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Rekursion/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Rekursion/nbproject/build-impl.xml b/Java/Rekursion/nbproject/build-impl.xml new file mode 100644 index 0000000..49ada7b --- /dev/null +++ b/Java/Rekursion/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Rekursion/nbproject/genfiles.properties b/Java/Rekursion/nbproject/genfiles.properties new file mode 100644 index 0000000..2c24988 --- /dev/null +++ b/Java/Rekursion/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=efc70bc4 +build.xml.script.CRC32=1877807d +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=efc70bc4 +nbproject/build-impl.xml.script.CRC32=720560dc +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Rekursion/nbproject/private/private.properties b/Java/Rekursion/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Rekursion/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Rekursion/nbproject/private/private.xml b/Java/Rekursion/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Rekursion/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Rekursion/nbproject/private/profiler/configurations.xml b/Java/Rekursion/nbproject/private/profiler/configurations.xml new file mode 100644 index 0000000..aacaed6 --- /dev/null +++ b/Java/Rekursion/nbproject/private/profiler/configurations.xml @@ -0,0 +1,113 @@ + + + +1000 +false +profiler.simple.filter +false + +64 +true + +10 +true +0 +false +true +1 +false +false +false +profiler.simple.filter +32 +false +1 +true +1 +10 +1 +true +Analyze Memory +false +10 +1 +true +10 +0 +profiler.simple.filter +0 +false +true + +1 + +true + + +false +10 +false +true +false +false +32 +Quick filter... +0 +false +0 + +10 +0 +true +true + +true +10 + +1000 +0 +profiler.simple.filter +false +Analyze Performance + +1 +2 + +false +0 +profiler.simple.filter +Quick filter... +false +true +0 +true + +2 + +32 +0 +false +Profile only project classes +0 +0 +true +profiler.simple.filter +1 +10 +false +10 +false +false +true +false +false +0 +Quick filter... +false + +Monitor Application +128 +1000 +true +true + diff --git a/Java/Rekursion/nbproject/project.properties b/Java/Rekursion/nbproject/project.properties new file mode 100644 index 0000000..8fd2a77 --- /dev/null +++ b/Java/Rekursion/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Rekursion.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=fakult\u00e4trekursiv.Fakult\u00e4tRekursiv +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Rekursion/nbproject/project.xml b/Java/Rekursion/nbproject/project.xml new file mode 100644 index 0000000..89aeb0f --- /dev/null +++ b/Java/Rekursion/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Rekursion + + + + + + + + + diff --git a/Java/Rekursion/src/Rekursion.iml b/Java/Rekursion/src/Rekursion.iml new file mode 100644 index 0000000..b826b8e --- /dev/null +++ b/Java/Rekursion/src/Rekursion.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Rekursion/src/fakultätrekursiv/FakultätRekursiv.java b/Java/Rekursion/src/fakultätrekursiv/FakultätRekursiv.java new file mode 100644 index 0000000..bf385d3 --- /dev/null +++ b/Java/Rekursion/src/fakultätrekursiv/FakultätRekursiv.java @@ -0,0 +1,88 @@ +package fakultätrekursiv; +public class FakultätRekursiv { + public static void main(String[] args) { + // TODO code application logic here + System.out.println("Fakultät (Rekursiv): " + fak(9)); + System.out.println("Fakultät (Iterativ): " + fakIt(9)); + System.out.println("Potenz (Rekursiv): " + pot(0.5 , 2)); + System.out.println("Potenz (Iterativ): " + potIt(0.5 , 2)); + System.out.println("Fibonacci (Rekursiv [ineffektiv]): " + fibonacci(25)); + System.out.println("ggT (Rekursiv): " + ggT(14,12)); + int[] e = bruchAddition(258, 36891, 30123, 40990); + System.out.println("Brüche addieren: " + e[0] + "/" + e[1]); + } + //Fakultät + public static long fak(int n) { + if (n <= 1) + return 1; + else + return n * fak(n-1); + } + public static long fakIt(int n) + { + long e = 1; + for (int i = n; i > 0; i--) { + e *= i; + } + return e; + } + //Additon von Brüchen + public static int[] bruchAddition(int z1, int n1, int z2, int n2) + { + int ggt = ggT(n1, n2); + + int e1 = n1 / ggt; + int e2 = n2 / ggt; + + //Brücjhe erweitern + n1 *= e2; + z1 *= e2; + + n2 *= e1; + z2 *= e1; + + int[] r = new int[2]; + r[0] = z1 + z2; + r[1] = n1; + + //Kürzen + int s = ggT(r[0], r[1]); + r[0] /= s; + r[1] /= s; + + return r; + + } + //Größter gemeinsamer Teiler + public static int ggT(int p, int o) + { + if(p == o) + return p; + return ggT(Math.abs(p - o), //Dake abs() of p - o + (p < o)? p : o); //Take smaller one either o or p + } + //Potenzrechnung + public static double pot(double a , int exponent) + { + if(exponent == 0) + return 1; + else + return a * pot(a , exponent - 1); + } + public static double potIt(double a, int exponent) + { + double e = 1; + for (int i = 1; i <= exponent; i++) { + e *= a; + } + return e; + } + //Fibonacci number + public static long fibonacci(int runs) + { + if(runs <= 2) + return 1; + else + return fibonacci(runs - 1) + fibonacci(runs -2); + } +} diff --git a/Java/Sternchen 2/Sternchen 2.iml b/Java/Sternchen 2/Sternchen 2.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Sternchen 2/Sternchen 2.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Sternchen 2/build.xml b/Java/Sternchen 2/build.xml new file mode 100644 index 0000000..375fbaf --- /dev/null +++ b/Java/Sternchen 2/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Sternchen 2. + + + diff --git a/Java/Sternchen 2/build/classes/.netbeans_automatic_build b/Java/Sternchen 2/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Sternchen 2/build/classes/.netbeans_update_resources b/Java/Sternchen 2/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Sternchen 2/build/classes/sternchen/pkg2/Sternchen2.class b/Java/Sternchen 2/build/classes/sternchen/pkg2/Sternchen2.class new file mode 100644 index 0000000..9097685 Binary files /dev/null and b/Java/Sternchen 2/build/classes/sternchen/pkg2/Sternchen2.class differ diff --git a/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$1.class b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$1.class new file mode 100644 index 0000000..33f3b2a Binary files /dev/null and b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$1.class differ diff --git a/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$2.class b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$2.class new file mode 100644 index 0000000..7ae672f Binary files /dev/null and b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$2.class differ diff --git a/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$3.class b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$3.class new file mode 100644 index 0000000..df80fb3 Binary files /dev/null and b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$3.class differ diff --git a/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$4.class b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$4.class new file mode 100644 index 0000000..8d2bf61 Binary files /dev/null and b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$4.class differ diff --git a/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$5.class b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$5.class new file mode 100644 index 0000000..95a5032 Binary files /dev/null and b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window$5.class differ diff --git a/Java/Sternchen 2/build/classes/sternchen/pkg2/Window.class b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window.class new file mode 100644 index 0000000..cadd85a Binary files /dev/null and b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window.class differ diff --git a/Java/Sternchen 2/build/classes/sternchen/pkg2/Window.form b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window.form new file mode 100644 index 0000000..5ace598 --- /dev/null +++ b/Java/Sternchen 2/build/classes/sternchen/pkg2/Window.form @@ -0,0 +1,137 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Sternchen 2/manifest.mf b/Java/Sternchen 2/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Sternchen 2/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Sternchen 2/nbproject/build-impl.xml b/Java/Sternchen 2/nbproject/build-impl.xml new file mode 100644 index 0000000..1cb312f --- /dev/null +++ b/Java/Sternchen 2/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Sternchen 2/nbproject/genfiles.properties b/Java/Sternchen 2/nbproject/genfiles.properties new file mode 100644 index 0000000..efdd7d5 --- /dev/null +++ b/Java/Sternchen 2/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=3be31da3 +build.xml.script.CRC32=923fe70a +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=3be31da3 +nbproject/build-impl.xml.script.CRC32=f2891309 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Sternchen 2/nbproject/private/private.properties b/Java/Sternchen 2/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Sternchen 2/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Sternchen 2/nbproject/private/private.xml b/Java/Sternchen 2/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Sternchen 2/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Sternchen 2/nbproject/project.properties b/Java/Sternchen 2/nbproject/project.properties new file mode 100644 index 0000000..c30f266 --- /dev/null +++ b/Java/Sternchen 2/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Sternchen_2.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=sternchen.pkg2.Sternchen2 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Sternchen 2/nbproject/project.xml b/Java/Sternchen 2/nbproject/project.xml new file mode 100644 index 0000000..db7ab79 --- /dev/null +++ b/Java/Sternchen 2/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Sternchen 2 + + + + + + + + + diff --git a/Java/Sternchen 2/src/sternchen/pkg2/Sternchen2.java b/Java/Sternchen 2/src/sternchen/pkg2/Sternchen2.java new file mode 100644 index 0000000..a54b98d --- /dev/null +++ b/Java/Sternchen 2/src/sternchen/pkg2/Sternchen2.java @@ -0,0 +1,22 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package sternchen.pkg2; + +/** + * + * @author kuchelmeister.hannes + */ +public class Sternchen2 { + + /** + * @param args the command line arguments + */ + + public static void main(String[] args) { + Window w = new Window(); + w.setVisible(true); + // TODO code application logic here + } +} diff --git a/Java/Sternchen 2/src/sternchen/pkg2/Window.form b/Java/Sternchen 2/src/sternchen/pkg2/Window.form new file mode 100644 index 0000000..5ace598 --- /dev/null +++ b/Java/Sternchen 2/src/sternchen/pkg2/Window.form @@ -0,0 +1,137 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Sternchen 2/src/sternchen/pkg2/Window.java b/Java/Sternchen 2/src/sternchen/pkg2/Window.java new file mode 100644 index 0000000..436ce6c --- /dev/null +++ b/Java/Sternchen 2/src/sternchen/pkg2/Window.java @@ -0,0 +1,274 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package sternchen.pkg2; + +/** + * + * @author kuchelmeister.hannes + */ +public class Window extends javax.swing.JFrame { + + /** + * Creates new form Window + */ + public Window() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jScrollPane1 = new javax.swing.JScrollPane(); + TextArea = new javax.swing.JTextArea(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jButton4 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + jSpinner1 = new javax.swing.JSpinner(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + TextArea.setColumns(20); + TextArea.setFont(new java.awt.Font("Courier New", 0, 13)); // NOI18N + TextArea.setRows(5); + jScrollPane1.setViewportView(TextArea); + + jButton1.setText("Muster 1"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton2.setText("Muster 2"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + jButton3.setText("Muster 3"); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + + jButton4.setText("Muster 4"); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + + jLabel1.setText("Anzahl"); + + jSpinner1.setValue(0); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() + .addComponent(jButton1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jButton3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton4) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(240, 240, 240))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(16, 16, 16) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(jButton2) + .addComponent(jButton3) + .addComponent(jButton4)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + pack(); + }// //GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + int a; + String str = ""; + + a = (Integer)this.jSpinner1.getValue(); + for(int i = 0; i < a; i++) + { + for(int b = 0; b < a; b++) + { + if(b == a - 1) + { + str += "*\n"; + } + else if(i == 0 || b == 0 || i == a - 1 ) + { + str += "*"; + } + else + { + str += " "; + } + } + } + this.TextArea.setText(str); + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + int a; + String str = ""; + + a = (Integer)this.jSpinner1.getValue(); + for(int i = 0; i < a; i++) + { + for(int b = 0; b <= i; b++) + { + if(b == i) + { + str += "*\n"; + } + else if(b == 0 || i == a - 1 ) + { + str += "*"; + } + else + { + str += " "; + } + } + } + this.TextArea.setText(str); + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + int a; + String str = ""; + + a = (Integer)this.jSpinner1.getValue(); + str = " "; + for (int b = 2; b + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Window.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Window.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Window.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Window.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Window().setVisible(true); + } + }); + } + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextArea TextArea; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton4; + private javax.swing.JLabel jLabel1; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JSpinner jSpinner1; + // End of variables declaration//GEN-END:variables +} diff --git a/Java/Subtraktion/Subtraktion_0/Subtraktion_0.iml b/Java/Subtraktion/Subtraktion_0/Subtraktion_0.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/Subtraktion_0.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Subtraktion/Subtraktion_0/build.xml b/Java/Subtraktion/Subtraktion_0/build.xml new file mode 100644 index 0000000..eee03f9 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Subtraktion_0. + + + diff --git a/Java/Subtraktion/Subtraktion_0/build/classes/.netbeans_automatic_build b/Java/Subtraktion/Subtraktion_0/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Subtraktion/Subtraktion_0/build/classes/.netbeans_update_resources b/Java/Subtraktion/Subtraktion_0/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Subtraktion/Subtraktion_0/build/classes/subtraktion_0/Subtraktion_0.class b/Java/Subtraktion/Subtraktion_0/build/classes/subtraktion_0/Subtraktion_0.class new file mode 100644 index 0000000..405d3d3 Binary files /dev/null and b/Java/Subtraktion/Subtraktion_0/build/classes/subtraktion_0/Subtraktion_0.class differ diff --git a/Java/Subtraktion/Subtraktion_0/manifest.mf b/Java/Subtraktion/Subtraktion_0/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Subtraktion/Subtraktion_0/nbproject/build-impl.xml b/Java/Subtraktion/Subtraktion_0/nbproject/build-impl.xml new file mode 100644 index 0000000..1db26d5 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Subtraktion/Subtraktion_0/nbproject/genfiles.properties b/Java/Subtraktion/Subtraktion_0/nbproject/genfiles.properties new file mode 100644 index 0000000..d021bc2 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=6433b6f5 +build.xml.script.CRC32=029b7173 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=6433b6f5 +nbproject/build-impl.xml.script.CRC32=2ae6bcc4 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Subtraktion/Subtraktion_0/nbproject/private/private.properties b/Java/Subtraktion/Subtraktion_0/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Subtraktion/Subtraktion_0/nbproject/private/private.xml b/Java/Subtraktion/Subtraktion_0/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Subtraktion/Subtraktion_0/nbproject/project.properties b/Java/Subtraktion/Subtraktion_0/nbproject/project.properties new file mode 100644 index 0000000..7b47001 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Subtraktion_0.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=subtraktion_0.Subtraktion_0 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Subtraktion/Subtraktion_0/nbproject/project.xml b/Java/Subtraktion/Subtraktion_0/nbproject/project.xml new file mode 100644 index 0000000..eb08b1a --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Subtraktion_0 + + + + + + + + + diff --git a/Java/Subtraktion/Subtraktion_0/src/subtraktion_0/Subtraktion_0.java b/Java/Subtraktion/Subtraktion_0/src/subtraktion_0/Subtraktion_0.java new file mode 100644 index 0000000..33f0f47 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_0/src/subtraktion_0/Subtraktion_0.java @@ -0,0 +1,9 @@ +package subtraktion_0; +public class Subtraktion_0 +{ + public static void main(String[] args) + { + System.out.println("Diese programm führt eine Subtraktion zweier Zahlen aus"); + System.out.println("3-2=" +(3-2) ); + } +} diff --git a/Java/Subtraktion/Subtraktion_1/Subtraktion_1.iml b/Java/Subtraktion/Subtraktion_1/Subtraktion_1.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/Subtraktion_1.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Subtraktion/Subtraktion_1/build.xml b/Java/Subtraktion/Subtraktion_1/build.xml new file mode 100644 index 0000000..599a40f --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Subtraktion_1. + + + diff --git a/Java/Subtraktion/Subtraktion_1/build/classes/.netbeans_automatic_build b/Java/Subtraktion/Subtraktion_1/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Subtraktion/Subtraktion_1/build/classes/.netbeans_update_resources b/Java/Subtraktion/Subtraktion_1/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Subtraktion/Subtraktion_1/build/classes/subtraktion_1/Subtraktion_1.class b/Java/Subtraktion/Subtraktion_1/build/classes/subtraktion_1/Subtraktion_1.class new file mode 100644 index 0000000..c030dce Binary files /dev/null and b/Java/Subtraktion/Subtraktion_1/build/classes/subtraktion_1/Subtraktion_1.class differ diff --git a/Java/Subtraktion/Subtraktion_1/manifest.mf b/Java/Subtraktion/Subtraktion_1/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Subtraktion/Subtraktion_1/nbproject/build-impl.xml b/Java/Subtraktion/Subtraktion_1/nbproject/build-impl.xml new file mode 100644 index 0000000..375f916 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Subtraktion/Subtraktion_1/nbproject/genfiles.properties b/Java/Subtraktion/Subtraktion_1/nbproject/genfiles.properties new file mode 100644 index 0000000..1e1ab49 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=6c203ad3 +build.xml.script.CRC32=25327c9f +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=6c203ad3 +nbproject/build-impl.xml.script.CRC32=5bde56fd +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Subtraktion/Subtraktion_1/nbproject/private/private.properties b/Java/Subtraktion/Subtraktion_1/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Subtraktion/Subtraktion_1/nbproject/private/private.xml b/Java/Subtraktion/Subtraktion_1/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Subtraktion/Subtraktion_1/nbproject/project.properties b/Java/Subtraktion/Subtraktion_1/nbproject/project.properties new file mode 100644 index 0000000..e707fa5 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Subtraktion_1.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=subtraktion_1.Subtraktion_1 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Subtraktion/Subtraktion_1/nbproject/project.xml b/Java/Subtraktion/Subtraktion_1/nbproject/project.xml new file mode 100644 index 0000000..d43795d --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Subtraktion_1 + + + + + + + + + diff --git a/Java/Subtraktion/Subtraktion_1/src/subtraktion_1/Subtraktion_1.java b/Java/Subtraktion/Subtraktion_1/src/subtraktion_1/Subtraktion_1.java new file mode 100644 index 0000000..1b7789d --- /dev/null +++ b/Java/Subtraktion/Subtraktion_1/src/subtraktion_1/Subtraktion_1.java @@ -0,0 +1,13 @@ +package subtraktion_1; +public class Subtraktion_1 +{ + public static void main(String[] args) + { + int minuend, subtrahend, differenz; + minuend=3; + subtrahend=2; + differenz=minuend-subtrahend; + System.out.print("Diese programm führt eine Subtraktion zweier Zahlen aus: "); + System.out.println(minuend+"-"+subtrahend+"="+differenz ); + } +} diff --git a/Java/Subtraktion/Subtraktion_2/Subtraktion_2.iml b/Java/Subtraktion/Subtraktion_2/Subtraktion_2.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/Subtraktion_2.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Subtraktion/Subtraktion_2/build.xml b/Java/Subtraktion/Subtraktion_2/build.xml new file mode 100644 index 0000000..8f44eea --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project Subtraktion_2. + + + diff --git a/Java/Subtraktion/Subtraktion_2/build/classes/.netbeans_automatic_build b/Java/Subtraktion/Subtraktion_2/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Subtraktion/Subtraktion_2/build/classes/.netbeans_update_resources b/Java/Subtraktion/Subtraktion_2/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Subtraktion/Subtraktion_2/build/classes/subtraktion_2/Subtraktion_2.class b/Java/Subtraktion/Subtraktion_2/build/classes/subtraktion_2/Subtraktion_2.class new file mode 100644 index 0000000..d7ed483 Binary files /dev/null and b/Java/Subtraktion/Subtraktion_2/build/classes/subtraktion_2/Subtraktion_2.class differ diff --git a/Java/Subtraktion/Subtraktion_2/manifest.mf b/Java/Subtraktion/Subtraktion_2/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Subtraktion/Subtraktion_2/nbproject/build-impl.xml b/Java/Subtraktion/Subtraktion_2/nbproject/build-impl.xml new file mode 100644 index 0000000..13096c8 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Subtraktion/Subtraktion_2/nbproject/genfiles.properties b/Java/Subtraktion/Subtraktion_2/nbproject/genfiles.properties new file mode 100644 index 0000000..567c566 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=7414aeb9 +build.xml.script.CRC32=4dc96aab +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=7414aeb9 +nbproject/build-impl.xml.script.CRC32=c89768b6 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/Java/Subtraktion/Subtraktion_2/nbproject/private/private.properties b/Java/Subtraktion/Subtraktion_2/nbproject/private/private.properties new file mode 100644 index 0000000..5e9dd57 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\kuchelmeister.hannes\\AppData\\Roaming\\NetBeans\\7.2\\build.properties diff --git a/Java/Subtraktion/Subtraktion_2/nbproject/private/private.xml b/Java/Subtraktion/Subtraktion_2/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Java/Subtraktion/Subtraktion_2/nbproject/project.properties b/Java/Subtraktion/Subtraktion_2/nbproject/project.properties new file mode 100644 index 0000000..8ff95a8 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Subtraktion_2.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=subtraktion_2.Subtraktion_2 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Subtraktion/Subtraktion_2/nbproject/project.xml b/Java/Subtraktion/Subtraktion_2/nbproject/project.xml new file mode 100644 index 0000000..504f481 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Subtraktion_2 + + + + + + + + + diff --git a/Java/Subtraktion/Subtraktion_2/src/subtraktion_2/Subtraktion_2.java b/Java/Subtraktion/Subtraktion_2/src/subtraktion_2/Subtraktion_2.java new file mode 100644 index 0000000..0db3961 --- /dev/null +++ b/Java/Subtraktion/Subtraktion_2/src/subtraktion_2/Subtraktion_2.java @@ -0,0 +1,17 @@ +package subtraktion_2; +import java.util.Scanner; +public class Subtraktion_2 +{ + public static void main(String[] args) + { + Scanner scan = new Scanner( System.in ); + int minuend=0, subtrahend=0, differenz=0; + System.out.println("Geben Sie nun den Minuend ein. (Bestätigen sie mit Enter"); + minuend=scan.nextInt(); + System.out.println("Geben Sie nun den Subtrahend ein. (Bestätigen sie mit Enter"); + subtrahend=scan.nextInt(); + differenz=minuend-subtrahend; + System.out.print("Diese programm führt eine Subtraktion zweier Zahlen aus: "); + System.out.println(minuend+"-"+subtrahend+"="+differenz ); + } +} diff --git a/Java/Suchbaum/Suchbaum.iml b/Java/Suchbaum/Suchbaum.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Suchbaum/Suchbaum.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Suchbaum/build.xml b/Java/Suchbaum/build.xml new file mode 100644 index 0000000..43b8d30 --- /dev/null +++ b/Java/Suchbaum/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Suchbaum. + + + diff --git a/Java/Suchbaum/build/built-jar.properties b/Java/Suchbaum/build/built-jar.properties new file mode 100644 index 0000000..0d02f48 --- /dev/null +++ b/Java/Suchbaum/build/built-jar.properties @@ -0,0 +1,4 @@ +#Tue, 11 Feb 2014 10:06:19 +0100 + + +C\:\\Users\\Hannes\\Documents\\NetBeansProjects\\Suchbaum= diff --git a/Java/Suchbaum/build/classes/suchbaum/Baum.class b/Java/Suchbaum/build/classes/suchbaum/Baum.class new file mode 100644 index 0000000..d18e1fa Binary files /dev/null and b/Java/Suchbaum/build/classes/suchbaum/Baum.class differ diff --git a/Java/Suchbaum/build/classes/suchbaum/Knoten.class b/Java/Suchbaum/build/classes/suchbaum/Knoten.class new file mode 100644 index 0000000..deedcb7 Binary files /dev/null and b/Java/Suchbaum/build/classes/suchbaum/Knoten.class differ diff --git a/Java/Suchbaum/build/classes/suchbaum/Suchbaum.class b/Java/Suchbaum/build/classes/suchbaum/Suchbaum.class new file mode 100644 index 0000000..5d0a653 Binary files /dev/null and b/Java/Suchbaum/build/classes/suchbaum/Suchbaum.class differ diff --git a/Java/Suchbaum/manifest.mf b/Java/Suchbaum/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Suchbaum/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Suchbaum/nbproject/build-impl.xml b/Java/Suchbaum/nbproject/build-impl.xml new file mode 100644 index 0000000..25afff8 --- /dev/null +++ b/Java/Suchbaum/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Suchbaum/nbproject/genfiles.properties b/Java/Suchbaum/nbproject/genfiles.properties new file mode 100644 index 0000000..5837073 --- /dev/null +++ b/Java/Suchbaum/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=b6fc472a +build.xml.script.CRC32=206ab543 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=b6fc472a +nbproject/build-impl.xml.script.CRC32=9100a579 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Suchbaum/nbproject/private/private.properties b/Java/Suchbaum/nbproject/private/private.properties new file mode 100644 index 0000000..5cc4d5b --- /dev/null +++ b/Java/Suchbaum/nbproject/private/private.properties @@ -0,0 +1 @@ +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Suchbaum/nbproject/private/private.xml b/Java/Suchbaum/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Suchbaum/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Suchbaum/nbproject/project.properties b/Java/Suchbaum/nbproject/project.properties new file mode 100644 index 0000000..552d86c --- /dev/null +++ b/Java/Suchbaum/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Suchbaum.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=suchbaum.Suchbaum +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Suchbaum/nbproject/project.xml b/Java/Suchbaum/nbproject/project.xml new file mode 100644 index 0000000..ac808ad --- /dev/null +++ b/Java/Suchbaum/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Suchbaum + + + + + + + + + diff --git a/Java/Suchbaum/sb1.emf b/Java/Suchbaum/sb1.emf new file mode 100644 index 0000000..397479b Binary files /dev/null and b/Java/Suchbaum/sb1.emf differ diff --git a/Java/Suchbaum/sb1.gv b/Java/Suchbaum/sb1.gv new file mode 100644 index 0000000..0cd4354 --- /dev/null +++ b/Java/Suchbaum/sb1.gv @@ -0,0 +1,33 @@ +digraph g { + graph [ + rankdir = "TB" + bgcolor = "white:lightblue" + style="filled" + gradientangle = 270 + ]; + node [shape=box,style=filled,color="lightgray"]; + "Rom" [label="Rom"] +"Rom" -> "Berlin" + "Berlin" [label="Berlin"] +"Berlin" -> "Amsterdam" + "Amsterdam" [label="Amsterdam"] +"Berlin" -> "Paris" + "Paris" [label="Paris"] +"Paris" -> "London" + "London" [label="London"] +"London" -> "Lissabon" + "Lissabon" [label="Lissabon"] +"Lissabon" -> "Brüssel" + "Brüssel" [label="Brüssel"] +"London" -> "Luxemburg" + "Luxemburg" [label="Luxemburg"] +"Rom" -> "Ulan Bator" + "Ulan Bator" [label="Ulan Bator"] +"Ulan Bator" -> "Washington" + "Washington" [label="Washington"] +"Washington" -> "Vatikanstadt" + "Vatikanstadt" [label="Vatikanstadt"] +"Washington" -> "Wien" + "Wien" [label="Wien"] + +} \ No newline at end of file diff --git a/Java/Suchbaum/sb2.emf b/Java/Suchbaum/sb2.emf new file mode 100644 index 0000000..0418f9c Binary files /dev/null and b/Java/Suchbaum/sb2.emf differ diff --git a/Java/Suchbaum/sb2.gv b/Java/Suchbaum/sb2.gv new file mode 100644 index 0000000..e93e626 --- /dev/null +++ b/Java/Suchbaum/sb2.gv @@ -0,0 +1,33 @@ +digraph g { + graph [ + rankdir = "TB" + bgcolor = "white:lightblue" + style="filled" + gradientangle = 270 + ]; + node [shape=box,style=filled,color="lightgray"]; + "Rom" [label="Rom"] +"Rom" -> "Berlin" + "Berlin" [label="Berlin"] +"Berlin" -> "Amsterdam" + "Amsterdam" [label="Amsterdam"] +"Berlin" -> "London" + "London" [label="London"] +"London" -> "Lissabon" + "Lissabon" [label="Lissabon"] +"Lissabon" -> "Brüssel" + "Brüssel" [label="Brüssel"] +"London" -> "Paris" + "Paris" [label="Paris"] +"Paris" -> "Luxemburg" + "Luxemburg" [label="Luxemburg"] +"Rom" -> "Ulan Bator" + "Ulan Bator" [label="Ulan Bator"] +"Ulan Bator" -> "Washington" + "Washington" [label="Washington"] +"Washington" -> "Vatikanstadt" + "Vatikanstadt" [label="Vatikanstadt"] +"Washington" -> "Wien" + "Wien" [label="Wien"] + +} \ No newline at end of file diff --git a/Java/Suchbaum/src/suchbaum/Baum.java b/Java/Suchbaum/src/suchbaum/Baum.java new file mode 100644 index 0000000..9e03b22 --- /dev/null +++ b/Java/Suchbaum/src/suchbaum/Baum.java @@ -0,0 +1,117 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package suchbaum; + +/** + * + * @author frank.baethge + */ +public class Baum { + + private Knoten wurzel; + + public Baum() { + wurzel = null; + } + + public void einfügen(Knoten k) { + if (wurzel == null) { + wurzel = k; + } else { + wurzel.einfügen(k); + } + } + + /** + * Sucht nach dem String toFind in den Werten des Baumes und gibt den + * jeweiligen Knoten zurück wird toFind nicht gefunden wird null + * zurückgegeben + * + * @param toFind + */ + public Knoten finde(String toFind) { + return wurzel.finde(toFind); + } + + /** + * beim Rechtsrotieren wird der linke Verweis zur Wurzel + * + * @param k + * + * zur Erklärung die Struktur ist vorher k == 1, k.links == 2 und + * k.links.rechts == 3 nachher soll der Baum 2, 2.rechts == 1 und + * 2.rechts.links = 3 sein + * + */ + public void rotiereRechts(Knoten k1) { + if (k1.getLinks() == null) { + return; + } + if (k1 == wurzel) { + wurzel = wurzel.getLinks(); + } + Knoten k2 = k1.getLinks(); + Knoten k3 = k2.getRechts(); + k2.setRechts(k1); + k2.getRechts().setLinks(k3); + if (k3 != null) { + k3.setZurück(k1); + } + k2.setZurück(k1.getZurück()); + k1.setZurück(k2); + if (k2.getZurück().getRechts() == k1) { + k2.getZurück().setRechts(k2); + } else { + k2.getZurück().setLinks(k2); + } + } + + public void rotiereLinks(Knoten k1) { + if (k1.getRechts() == null) { + return; + } + if (k1 == wurzel) { + wurzel = wurzel.getRechts(); + } + Knoten k2 = k1.getRechts(); + Knoten k3 = k2.getLinks(); + k2.setLinks(k1); + k2.getLinks().setRechts(k3); + if (k3 != null) { + k3.setZurück(k1); + } + k2.setZurück(k1.getZurück()); + k1.setZurück(k2); + if (k2.getZurück() != null) { + if (k2.getZurück().getRechts() == k1) { + k2.getZurück().setRechts(k2); + } else { + k2.getZurück().setLinks(k2); + } + } + } + + @Override + public String toString() { + if (wurzel == null) { + return "der Baum ist leer"; + } else { + return wurzel.inorder(); + } + } + + protected String getGraphviz() { + return "digraph g {\n" + + " graph [\n" + + " rankdir = \"TB\"\n" + + " bgcolor = \"white:lightblue\"\n" + + " style=\"filled\"\n" + + " gradientangle = 270\n" + + " ];\n" + + " node [shape=box,style=filled,color=\"lightgray\"];\n" + + wurzel.getGraphviz() + + "\n}"; + } +} diff --git a/Java/Suchbaum/src/suchbaum/Knoten.java b/Java/Suchbaum/src/suchbaum/Knoten.java new file mode 100644 index 0000000..245b565 --- /dev/null +++ b/Java/Suchbaum/src/suchbaum/Knoten.java @@ -0,0 +1,154 @@ +package suchbaum; + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author frank.baethge + */ +public class Knoten { + private Knoten links; + private Knoten rechts; + private Knoten zurück; + private String wert; + + protected Knoten(String w) { + links = null; + rechts = null; + zurück = null; + wert = w; + } + + protected void einfügen(Knoten k) { + if (k.getWert().compareTo(getWert()) < 0) { + if (getLinks() == null) { + setLinks(k); + k.setZurück(this); + } else { + getLinks().einfügen(k); + } + } else { + if (k.getWert().compareTo(getWert()) == 0) { + // mache nichts, denn der Wert ist schon vorhanden + } else { + // Wert ist größer + if (getRechts() == null) { + setRechts(k); + k.setZurück(this); + } else { + getRechts().einfügen(k); + } + } + } + } + + protected Knoten finde(String toFind) { + Integer ct = getWert().compareTo(toFind); + if (ct == 0) { // gefunden + return this; + } else { + if (ct > 0) { // das Suchergebnis befindet sich links + if (getLinks() == null) { + return null; + } else { + return getLinks().finde(toFind); + } + } else { // das Suchergebnis befindet sich rechts + if (getRechts() == null) { + return null; + } else { + return getRechts().finde(toFind); + } + } + } + } + + @Override + public String toString() { + return getWert(); + } + + public String inorder() { //LWR + String ergebnis = ""; + if (getLinks() != null) { + ergebnis += getLinks().inorder(); + } + ergebnis += " " + getWert() + " "; + if (getRechts() != null) { + ergebnis += getRechts().inorder(); + } + return ergebnis; + } + + protected String getGraphviz() { + String gv = String.format(" \"%s\" [label=\"%s\"]", this, this); + String linkedTo = ""; + if (getLinks() != null) { + linkedTo += String.format("\"%s\" -> \"%s\"\n%s", this, getLinks(), getLinks().getGraphviz()); + } + if (getRechts() != null) { + linkedTo += String.format("\"%s\" -> \"%s\"\n%s", this, getRechts(), getRechts().getGraphviz()); + } + return String.format("%s\n%s", gv, linkedTo); + } + + /** + * @return the links + */ + public Knoten getLinks() { + return links; + } + + /** + * @param links the links to set + */ + public void setLinks(Knoten links) { + this.links = links; + } + + /** + * @return the rechts + */ + public Knoten getRechts() { + return rechts; + } + + /** + * @param rechts the rechts to set + */ + public void setRechts(Knoten rechts) { + this.rechts = rechts; + } + + /** + * @return the zurück + */ + public Knoten getZurück() { + return zurück; + } + + /** + * @param zurück the zurück to set + */ + public void setZurück(Knoten zurück) { + this.zurück = zurück; + } + + /** + * @return the wert + */ + public String getWert() { + return wert; + } + + /** + * @param wert the wert to set + */ + public void setWert(String wert) { + this.wert = wert; + } + +} \ No newline at end of file diff --git a/Java/Suchbaum/src/suchbaum/Suchbaum.java b/Java/Suchbaum/src/suchbaum/Suchbaum.java new file mode 100644 index 0000000..1d3526c --- /dev/null +++ b/Java/Suchbaum/src/suchbaum/Suchbaum.java @@ -0,0 +1,49 @@ +/* + * Binärer Suchbaum + * implementiert nur die wichtigsten Prozeduren + */ +package suchbaum; + +/** + * + * @author frank.baethge + */ +public class Suchbaum { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + Baum b = new Baum(); + b.einfügen(new Knoten("Rom")); + b.einfügen(new Knoten("Berlin")); + b.einfügen(new Knoten("Paris")); + b.einfügen(new Knoten("Ulan Bator")); + b.einfügen(new Knoten("London")); + b.einfügen(new Knoten("Lissabon")); + b.einfügen(new Knoten("Washington")); + b.einfügen(new Knoten("Brüssel")); + b.einfügen(new Knoten("Luxemburg")); + b.einfügen(new Knoten("Wien")); + b.einfügen(new Knoten("Amsterdam")); + b.einfügen(new Knoten("Vatikanstadt")); + + System.out.println("Baum preorder: " + b); + //System.out.println("Graphviz: \n" + b.getGraphviz()); + + + Knoten stadt = b.finde("Paris"); + System.out.println("Stadt: " + stadt); + if (stadt != null) { + b.rotiereLinks(stadt); + System.out.println(b); + System.out.println("Graphviz: \n" + b.getGraphviz()); + } + stadt = b.finde("Paris"); + if (stadt != null) { + b.rotiereRechts(stadt); + System.out.println("Graphviz: \n" + b.getGraphviz()); + } + + } +} diff --git a/Java/TestProject/TestProject.iml b/Java/TestProject/TestProject.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/TestProject/TestProject.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/TestProject/build.xml b/Java/TestProject/build.xml new file mode 100644 index 0000000..36c4e5f --- /dev/null +++ b/Java/TestProject/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project TestProject. + + + diff --git a/Java/TestProject/build/classes/.netbeans_automatic_build b/Java/TestProject/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/TestProject/build/classes/.netbeans_update_resources b/Java/TestProject/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/TestProject/build/classes/testproject/TestProject.class b/Java/TestProject/build/classes/testproject/TestProject.class new file mode 100644 index 0000000..7dc0d9c Binary files /dev/null and b/Java/TestProject/build/classes/testproject/TestProject.class differ diff --git a/Java/TestProject/manifest.mf b/Java/TestProject/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/TestProject/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/TestProject/nbproject/build-impl.xml b/Java/TestProject/nbproject/build-impl.xml new file mode 100644 index 0000000..0bd8846 --- /dev/null +++ b/Java/TestProject/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/TestProject/nbproject/genfiles.properties b/Java/TestProject/nbproject/genfiles.properties new file mode 100644 index 0000000..ce21544 --- /dev/null +++ b/Java/TestProject/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=f3280282 +build.xml.script.CRC32=ebaf3591 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=f3280282 +nbproject/build-impl.xml.script.CRC32=a37fdbae +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/TestProject/nbproject/private/private.properties b/Java/TestProject/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/TestProject/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/TestProject/nbproject/private/private.xml b/Java/TestProject/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/TestProject/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/TestProject/nbproject/project.properties b/Java/TestProject/nbproject/project.properties new file mode 100644 index 0000000..629e85c --- /dev/null +++ b/Java/TestProject/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/TestProject.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=testproject.TestProject +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/TestProject/nbproject/project.xml b/Java/TestProject/nbproject/project.xml new file mode 100644 index 0000000..a132bc1 --- /dev/null +++ b/Java/TestProject/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + TestProject + + + + + + + + + diff --git a/Java/TestProject/src/testproject/TestProject.java b/Java/TestProject/src/testproject/TestProject.java new file mode 100644 index 0000000..de7b704 --- /dev/null +++ b/Java/TestProject/src/testproject/TestProject.java @@ -0,0 +1,19 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package testproject; +import java.util.*; +/** + * + * @author Hannes + */ +public class TestProject { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + + } +} diff --git a/Java/TestSuite b/Java/TestSuite new file mode 160000 index 0000000..9bd321d --- /dev/null +++ b/Java/TestSuite @@ -0,0 +1 @@ +Subproject commit 9bd321d182f973289786f3c90ef6f0492e29b166 diff --git a/Java/TestSuite.config b/Java/TestSuite.config new file mode 100644 index 0000000..cb6c1d0 --- /dev/null +++ b/Java/TestSuite.config @@ -0,0 +1,4 @@ +#TestSuite runtime config +#Mon Mar 21 12:09:34 CET 2016 +TestSources=C\:\\Eclipse\\workspace\\Final02\\tests +TestClass=Main diff --git a/Java/TournamentSort/TournamentSort.iml b/Java/TournamentSort/TournamentSort.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/TournamentSort/TournamentSort.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/TournamentSort/build.xml b/Java/TournamentSort/build.xml new file mode 100644 index 0000000..ecfa394 --- /dev/null +++ b/Java/TournamentSort/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project TournamentSort. + + + diff --git a/Java/TournamentSort/build/classes/.netbeans_automatic_build b/Java/TournamentSort/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/TournamentSort/build/classes/.netbeans_update_resources b/Java/TournamentSort/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/TournamentSort/build/classes/tournamentsort/Element.class b/Java/TournamentSort/build/classes/tournamentsort/Element.class new file mode 100644 index 0000000..de87ad8 Binary files /dev/null and b/Java/TournamentSort/build/classes/tournamentsort/Element.class differ diff --git a/Java/TournamentSort/build/classes/tournamentsort/TournamentSort.class b/Java/TournamentSort/build/classes/tournamentsort/TournamentSort.class new file mode 100644 index 0000000..26f1176 Binary files /dev/null and b/Java/TournamentSort/build/classes/tournamentsort/TournamentSort.class differ diff --git a/Java/TournamentSort/manifest.mf b/Java/TournamentSort/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/TournamentSort/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/TournamentSort/nbproject/build-impl.xml b/Java/TournamentSort/nbproject/build-impl.xml new file mode 100644 index 0000000..cc0dd0b --- /dev/null +++ b/Java/TournamentSort/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/TournamentSort/nbproject/genfiles.properties b/Java/TournamentSort/nbproject/genfiles.properties new file mode 100644 index 0000000..1f4a253 --- /dev/null +++ b/Java/TournamentSort/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=37bfb76a +build.xml.script.CRC32=32da6daf +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=37bfb76a +nbproject/build-impl.xml.script.CRC32=70e6b3e6 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/TournamentSort/nbproject/private/private.properties b/Java/TournamentSort/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/TournamentSort/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/TournamentSort/nbproject/private/private.xml b/Java/TournamentSort/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/TournamentSort/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/TournamentSort/nbproject/project.properties b/Java/TournamentSort/nbproject/project.properties new file mode 100644 index 0000000..cb99db4 --- /dev/null +++ b/Java/TournamentSort/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/TournamentSort.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=tournamentsort.TournamentSort +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/TournamentSort/nbproject/project.xml b/Java/TournamentSort/nbproject/project.xml new file mode 100644 index 0000000..602b145 --- /dev/null +++ b/Java/TournamentSort/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + TournamentSort + + + + + + + + + diff --git a/Java/TournamentSort/src/tournamentsort/Element.java b/Java/TournamentSort/src/tournamentsort/Element.java new file mode 100644 index 0000000..afe7887 --- /dev/null +++ b/Java/TournamentSort/src/tournamentsort/Element.java @@ -0,0 +1,60 @@ +package tournamentsort; + +import java.util.Random; + +public class Element { + + private int füllung; + private Boolean gefüllt; + private Element mum, dad; + + public Element() { + gefüllt = false; + mum = null; + dad = null; + } + + public Element(int f) { + füllung = f; + gefüllt = true; + } + + public void addEbene() { + if (mum != null) { + mum.addEbene(); + dad.addEbene(); + } else { + mum = new Element(); + dad = new Element(); + } + } + + public int fillEbene(int anzahl) { + if (mum != null) { + anzahl = mum.fillEbene(anzahl); + anzahl = dad.fillEbene(anzahl); + } else { + Random r = new Random(); + if (anzahl > 0) { + mum = new Element(r.nextInt(100)); + anzahl--; + } + if (anzahl > 0) { + dad = new Element(r.nextInt(100)); + anzahl--; + } + } + return anzahl; + } + + @Override + public String toString() { + String eleS = "\n Element: " + this.hashCode(); + String füllS = (gefüllt) ? " Wert: " + füllung : " ungefüllt"; + + String mumS = (mum != null) ? mum.toString() : " mum: null"; + String dadS = (dad != null) ? dad.toString() : " dad: null"; + + return eleS + füllS + mumS + dadS + " z"; + } +} diff --git a/Java/TournamentSort/src/tournamentsort/TournamentSort.java b/Java/TournamentSort/src/tournamentsort/TournamentSort.java new file mode 100644 index 0000000..57ee0a5 --- /dev/null +++ b/Java/TournamentSort/src/tournamentsort/TournamentSort.java @@ -0,0 +1,23 @@ +package tournamentsort; +public class TournamentSort { + private static Element champ = new Element(); + private static int anzahl = 10; + + public static void main(String[] args) { + baueBaum(); + System.out.println(champ); + } + private static void baueBaum() + { + int anz = 1; + while(2 * anz < anzahl) + { + //fügt eine komplette ebene an + champ.addEbene(); + anz *= 2; + System.out.println(anz); + } + champ.fillEbene(anzahl); + } +} + diff --git a/Java/Verzeichnisgröße/build.xml b/Java/Verzeichnisgröße/build.xml new file mode 100644 index 0000000..0289144 --- /dev/null +++ b/Java/Verzeichnisgröße/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Verzeichnisgröße. + + + diff --git a/Java/Verzeichnisgröße/build/classes/.netbeans_automatic_build b/Java/Verzeichnisgröße/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Verzeichnisgröße/build/classes/.netbeans_update_resources b/Java/Verzeichnisgröße/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Verzeichnisgröße/build/classes/verzeichnisgröße/Verzeichnisgröße.class b/Java/Verzeichnisgröße/build/classes/verzeichnisgröße/Verzeichnisgröße.class new file mode 100644 index 0000000..165d11c Binary files /dev/null and b/Java/Verzeichnisgröße/build/classes/verzeichnisgröße/Verzeichnisgröße.class differ diff --git a/Java/Verzeichnisgröße/manifest.mf b/Java/Verzeichnisgröße/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Verzeichnisgröße/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Verzeichnisgröße/nbproject/build-impl.xml b/Java/Verzeichnisgröße/nbproject/build-impl.xml new file mode 100644 index 0000000..2321ecd --- /dev/null +++ b/Java/Verzeichnisgröße/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Verzeichnisgröße/nbproject/genfiles.properties b/Java/Verzeichnisgröße/nbproject/genfiles.properties new file mode 100644 index 0000000..e6250b7 --- /dev/null +++ b/Java/Verzeichnisgröße/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=712d7faf +build.xml.script.CRC32=3ce0fa0f +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=712d7faf +nbproject/build-impl.xml.script.CRC32=4b96c8dd +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Verzeichnisgröße/nbproject/private/private.properties b/Java/Verzeichnisgröße/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Verzeichnisgröße/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Verzeichnisgröße/nbproject/private/private.xml b/Java/Verzeichnisgröße/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Verzeichnisgröße/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Verzeichnisgröße/nbproject/project.properties b/Java/Verzeichnisgröße/nbproject/project.properties new file mode 100644 index 0000000..e980dd3 --- /dev/null +++ b/Java/Verzeichnisgröße/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Verzeichnisgr__e.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=verzeichnisgr\u00f6\u00dfe.Verzeichnisgr\u00f6\u00dfe +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Verzeichnisgröße/nbproject/project.xml b/Java/Verzeichnisgröße/nbproject/project.xml new file mode 100644 index 0000000..422ead4 --- /dev/null +++ b/Java/Verzeichnisgröße/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Verzeichnisgröße + + + + + + + + + diff --git a/Java/Verzeichnisgröße/src/Verzeichnisgröße.iml b/Java/Verzeichnisgröße/src/Verzeichnisgröße.iml new file mode 100644 index 0000000..c42166f --- /dev/null +++ b/Java/Verzeichnisgröße/src/Verzeichnisgröße.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Verzeichnisgröße/src/verzeichnisgröße/Verzeichnisgröße.java b/Java/Verzeichnisgröße/src/verzeichnisgröße/Verzeichnisgröße.java new file mode 100644 index 0000000..6572bf4 --- /dev/null +++ b/Java/Verzeichnisgröße/src/verzeichnisgröße/Verzeichnisgröße.java @@ -0,0 +1,44 @@ +package verzeichnisgröße; + +import java.io.File; +import java.util.Arrays; + +/** + * + * @author Hannes + */ +public class Verzeichnisgröße { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + System.out.println(fileSize(new File("."), 1)); + } + + private static long fileSize(File f, int ebene) { + long size = 0; + String leer = ""; + for(int i = 0; i < ebene; i++) + { + if(i + 1 != ebene) + leer = leer + "\u2502 "; + else + leer = leer + "\u2514\u2500"; + } + + File[] fList = f.listFiles(); + for (File file : fList) { + if (file.isDirectory()) { + size += fileSize(file, ebene + 1); + System.out.println(leer + file.getName()); + } else if(file.isFile()) { + size += file.length(); + System.out.println(leer + file.getName()); + } + + } + return size; + } +} diff --git a/Java/Wettbewerb_CSV_Foto/Wettbewerb_CSV_Foto.iml b/Java/Wettbewerb_CSV_Foto/Wettbewerb_CSV_Foto.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/Wettbewerb_CSV_Foto.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Wettbewerb_CSV_Foto/build.xml b/Java/Wettbewerb_CSV_Foto/build.xml new file mode 100644 index 0000000..49b11e7 --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Wettbewerb_CSV_Foto. + + + diff --git a/Java/Wettbewerb_CSV_Foto/build/built-jar.properties b/Java/Wettbewerb_CSV_Foto/build/built-jar.properties new file mode 100644 index 0000000..d15c599 --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/build/built-jar.properties @@ -0,0 +1,4 @@ +#Sun, 03 Nov 2013 16:55:50 +0100 + + +C\:\\Users\\Hannes\\Documents\\NetBeansProjects\\Wettbewerb_CSV_Foto= diff --git a/Java/Wettbewerb_CSV_Foto/build/classes/.netbeans_automatic_build b/Java/Wettbewerb_CSV_Foto/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Wettbewerb_CSV_Foto/build/classes/.netbeans_update_resources b/Java/Wettbewerb_CSV_Foto/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Camera.class b/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Camera.class new file mode 100644 index 0000000..6a77879 Binary files /dev/null and b/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Camera.class differ diff --git a/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Image.class b/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Image.class new file mode 100644 index 0000000..6719b88 Binary files /dev/null and b/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Image.class differ diff --git a/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Pixel.class b/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Pixel.class new file mode 100644 index 0000000..fe7dc51 Binary files /dev/null and b/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Pixel.class differ diff --git a/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Wettbewerb_CSV_Foto.class b/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Wettbewerb_CSV_Foto.class new file mode 100644 index 0000000..6f07eca Binary files /dev/null and b/Java/Wettbewerb_CSV_Foto/build/classes/wettbewerb_csv_foto/Wettbewerb_CSV_Foto.class differ diff --git a/Java/Wettbewerb_CSV_Foto/manifest.mf b/Java/Wettbewerb_CSV_Foto/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Wettbewerb_CSV_Foto/nbproject/build-impl.xml b/Java/Wettbewerb_CSV_Foto/nbproject/build-impl.xml new file mode 100644 index 0000000..bd0f65e --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Wettbewerb_CSV_Foto/nbproject/genfiles.properties b/Java/Wettbewerb_CSV_Foto/nbproject/genfiles.properties new file mode 100644 index 0000000..0c53541 --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=5b80c486 +build.xml.script.CRC32=e37daf22 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=5b80c486 +nbproject/build-impl.xml.script.CRC32=25e1bfbe +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Wettbewerb_CSV_Foto/nbproject/private/private.properties b/Java/Wettbewerb_CSV_Foto/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Wettbewerb_CSV_Foto/nbproject/private/private.xml b/Java/Wettbewerb_CSV_Foto/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Wettbewerb_CSV_Foto/nbproject/project.properties b/Java/Wettbewerb_CSV_Foto/nbproject/project.properties new file mode 100644 index 0000000..c35c38a --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Wettbewerb_CSV_Foto.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=wettbewerb_csv_foto.Wettbewerb_CSV_Foto +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Wettbewerb_CSV_Foto/nbproject/project.xml b/Java/Wettbewerb_CSV_Foto/nbproject/project.xml new file mode 100644 index 0000000..5eeb775 --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Wettbewerb_CSV_Foto + + + + + + + + + diff --git a/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Camera.java b/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Camera.java new file mode 100644 index 0000000..1274367 --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Camera.java @@ -0,0 +1,57 @@ +package wettbewerb_csv_foto; + +import java.util.ArrayList; + +public class Camera { + + private int id; + private String name; + private ArrayList images = new ArrayList(); + public Camera(int id, String name) { + this.id = id; + this.name = name; + } + + public int countImages() { + return getImages().size(); + } + + public String writeLine() { + String s = ""; + short i = 0; + for (Image image : images) { + s = s + this.name + " " + this.id + i + ";"; + s = s + image.getAbstand() + ";"; + s = s + image.getStreuung() + ";"; + s = s + System.getProperty("line.separator"); + i++; + } + s = s.replace(".", ","); + return s; + } + + public void AddImage(String path) { + Image tmp = new Image(); + + + Pixel[] Pixel = new Pixel[0]; + Pixel = tmp.Load(path).toArray(Pixel); + System.out.println(this.name + this.id + " loaded a new Image"); + getImages().add(tmp); + + } + + private Image avgImage() { + if (getImages().size() == 0) { + return null; + } + Image avg = new Image(); + return avg; + } + /** + * @return the images + */ + public ArrayList getImages() { + return images; + } +} diff --git a/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Image.java b/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Image.java new file mode 100644 index 0000000..0dbaffa --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Image.java @@ -0,0 +1,149 @@ +package wettbewerb_csv_foto; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; + +public class Image { + + private int width = 0, height = 0; + private double abstand, streuung; + + //Streuung + private void sigmaDist(double durchschnitt, ArrayList pMap) { + double s = 0; + for (int i = 0; i < pMap.size() - width; i++) { + Pixel p = pMap.get(i); + Pixel q = pMap.get(i + width); + s = s + ((pixelDist(p, q) - durchschnitt) * + (pixelDist(p, q) - durchschnitt)); + } + streuung = Math.sqrt(s / (pMap.size() - width)); + } + + private double pixelDist(Pixel p, Pixel q) { + double d = Math.sqrt((p.r - q.r) * (p.r - q.r) + + (p.g - q.g) * (p.g - q.g) + + (p.b - q.b) * (p.b - q.b)); + return d; + } + + private void avgDist(ArrayList pMap) { + double d = 0; + for (int i = 0; i < pMap.size() - width; i++) { + d = d + pixelDist(pMap.get(i), pMap.get(i + width)); + } + abstand = d / (pMap.size() - width); + } + + private void compute(ArrayList pMap) { + int size = pMap.size(); + avgDist(pMap); + sigmaDist(abstand, pMap); + System.out.println(getAbstand()); + } + //Lädt Image und gibt Farbspektrum zurück (um speicherplatz zu sparen) + + public ArrayList Load(String path) { + ArrayList pixelMap = new ArrayList(); + int i = 0; + BufferedReader br = null; + try { + + StringBuilder sb = new StringBuilder(); + br = new BufferedReader(new FileReader(path)); + + if (readHeader(br)) { + while (br.ready()) { + short r = (short) readInt(br); + short g = (short) readInt(br); + short b = (short) readInt(br); + if (r >= 0 && g >= 0 && b >= 0) { + pixelMap.add(new Pixel(i, r, g, b)); + i++; + } + } + } + + } catch (IOException e) { + System.out.println(e); + } + + compute(pixelMap); + return pixelMap; + } + + private boolean readHeader(BufferedReader br) { + try { + char c1 = (char) br.read(); + char c2 = (char) br.read(); + if (c1 == 'P' && c2 == '3') { + width = readInt(br); + height = readInt(br); + int maxVal = readInt(br); + return true; + } else { + return false; + } + } catch (IOException e) { + System.out.println(e); + return false; + } + } + /// Utility routine to read the first non-whitespace character. + + private static char readNonwhiteChar(BufferedReader bf) throws IOException { + char c; + + do { + c = (char) bf.read(); + } while (c == ' ' || c == '\t' || c == '\n' || c == '\r'); + + return c; + } + + private int readInt(BufferedReader br) throws IOException { + char c; + int i; + + c = readNonwhiteChar(br); + i = 0; + do { + i = i * 10 + c - '0'; + c = (char) br.read(); + } while (c >= '0' && c <= '9'); + return i; + } + + public int getWidth() { + return width; + } + + /** + * @return the height + */ + public int getHeight() { + return height; + } + + public int getPixelCount() { + return height * width; + } + + /** + * @return the abstand + */ + public double getAbstand() { + return abstand; + } + + /** + * @return the streuung + */ + public double getStreuung() { + return streuung; + } +} diff --git a/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Pixel.java b/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Pixel.java new file mode 100644 index 0000000..6c2dd2e --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Pixel.java @@ -0,0 +1,11 @@ +package wettbewerb_csv_foto; + +public class Pixel { + short r,g,b; + public Pixel(int id,short R, short G, short B) + { + r = R; + g = G; + b = B; + } +} diff --git a/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Wettbewerb_CSV_Foto.java b/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Wettbewerb_CSV_Foto.java new file mode 100644 index 0000000..6c5df58 --- /dev/null +++ b/Java/Wettbewerb_CSV_Foto/src/wettbewerb_csv_foto/Wettbewerb_CSV_Foto.java @@ -0,0 +1,99 @@ +package wettbewerb_csv_foto; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; + +public class Wettbewerb_CSV_Foto { + + static Camera uCam; + static ArrayList cam = new ArrayList(); + + public static void main(String[] args) throws IOException { + LoadCameras(); + LoadImages(); + createCSV("C:\\Users\\Hannes\\Desktop\\", "output.csv"); + } + + public static void LoadCameras() { + uCam = new Camera(0, "Unbekannt"); + for (int i = 1; i <= 5; i++) { + cam.add(new Camera(i, "Kamera")); + } + System.out.println("Cameras added!"); + } + + public static void LoadImages() { + uCam.AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kanne.ppm"); + System.out.println("Unknown Image Loaded"); + + cam.get(0).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera1\\K1Bild1.ppm"); + cam.get(0).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera1\\K1Bild2.ppm"); + cam.get(0).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera1\\K1Bild3.ppm"); + cam.get(0).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera1\\K1Bild4.ppm"); + cam.get(0).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera1\\K1Bild5.ppm"); + System.out.println("Images Camera 1 Loaded"); + + cam.get(1).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera2\\K2Bild1.ppm"); + cam.get(1).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera2\\K2Bild2.ppm"); + cam.get(1).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera2\\K2Bild3.ppm"); + cam.get(1).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera2\\K2Bild4.ppm"); + cam.get(1).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera2\\K2Bild5.ppm"); + System.out.println("Images Camera 2 Loaded"); + + cam.get(2).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera3\\K3Bild1.ppm"); + cam.get(2).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera3\\K3Bild2.ppm"); + cam.get(2).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera3\\K3Bild3.ppm"); + cam.get(2).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera3\\K3Bild4.ppm"); + cam.get(2).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera3\\K3Bild5.ppm"); + System.out.println("Images Camera 3 Loaded"); + + cam.get(3).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera4\\K4Bild1.ppm"); + cam.get(3).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera4\\K4Bild2.ppm"); + cam.get(3).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera4\\K4Bild3.ppm"); + cam.get(3).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera4\\K4Bild4.ppm"); + System.out.println("Images Camera 4 Loaded"); + + cam.get(4).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera5\\K5Bild1.ppm"); + cam.get(4).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera5\\K5Bild2.ppm"); + cam.get(4).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera5\\K5Bild3.ppm"); + cam.get(4).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera5\\K5Bild4.ppm"); + cam.get(4).AddImage("C:\\Users\\Hannes\\Documents\\Fotos\\Kamera5\\K5Bild5.ppm"); + System.out.println("Images Camera 5 Loaded"); + } + + public static void createCSV(String path, String filename) throws IOException { + File file = new File(path, filename); + if (!file.isFile() && !file.createNewFile()) { + throw new IOException("Error creating new file: " + file.getAbsolutePath()); + } + try { + FileWriter writer = new FileWriter(path + filename); + + writer.append("Foto;Durchschnittlicher Abstand; Streuung" + System.getProperty("line.separator")); + + for (int i = 0; i < cam.size(); i++) { + writeLine(writer, cam.get(i)); + } + + writeLine(writer, uCam); + + + System.out.println("Written Data to File"); + + //generate whatever data you want + + writer.flush(); + writer.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + } + + public static FileWriter writeLine(FileWriter writer, Camera camera) throws IOException { + writer.append(camera.writeLine()); + return writer; + } +} diff --git a/Java/Wettbewerb_ForestFire/Wettbewerb_ForestFire.iml b/Java/Wettbewerb_ForestFire/Wettbewerb_ForestFire.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Wettbewerb_ForestFire/Wettbewerb_ForestFire.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Wettbewerb_ForestFire/manifest.mf b/Java/Wettbewerb_ForestFire/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Wettbewerb_ForestFire/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Wettbewerb_ForestFire/src/Main.java b/Java/Wettbewerb_ForestFire/src/Main.java new file mode 100644 index 0000000..9b44118 --- /dev/null +++ b/Java/Wettbewerb_ForestFire/src/Main.java @@ -0,0 +1,64 @@ + +import java.util.HashMap; +import processing.core.PApplet; + +/** + * + */ +public class Main extends PApplet { + + Map map = new Map(); + int recSize; + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + PApplet.main(new String[]{"Main"}); + } + + public void setup() { + recSize = 50; + map.load("C:\\Users\\Hannes\\Desktop\\map.txt");//scanner.next()); + size(map.getWidth() * recSize, map.getHeight() * recSize); + map.burnsIn(false); + } + // TODO: setup application + + + public void draw() { +//Drawing + Tile[][] tmpMap = map.getTileMap(); + for (int x = 0; x < tmpMap.length; x++) { + for (int y = 0; y < tmpMap[x].length; y++) { + switch (tmpMap[x][y].getType()) { + case 0: //Normaler Wald + fill(0, 255, 0); + break; + case 1: //Blockierter Wald + fill(120); + break; + case 2: //Feuer + fill(255, 0, 0); + break; + } + rect(x * recSize, y * recSize, recSize, recSize); + if (tmpMap[x][y].isExt()) { + fill(0, 0, 255); + line(x * recSize, y * recSize, (x + 1) * recSize, (y + 1) * recSize); + line((x + 1) * recSize, y * recSize, x * recSize, (y + 1) * recSize); + } + fill(0); + text(tmpMap[x][y].getScore(), recSize * x + 1, recSize * y + 11); + text((int) tmpMap[x][y].getRound(), recSize * x + 1, recSize * (y + 1) - 1); + } + } + } + + public void keyReleased() { + System.out.println("Key Released: " + keyCode); + if (keyCode == 39) { + map.next(); + } + } +} diff --git a/Java/Wettbewerb_ForestFire/src/Map.java b/Java/Wettbewerb_ForestFire/src/Map.java new file mode 100644 index 0000000..14db054 --- /dev/null +++ b/Java/Wettbewerb_ForestFire/src/Map.java @@ -0,0 +1,339 @@ + +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +/** + * + * @author Hannes + */ +public class Map { + + private boolean burning = false; + private ArrayList closedList; + private int width; + private int height; + // private byte currentRound; + private Tile[][] tileMap; + + protected Map(int w, int h, ArrayList closed, Tile[][] map) { + closedList = closed; + tileMap = map; + + height = h; + width = w; + } + + public Map() { + closedList = new ArrayList(); + + width = 0; + height = 0; + tileMap = null; + } + + public void extinguish(int x, int y) { + tileMap[x][y].extinguish(); + closedList.remove(tileMap[x][y]); + // burnsIn(false); + } + + public void ext() { + int bestScore = Integer.MIN_VALUE; + Map _map = this.clone(); + _map.burnsIn(true); + int[] mainScore = _map.returnScoreArray(); + + int bestX = 0, bestY = 0; + for (int x = 0; x < tileMap.length; x++) { + for (int y = 0; y < tileMap[x].length; y++) { + if (!tileMap[x][y].isExt() && tileMap[x][y].getType() != 1) { + Map _tmpMap = this.clone(); + _tmpMap.extinguish(x, y); + _tmpMap.burnsIn(true); + + + int _score = _tmpMap.calcScore(mainScore, mainScore); + if (_score >= bestScore && (!burning || tileMap[x][y].getType() == 2)) { + bestScore = _score; + bestX = x; + bestY = y; + } + + tileMap[x][y].setScore(_score); + } + + } + } + System.out.println( + "[" + bestX + "|" + bestY + "|"+ bestScore + "]"); + + extinguish(bestX, bestY); + } + + public void next() { + nextRound(); + ext(); + } + + public void clearRoundList() { + for (int x = 0; x < tileMap.length; x++) { + for (int y = 0; y < tileMap[x].length; y++) { + if (closedList.contains(tileMap[x][y])) { + tileMap[x][y].setRound(0); + } else { + tileMap[x][y].setRound(-1); + } + } + } + } + + public void burnsIn(boolean ignite) { //Fehlder liegt vermutlich in dieser Methode + clearRoundList(); + ArrayList setThisRound = new ArrayList(); + ArrayList open = new ArrayList(); + for (Tile tile : closedList) { + if (tile.getType() == 2) { + open.add(tile); + } + } + int i = 0; + while (open.size() != 0) { + ArrayList _open = (ArrayList) open.clone(); + open.clear(); + for (Tile tile : _open) { + if (!contains(tile, setThisRound)) { + setThisRound.add(tile); + ArrayList _n = new ArrayList(); + _n.add(getNeighbour(tile, 1, 0)); + _n.add(getNeighbour(tile, 0, 1)); + _n.add(getNeighbour(tile, -1, 0)); + _n.add(getNeighbour(tile, 0, -1)); + for (Tile _t : _n) { + if (_t != null && !contains(_t, setThisRound)) { + tileMap[_t.getX()][_t.getY()].setRound(i); + open.add(tileMap[_t.getX()][_t.getY()]); + } + } + } + } + i++; + } + if (ignite) { + for (int x = 0; x < tileMap.length; x++) { + for (int y = 0; y < tileMap[x].length; y++) { + if (tileMap[x][y].getRound() == 0) { + tileMap[x][y].ignite(); + if (!contains(tileMap[x][y], closedList)) { + closedList.add(tileMap[x][y]); + } + } + + } + } + } + //System.out.println(open.size()); + + } + + public Tile getNeighbour(Tile t, int offsetX, int offsetY) { + if (t.isExt()) { + return null; + } + int _x = t.getX() + offsetX; + int _y = t.getY() + offsetY; + if (_x < 0 || _x >= tileMap.length || _y < 0 || _y >= tileMap[_x].length) { + return null; + } + if (tileMap[_x][_y].isExt() || tileMap[_x][_y].getType() == 1) { + return null; + } + + return tileMap[_x][_y]; + } + + private boolean contains(Tile t, ArrayList list) { + for (Tile tile : list) { + if (t.getX() == tile.getX() && t.getY() == tile.getY()) { + return true; + } + } + return false; + } + + public void nextRound() { + burnsIn(true); + //extinguish(5, 5); + //extinguish(4, 4); + //System.out.println("Score: " + calcScore(new int[]{5, 4, 3, 2, 1}, returnScoreArray())); + } + + public int[] returnScoreArray() { +// ArrayList list = new ArrayList(); +// for (int x = 0; x < tileMap.length; x++) { +// for (int y = 0; y < tileMap[x].length; y++) { +// int r = tileMap[x][y].getRound(); +// while (r >= list.size()) { +// list.add(0); +// } +// if (r >= 0) { +// list.set(r, list.get(r) + 1); +// } +// } +// } + //int[] i = new int[list.size()]; +// for (int l = 0; l < i.length; l++) { +// i[l] = list.get(l); +// } + int[] i = new int[10]; + for (int z = 0; z < i.length; z++) { + if (z == 0) { + //System.out.println(""); + } + for (int x = 0; x < tileMap.length; x++) { + if (z == 0) { + //System.out.println(""); + } + for (int y = 0; y < tileMap.length; y++) { + + if (z == 0) { + //System.out.print(tileMap[x][y].getRound() + ";"); + } + + if (tileMap[x][y].getRound() == z) { + i[z]++; + } + } + } + } + + return i; + } + + public int calcScore(int[] factor, int[] mainScore) { + //burnsIn(false); + int[] arr = returnScoreArray(); + int score = 0; + int length = (arr.length < factor.length) ? arr.length : factor.length; + for (int i = 0; i < length; i++) { + int mainS = (i < mainScore.length) ? mainScore[i] : 0; + score += (mainS - arr[i]) * factor[i]; + } + return score; + } + // + + public void load(String path) { + Tile[][] tmp = null; + BufferedReader br = null; + try { + StringBuilder stringB = new StringBuilder(); + br = new BufferedReader(new FileReader(path)); + width = readInt(br); + height = readInt(br); + tmp = new Tile[width][height]; + + for (int y = 0; y < width; y++) { + for (int x = 0; x < height; x++) { + switch ((char) br.read()) { + case '0': //Normaler Wald + tmp[x][y] = new Tile(x, y, (byte) 0); + break; + case '1': //Blockierter Wald + tmp[x][y] = new Tile(x, y, (byte) 1); + break; + case '2': //Feuer + tmp[x][y] = new Tile(x, y, (byte) 2); + closedList.add(tmp[x][y]); + break; + default: + x--; + break; + } + } + } + setTileMap(tmp); + + } catch (IOException e) { + System.out.println(e); + } + + } + + private int readInt(BufferedReader br) throws IOException { + char c; + int i; + + c = readNonwhiteChar(br); + i = 0; + do { + i = i * 10 + c - '0'; + c = (char) br.read(); + } while (c >= '0' && c <= '9'); + return i; + } + + private static char readNonwhiteChar(BufferedReader bf) throws IOException { + char c; + + do { + c = (char) bf.read(); + } while (c == ' ' || c == '\t' || c == '\n' || c == '\r'); + + return c; + } + // + + @Override + public Map clone() { + ArrayList _tmpClosed = new ArrayList(); + for (Tile tile : closedList) { + _tmpClosed.add(tile.clone()); + } + Tile[][] _tmpMap = new Tile[tileMap.length][tileMap[0].length]; + for (int x = 0; x < tileMap.length; x++) { + for (int y = 0; y < tileMap[x].length; y++) { + _tmpMap[x][y] = tileMap[x][y].clone(); + } + } + return new Map(width, height, _tmpClosed, _tmpMap); + } + + @Override + public String toString() { + String str = ""; + for (int y = 0; y < tileMap[0].length; y++) { + for (int x = 0; x < tileMap.length; x++) { + str = str + tileMap[x][y].getRound() + ";"; + } + str = str + "\n"; + } + return str; + } + // + + public int getWidth() { + return width; + } + + public int getHeight() { + return height; + } + + public Tile[][] getTileMap() { + return tileMap; + } + + /** + * @param tileMap the tileMap to set + */ + public void setTileMap(Tile[][] tileMap) { + this.tileMap = tileMap; + } + // +} diff --git a/Java/Wettbewerb_ForestFire/src/Tile.java b/Java/Wettbewerb_ForestFire/src/Tile.java new file mode 100644 index 0000000..d89efbe --- /dev/null +++ b/Java/Wettbewerb_ForestFire/src/Tile.java @@ -0,0 +1,100 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author Hannes + */ +public class Tile { + + private int x, y; + private byte type; + private int round; + private int score; + private boolean ext; + + public Tile(int myX, int myY, byte TileType) { + score = 0; + x = myX; + y = myY; + type = TileType; + if (type == 2) { + ignite(); + } else { + round = -1; + } + ext = false; + } + + protected Tile(int myX, int myY, byte TileType, int r, int s, boolean extinguished) { + score = s; + x = myX; + y = myY; + type = TileType; + round = r; + ext = extinguished; + } + + public void extinguish() { + ext = true; + } + + public int getType() { + return type; + } + + public void ignite() { + if (type == 0 && !isExt()) { + type = 2; + round = 0; + } + } + + public void setRound(int r) { + if (type != 2) { + round = r; + } + } + + public int getRound() { + return round; + } + + public boolean isExt() { + return ext; + } + + public int getX() { + return x; + } + + public int getY() { + return y; + } + + @Override + public Tile clone() { + return new Tile(x, y, type, round, getScore(),ext); + } + + /** + * @return the score + */ + public int getScore() { + return score; + } + + /** + * @param score the score to set + */ + public void setScore(int score) { + this.score = score; + } + + @Override + public String toString() { + return "[" + x + "|" + y + "]"; + } +} diff --git a/Java/Wettewerb_Foto/Wettewerb_Foto.iml b/Java/Wettewerb_Foto/Wettewerb_Foto.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Wettewerb_Foto/Wettewerb_Foto.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Wettewerb_Foto/build.xml b/Java/Wettewerb_Foto/build.xml new file mode 100644 index 0000000..73b018d --- /dev/null +++ b/Java/Wettewerb_Foto/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Wettewerb_Foto. + + + diff --git a/Java/Wettewerb_Foto/build/built-jar.properties b/Java/Wettewerb_Foto/build/built-jar.properties new file mode 100644 index 0000000..40b1508 --- /dev/null +++ b/Java/Wettewerb_Foto/build/built-jar.properties @@ -0,0 +1,4 @@ +#Sun, 06 Oct 2013 13:35:51 +0200 + + +C\:\\Users\\Hannes\\Documents\\NetBeansProjects\\Wettewerb_Foto= diff --git a/Java/Wettewerb_Foto/build/classes/.netbeans_automatic_build b/Java/Wettewerb_Foto/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Wettewerb_Foto/build/classes/.netbeans_update_resources b/Java/Wettewerb_Foto/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/Camera.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/Camera.class new file mode 100644 index 0000000..04a18b0 Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/Camera.class differ diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/Image.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/Image.class new file mode 100644 index 0000000..e45535f Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/Image.class differ diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$1.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$1.class new file mode 100644 index 0000000..72c8b8d Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$1.class differ diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$2.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$2.class new file mode 100644 index 0000000..01355da Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$2.class differ diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$3.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$3.class new file mode 100644 index 0000000..55796de Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$3.class differ diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$4.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$4.class new file mode 100644 index 0000000..ceeb196 Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$4.class differ diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$5.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$5.class new file mode 100644 index 0000000..5e5e8b7 Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$5.class differ diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$6.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$6.class new file mode 100644 index 0000000..97e15fc Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow$6.class differ diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow.class new file mode 100644 index 0000000..34223ab Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow.class differ diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow.form b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow.form new file mode 100644 index 0000000..029fd88 --- /dev/null +++ b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/MainWindow.form @@ -0,0 +1,125 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/Wettewerb_Foto/build/classes/wettewerb_foto/Pixel.class b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/Pixel.class new file mode 100644 index 0000000..bdd16ab Binary files /dev/null and b/Java/Wettewerb_Foto/build/classes/wettewerb_foto/Pixel.class differ diff --git a/Java/Wettewerb_Foto/dist/README.TXT b/Java/Wettewerb_Foto/dist/README.TXT new file mode 100644 index 0000000..ca6117f --- /dev/null +++ b/Java/Wettewerb_Foto/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "Wettewerb_Foto.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/Java/Wettewerb_Foto/dist/Wettewerb_Foto.jar b/Java/Wettewerb_Foto/dist/Wettewerb_Foto.jar new file mode 100644 index 0000000..07eb1ff Binary files /dev/null and b/Java/Wettewerb_Foto/dist/Wettewerb_Foto.jar differ diff --git a/Java/Wettewerb_Foto/manifest.mf b/Java/Wettewerb_Foto/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Wettewerb_Foto/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Wettewerb_Foto/nbproject/build-impl.xml b/Java/Wettewerb_Foto/nbproject/build-impl.xml new file mode 100644 index 0000000..219d9e6 --- /dev/null +++ b/Java/Wettewerb_Foto/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Wettewerb_Foto/nbproject/genfiles.properties b/Java/Wettewerb_Foto/nbproject/genfiles.properties new file mode 100644 index 0000000..e99c118 --- /dev/null +++ b/Java/Wettewerb_Foto/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=e926f622 +build.xml.script.CRC32=e6e43631 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=e926f622 +nbproject/build-impl.xml.script.CRC32=352f8b06 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Wettewerb_Foto/nbproject/private/private.properties b/Java/Wettewerb_Foto/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Wettewerb_Foto/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Wettewerb_Foto/nbproject/private/private.xml b/Java/Wettewerb_Foto/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Wettewerb_Foto/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Wettewerb_Foto/nbproject/project.properties b/Java/Wettewerb_Foto/nbproject/project.properties new file mode 100644 index 0000000..f21f4dc --- /dev/null +++ b/Java/Wettewerb_Foto/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Wettewerb_Foto.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=wettewerb_foto.MainWindow +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Wettewerb_Foto/nbproject/project.xml b/Java/Wettewerb_Foto/nbproject/project.xml new file mode 100644 index 0000000..30f55d0 --- /dev/null +++ b/Java/Wettewerb_Foto/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Wettewerb_Foto + + + + + + + + + diff --git a/Java/Wettewerb_Foto/src/wettewerb_foto/Camera.java b/Java/Wettewerb_Foto/src/wettewerb_foto/Camera.java new file mode 100644 index 0000000..753dd5e --- /dev/null +++ b/Java/Wettewerb_Foto/src/wettewerb_foto/Camera.java @@ -0,0 +1,50 @@ +package wettewerb_foto; + +import java.util.ArrayList; + +public class Camera { + + private int id; + private String name; + private ArrayList images = new ArrayList(); + public Camera(int id, String name) { + this.id = id; + this.name = name; + } + + public int countImages() { + return getImages().size(); + } + + public String writeLine() { + String s = ""; + short i = 0; + for (Image image : images) { + s = s + this.name + " " + this.id + i + ";"; + s = s + image.getAbstand() + ";"; + s = s + image.getStreuung() + ";"; + s = s + System.getProperty("line.separator"); + i++; + } + s = s.replace(".", ","); + return s; + } + + public void AddImage(String path) { + Image tmp = new Image(); + + + tmp.Load(path); + System.out.println(this.name + this.id + " loaded a new Image"); + getImages().add(tmp); + + } + @Override + public String toString() + { + return name + " " + id; + } + public ArrayList getImages() { + return images; + } +} diff --git a/Java/Wettewerb_Foto/src/wettewerb_foto/Image.java b/Java/Wettewerb_Foto/src/wettewerb_foto/Image.java new file mode 100644 index 0000000..a242eda --- /dev/null +++ b/Java/Wettewerb_Foto/src/wettewerb_foto/Image.java @@ -0,0 +1,130 @@ +package wettewerb_foto; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; + +public class Image { + + private int width = 0, height = 0; + private double abstand, streuung; + + //Streuung + private void sigmaDist(double durchschnitt, ArrayList pMap) { + double s = 0; + for (int i = 0; i < pMap.size() - width; i++) { + Pixel p = pMap.get(i); + Pixel q = pMap.get(i + width); + s = s + ((pixelDist(p, q) - durchschnitt) * + (pixelDist(p, q) - durchschnitt)); + } + streuung = Math.sqrt(s / (pMap.size() - width)); + } + + private double pixelDist(Pixel p, Pixel q) { + double d = Math.sqrt((p.r - q.r) * (p.r - q.r) + + (p.g - q.g) * (p.g - q.g) + + (p.b - q.b) * (p.b - q.b)); + return d; + } + + private void avgDist(ArrayList pMap) { + double d = 0; + for (int i = 0; i < pMap.size() - width; i++) { + d = d + pixelDist(pMap.get(i), pMap.get(i + width)); + } + abstand = d / (pMap.size() - width); + } + + private void compute(ArrayList pMap) { + int size = pMap.size(); + avgDist(pMap); + sigmaDist(abstand, pMap); + //System.out.println(getAbstand()); + } + //Lädt Image und gibt Farbspektrum zurück (um speicherplatz zu sparen) + + public void Load(String path) { + ArrayList pixelMap = new ArrayList(); + int i = 0; + BufferedReader br = null; + try { + + StringBuilder sb = new StringBuilder(); + br = new BufferedReader(new FileReader(path)); + + if (readHeader(br)) { + while (br.ready()) { + short r = (short) readInt(br); + short g = (short) readInt(br); + short b = (short) readInt(br); + if (r >= 0 && g >= 0 && b >= 0) { + pixelMap.add(new Pixel(i, r, g, b)); + i++; + } + } + } + + } catch (IOException e) { + System.out.println(e); + } + + compute(pixelMap); + //return pixelMap; + } + + private boolean readHeader(BufferedReader br) { + try { + char c1 = (char) br.read(); + char c2 = (char) br.read(); + if (c1 == 'P' && c2 == '3') { + width = readInt(br); + height = readInt(br); + int maxVal = readInt(br); + return true; + } else { + return false; + } + } catch (IOException e) { + System.out.println(e); + return false; + } + } + private static char readNonwhiteChar(BufferedReader bf) throws IOException { + char c; + + do { + c = (char) bf.read(); + } while (c == ' ' || c == '\t' || c == '\n' || c == '\r'); + + return c; + } + + private int readInt(BufferedReader br) throws IOException { + char c; + int i; + + c = readNonwhiteChar(br); + i = 0; + do { + i = i * 10 + c - '0'; + c = (char) br.read(); + } while (c >= '0' && c <= '9'); + return i; + } + /** + * @return the abstand + */ + public double getAbstand() { + return abstand; + } + /** + * @return the streuung + */ + public double getStreuung() { + return streuung; + } +} diff --git a/Java/Wettewerb_Foto/src/wettewerb_foto/MainWindow.form b/Java/Wettewerb_Foto/src/wettewerb_foto/MainWindow.form new file mode 100644 index 0000000..029fd88 --- /dev/null +++ b/Java/Wettewerb_Foto/src/wettewerb_foto/MainWindow.form @@ -0,0 +1,125 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Java/Wettewerb_Foto/src/wettewerb_foto/MainWindow.java b/Java/Wettewerb_Foto/src/wettewerb_foto/MainWindow.java new file mode 100644 index 0000000..8638567 --- /dev/null +++ b/Java/Wettewerb_Foto/src/wettewerb_foto/MainWindow.java @@ -0,0 +1,287 @@ +package wettewerb_foto; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.AbstractListModel; +import javax.swing.JDialog; +import javax.swing.JFileChooser; +import javax.swing.JList; +import javax.swing.ListModel; +import javax.swing.ListSelectionModel; +import javax.swing.filechooser.FileNameExtensionFilter; + +/** + * + * @author Hannes + */ +public class MainWindow extends javax.swing.JFrame { + + static ArrayList cam = new ArrayList(); + Camera uCam; + + /** + * Creates new form MainWindow + */ + public MainWindow() { + initComponents(); + + + uCam = new Camera(0, "Unbekannt"); + for (int i = 1; i <= 5; i++) { + cam.add(new Camera(i, "Kamera")); + } + ListModel lm = new AbstractListModel() { + @Override + public int getSize() { + return cam.size(); + } + + @Override + public Object getElementAt(int i) { + return cam.get(i); + } + }; + jList1.setModel(lm); + jList1.setSelectedIndex(0); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jScrollPane1 = new javax.swing.JScrollPane(); + jList1 = new javax.swing.JList(); + addImageButton = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + unknownImage = new javax.swing.JButton(); + export = new javax.swing.JButton(); + JaktuellLabel = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jList1.addListSelectionListener(new javax.swing.event.ListSelectionListener() { + public void valueChanged(javax.swing.event.ListSelectionEvent evt) { + jList1ValueChanged(evt); + } + }); + jScrollPane1.setViewportView(jList1); + + addImageButton.setText("Lade Bilder für Camera 1"); + addImageButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + addImageButtonActionPerformed(evt); + } + }); + + jLabel1.setText("Unbekanntes Bild: "); + + unknownImage.setText("Lade unbekanntes Bild"); + unknownImage.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + unknownImageActionPerformed(evt); + } + }); + + export.setText("Ergebnis exportieren"); + export.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + exportActionPerformed(evt); + } + }); + + JaktuellLabel.setText("Anzahl der Bilder:"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(export, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(unknownImage, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))) + .addGroup(layout.createSequentialGroup() + .addComponent(JaktuellLabel) + .addGap(0, 0, Short.MAX_VALUE)) + .addComponent(addImageButton, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE)) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(0, 11, Short.MAX_VALUE) + .addComponent(JaktuellLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(addImageButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(unknownImage) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(export, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + + pack(); + }// //GEN-END:initComponents + + private void addImageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addImageButtonActionPerformed + final JFileChooser fc = new JFileChooser(); + + FileNameExtensionFilter ppmFileFilter = new FileNameExtensionFilter("multiple selection recommended (*.ppm)", "ppm"); + fc.setFileFilter(ppmFileFilter); + + //Allow Multiplefiles + fc.setMultiSelectionEnabled(true); + + int returnVal = fc.showOpenDialog(this); + + if (returnVal == JFileChooser.APPROVE_OPTION) { + File[] tmpFiles = fc.getSelectedFiles(); + for (int i = 0; i < tmpFiles.length; i++) { + cam.get(jList1.getSelectedIndex()).AddImage(tmpFiles[i].getAbsolutePath()); + } + + } + + changeInfo(); + }//GEN-LAST:event_addImageButtonActionPerformed + + private void unknownImageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unknownImageActionPerformed + uCam = new Camera(0, "Unbekannt"); + final JFileChooser fc = new JFileChooser(); + FileNameExtensionFilter ppmFileFilter = new FileNameExtensionFilter("PPM Images (*.ppm)", "ppm"); + fc.setFileFilter(ppmFileFilter); + + + int returnVal = fc.showOpenDialog(this); + + if (returnVal == JFileChooser.APPROVE_OPTION) { + File tmpFile = fc.getSelectedFile(); + uCam.AddImage(tmpFile.getAbsolutePath()); + } + + jLabel1.setText("Unbekanntes Bild: " + uCam.countImages()); + }//GEN-LAST:event_unknownImageActionPerformed + + private void exportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exportActionPerformed + //Open FileSaveDialo + final JFileChooser fc = new JFileChooser(); + FileNameExtensionFilter ppmFileFilter = new FileNameExtensionFilter("Save as csv (*.csv)", "csv"); + fc.setFileFilter(ppmFileFilter); + int returnVal = fc.showSaveDialog(this); + + if (returnVal == JFileChooser.APPROVE_OPTION) { + try { + //File Saving + File tmpFile = fc.getSelectedFile(); + createCSV(tmpFile.getParent(), tmpFile.getName() + ".csv"); + } catch (IOException ex) { + Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex); + } + } + + }//GEN-LAST:event_exportActionPerformed + + private void jList1ValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jList1ValueChanged + changeInfo(); + }//GEN-LAST:event_jList1ValueChanged + public void createCSV(String path, String filename) throws IOException { + File file = new File(path, filename); + if (!file.isFile() && !file.createNewFile()) { + throw new IOException("Error creating new file: " + file.getAbsolutePath()); + } + try { + FileWriter writer = new FileWriter(path + "\\" + filename); + + writer.append("Foto;Durchschnittlicher Abstand; Streuung" + System.getProperty("line.separator")); + + for (int i = 0; i < cam.size(); i++) { + writeLine(writer, cam.get(i)); + } + + writeLine(writer, uCam); + + + System.out.println("Written Data to File"); + + //generate whatever data you want + + writer.flush(); + writer.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + } + + public static FileWriter writeLine(FileWriter writer, Camera camera) throws IOException { + writer.append(camera.writeLine()); + return writer; + } + + public static void main(String args[]) { + + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new MainWindow().setVisible(true); + } + }); + } + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel JaktuellLabel; + private javax.swing.JButton addImageButton; + private javax.swing.JButton export; + private javax.swing.JLabel jLabel1; + private javax.swing.JList jList1; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JButton unknownImage; + // End of variables declaration//GEN-END:variables + + private void changeInfo() { + Camera c = cam.get(jList1.getSelectedIndex()); + JaktuellLabel.setText("Anzahl der Bilder: " + c.countImages()); + addImageButton.setText("Lade Bilder für " + c); + } +} diff --git a/Java/Wettewerb_Foto/src/wettewerb_foto/Pixel.java b/Java/Wettewerb_Foto/src/wettewerb_foto/Pixel.java new file mode 100644 index 0000000..6c4df88 --- /dev/null +++ b/Java/Wettewerb_Foto/src/wettewerb_foto/Pixel.java @@ -0,0 +1,11 @@ +package wettewerb_foto; + +public class Pixel { + short r,g,b; + public Pixel(int id,short R, short G, short B) + { + r = R; + g = G; + b = B; + } +} diff --git a/Java/Zahlenraten/Zahlenraten.iml b/Java/Zahlenraten/Zahlenraten.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/Zahlenraten/Zahlenraten.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/Zahlenraten/build.xml b/Java/Zahlenraten/build.xml new file mode 100644 index 0000000..3b41b5e --- /dev/null +++ b/Java/Zahlenraten/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Zahlenraten. + + + diff --git a/Java/Zahlenraten/build/built-jar.properties b/Java/Zahlenraten/build/built-jar.properties new file mode 100644 index 0000000..b335059 --- /dev/null +++ b/Java/Zahlenraten/build/built-jar.properties @@ -0,0 +1,4 @@ +#Wed, 30 Jan 2013 11:39:29 +0100 + + +C\:\\Users\\Hannes\\Documents\\NetBeansProjects\\Zahlenraten= diff --git a/Java/Zahlenraten/build/classes/.netbeans_automatic_build b/Java/Zahlenraten/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/Zahlenraten/build/classes/.netbeans_update_resources b/Java/Zahlenraten/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/Zahlenraten/build/classes/zahlenraten/Zahlenraten.class b/Java/Zahlenraten/build/classes/zahlenraten/Zahlenraten.class new file mode 100644 index 0000000..089cefa Binary files /dev/null and b/Java/Zahlenraten/build/classes/zahlenraten/Zahlenraten.class differ diff --git a/Java/Zahlenraten/manifest.mf b/Java/Zahlenraten/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/Zahlenraten/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/Zahlenraten/nbproject/build-impl.xml b/Java/Zahlenraten/nbproject/build-impl.xml new file mode 100644 index 0000000..d686a81 --- /dev/null +++ b/Java/Zahlenraten/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/Zahlenraten/nbproject/genfiles.properties b/Java/Zahlenraten/nbproject/genfiles.properties new file mode 100644 index 0000000..1601d24 --- /dev/null +++ b/Java/Zahlenraten/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=23ea1179 +build.xml.script.CRC32=07b26542 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=23ea1179 +nbproject/build-impl.xml.script.CRC32=458abcfa +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/Zahlenraten/nbproject/private/private.properties b/Java/Zahlenraten/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/Zahlenraten/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/Zahlenraten/nbproject/private/private.xml b/Java/Zahlenraten/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/Zahlenraten/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/Zahlenraten/nbproject/project.properties b/Java/Zahlenraten/nbproject/project.properties new file mode 100644 index 0000000..d8b8fb8 --- /dev/null +++ b/Java/Zahlenraten/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Zahlenraten.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=zahlenraten.Zahlenraten +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/Zahlenraten/nbproject/project.xml b/Java/Zahlenraten/nbproject/project.xml new file mode 100644 index 0000000..b448b0c --- /dev/null +++ b/Java/Zahlenraten/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Zahlenraten + + + + + + + + + diff --git a/Java/Zahlenraten/src/zahlenraten/Zahlenraten.java b/Java/Zahlenraten/src/zahlenraten/Zahlenraten.java new file mode 100644 index 0000000..6df6a43 --- /dev/null +++ b/Java/Zahlenraten/src/zahlenraten/Zahlenraten.java @@ -0,0 +1,30 @@ +package zahlenraten; +import java.util.*; +public class Zahlenraten { + public static void main(String[] args) { + int geraten, zahl = 0, i = 0, maxdurchläufe = 3; + Scanner scan = new Scanner(System.in); + Random r = new Random(); + zahl = r.nextInt(10) + 1; + while(i < maxdurchläufe) + { + i++; + System.out.println("Rate die Zahl (1-10):"); + geraten = scan.nextInt(); + if(zahl != geraten) + { + if(zahl < geraten) + { + System.out.println("Zu groß"); + }else + { + System.out.println("Zu klein"); + } + }else + { + System.out.println("Richtig"); + i = 3000; + } + } + } +} diff --git a/Java/baum/baum.iml b/Java/baum/baum.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/baum/baum.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/baum/build.xml b/Java/baum/build.xml new file mode 100644 index 0000000..2cda580 --- /dev/null +++ b/Java/baum/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Baum. + + + diff --git a/Java/baum/manifest.mf b/Java/baum/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/baum/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/baum/nbproject/build-impl.xml b/Java/baum/nbproject/build-impl.xml new file mode 100644 index 0000000..a32134a --- /dev/null +++ b/Java/baum/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/baum/nbproject/genfiles.properties b/Java/baum/nbproject/genfiles.properties new file mode 100644 index 0000000..a68c14e --- /dev/null +++ b/Java/baum/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=792c969d +build.xml.script.CRC32=5088a26e +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=792c969d +nbproject/build-impl.xml.script.CRC32=8cce4791 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/baum/nbproject/private/private.properties b/Java/baum/nbproject/private/private.properties new file mode 100644 index 0000000..5cc4d5b --- /dev/null +++ b/Java/baum/nbproject/private/private.properties @@ -0,0 +1 @@ +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/baum/nbproject/private/private.xml b/Java/baum/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/Java/baum/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Java/baum/nbproject/project.properties b/Java/baum/nbproject/project.properties new file mode 100644 index 0000000..7bc8b66 --- /dev/null +++ b/Java/baum/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Baum.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=baum.Baum +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/baum/nbproject/project.xml b/Java/baum/nbproject/project.xml new file mode 100644 index 0000000..809b471 --- /dev/null +++ b/Java/baum/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Baum + + + + + + + + + diff --git a/Java/baum/src/baum/Ast.java b/Java/baum/src/baum/Ast.java new file mode 100644 index 0000000..357905d --- /dev/null +++ b/Java/baum/src/baum/Ast.java @@ -0,0 +1,104 @@ +/* + * Astklasse + * nur in den Blättern des Baumes stehen unsere Informationen + * die Äste führen zu den Blättern + */ +package baum; + +/** + * + * @author frank.baethge + */ +public class Ast { + private Ast rechts; + private Ast links; + private int häufigkeit; + + public Ast() { + rechts = null; + links = null; + häufigkeit = 0; + } + + public Ast(Ast l, Ast r) { + rechts = r; + links = l; + häufigkeit = 0; + if (r != null) { + häufigkeit += r.häufigkeit; + } + if (l != null) { + häufigkeit += l.häufigkeit; + } + } + + + /** + * Traversierung des Baums + * es gibt mehrere Möglichkeiten einen Baum zu durchlaufen + * - pre-order => W-L-R + * - post-order => L-R-W + * - in-order => L-W-R (reverse in-order => R-W-L) + * - level-order => Breitensuche (jede Ebene nacheinander) + * hier wird am ehesten pre-order verwendet (Wuzel-Links-Rechts) + * @param kodierung + * @return + */ + public String ausgeben(String kodierung) { + //System.out.println(kodierung + " l:" + getLinks() + " r:" + getRechts()); + return " l: (" + getLinks().ausgeben(kodierung + '0') + ")" + + "r: (" + getRechts().ausgeben(kodierung+'1') + ")"; + } + /** + * Berechnet die Summe für alle Blätter über das Produkt aus ebene * häufigkeit und + * damit auch die Länge des komprimierten Textes + * @param ebene - die Ebene kodiert gleichzeitig die neue Länge des jeweiligen Buchstabens + * @return + */ + public Integer berechneBitlänge(int ebene) { + // Abstieg zu den Blättern und Rückgabe der berechneten Werte + return getLinks().berechneBitlänge(ebene + 1) + getRechts().berechneBitlänge(ebene + 1); + } + + /** + * @return the rechts + */ + public Ast getRechts() { + return rechts; + } + + /** + * @param rechts the rechts to set + */ + public void setRechts(Ast rechts) { + this.rechts = rechts; + } + + /** + * @return the links + */ + public Ast getLinks() { + return links; + } + + /** + * @param links the links to set + */ + public void setLinks(Ast links) { + this.links = links; + } + + /** + * @return the häufigkeit + */ + public int getHäufigkeit() { + return häufigkeit; + } + + /** + * @param häufigkeit the häufigkeit to set + */ + public void setHäufigkeit(int häufigkeit) { + this.häufigkeit = häufigkeit; + } +} diff --git a/Java/baum/src/baum/Baum.java b/Java/baum/src/baum/Baum.java new file mode 100644 index 0000000..abc1246 --- /dev/null +++ b/Java/baum/src/baum/Baum.java @@ -0,0 +1,123 @@ +/* + * binäre Bäume + * und wie man damit umgeht + * + * Thema: Komprimiere einen Text + * Beispiel: iQ1Bäume_131203 + * "Bäume sind auch in der Informatik ein wichtiges Thema. Viele Daten werden zunächst in Bäumen abgespeichert. Sie werden vor allem zur Suche und Sortierung verwendet." + * + */ +package baum; + +/** + * + * @author frank.baethge + */ +public class Baum { + private static Ast wurzel; + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + wurzel = new Ast(//164 + new Ast(//79 + new Ast(//56 + new Ast(//28 + new Blatt('n', 13), + new Ast(//15 + new Blatt('t', 7), + new Blatt('u', 8) + ) + ), + new Ast(//28 + new Ast(//16 + new Ast(//8 + new Blatt('s', 4), + new Blatt('w', 4)), + new Ast(//8 + new Blatt('m', 5), + new Blatt('.', 3) + ) + ), + new Ast(//12 + new Ast(//6 + new Blatt('g', 3), + new Blatt('S', 3) + ), + new Ast(//6 + new Blatt('o', 3), + new Blatt('l', 3) + ) + ) + ) + ), + new Ast(//23 + new Blatt('i', 11), + new Ast(//12 + new Blatt('d', 6), + new Blatt('a', 6) + ) + ) + ), + new Ast(//85 + new Blatt(' ', 24), + new Ast(//61 + new Ast(//32 + new Ast(//9 + new Ast(//5 + new Blatt('B', 2), + new Blatt('ä', 3) + ), + new Ast(//4 + new Blatt('z', 2), + new Blatt('v', 2) + ) + ), + new Blatt('e', 23) + ), + new Ast(//29 + new Ast(//8 + new Ast(//4 + new Ast(//2 + new Blatt('f', 1), + new Blatt('b', 1) + ), + new Ast(//2 + new Blatt('k', 1), + new Blatt('p', 1) + ) + ), + new Ast(//4 + new Ast(//2 + new Blatt('V', 1), + new Blatt('T', 1) + ), + new Ast(//2 + new Blatt('I', 1), + new Blatt('D', 1) + ) + ) + ), + new Ast(//21 + new Blatt('r', 10), + new Ast(//11 + new Blatt('h', 6), + new Blatt('c', 5) + ) + ) + ) + ) + ) + ); + //System.out.println("Bitlänge des komprimierten Textes: " + wurzel.berechneBitlänge(0)); + System.out.println("Wurzel: " + wurzel.ausgeben("")); + + // rotiere Wurzel links + Ast alteWurzel = wurzel; + wurzel = wurzel.getRechts(); + alteWurzel.setRechts(wurzel.getLinks()); + wurzel.setLinks(alteWurzel); + System.out.println("Bitlänge des komprimierten Textes nach der Rotation: " + wurzel.berechneBitlänge(0)); + + } +} diff --git a/Java/baum/src/baum/Blatt.java b/Java/baum/src/baum/Blatt.java new file mode 100644 index 0000000..5c5cbf2 --- /dev/null +++ b/Java/baum/src/baum/Blatt.java @@ -0,0 +1,27 @@ +/* + * Blattklasse + * zeigt den Buchstaben an, der über diesen Pfad kodiert werden soll + */ +package baum; + +/** + * + * @author frank.baethge + */ +public class Blatt extends Ast { + private char buchstabe; + + public Blatt(char c, int h) { + buchstabe = c; + setHäufigkeit(h); + } + + @Override + public String ausgeben(String kodierung) { + return "\"" + buchstabe + '"' + kodierung + ' '; + } + @Override + public Integer berechneBitlänge(int ebene) { + return ebene * getHäufigkeit(); + } +} \ No newline at end of file diff --git a/Java/pzz/build.xml b/Java/pzz/build.xml new file mode 100644 index 0000000..157d83b --- /dev/null +++ b/Java/pzz/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project pzz. + + + diff --git a/Java/pzz/build/classes/.netbeans_automatic_build b/Java/pzz/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Java/pzz/build/classes/.netbeans_update_resources b/Java/pzz/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Java/pzz/build/classes/pzz/Primzahl.class b/Java/pzz/build/classes/pzz/Primzahl.class new file mode 100644 index 0000000..2664c2d Binary files /dev/null and b/Java/pzz/build/classes/pzz/Primzahl.class differ diff --git a/Java/pzz/build/classes/pzz/Pzz.class b/Java/pzz/build/classes/pzz/Pzz.class new file mode 100644 index 0000000..fd15f14 Binary files /dev/null and b/Java/pzz/build/classes/pzz/Pzz.class differ diff --git a/Java/pzz/build/classes/pzz/pzzApp$1.class b/Java/pzz/build/classes/pzz/pzzApp$1.class new file mode 100644 index 0000000..59aa74e Binary files /dev/null and b/Java/pzz/build/classes/pzz/pzzApp$1.class differ diff --git a/Java/pzz/build/classes/pzz/pzzApp$2.class b/Java/pzz/build/classes/pzz/pzzApp$2.class new file mode 100644 index 0000000..e8d0152 Binary files /dev/null and b/Java/pzz/build/classes/pzz/pzzApp$2.class differ diff --git a/Java/pzz/build/classes/pzz/pzzApp$3.class b/Java/pzz/build/classes/pzz/pzzApp$3.class new file mode 100644 index 0000000..dd3db71 Binary files /dev/null and b/Java/pzz/build/classes/pzz/pzzApp$3.class differ diff --git a/Java/pzz/build/classes/pzz/pzzApp.class b/Java/pzz/build/classes/pzz/pzzApp.class new file mode 100644 index 0000000..16d06ce Binary files /dev/null and b/Java/pzz/build/classes/pzz/pzzApp.class differ diff --git a/Java/pzz/build/classes/pzz/pzzApp.form b/Java/pzz/build/classes/pzz/pzzApp.form new file mode 100644 index 0000000..c7d28d3 --- /dev/null +++ b/Java/pzz/build/classes/pzz/pzzApp.form @@ -0,0 +1,110 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/pzz/manifest.mf b/Java/pzz/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java/pzz/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java/pzz/nbproject/build-impl.xml b/Java/pzz/nbproject/build-impl.xml new file mode 100644 index 0000000..5a97f49 --- /dev/null +++ b/Java/pzz/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/pzz/nbproject/genfiles.properties b/Java/pzz/nbproject/genfiles.properties new file mode 100644 index 0000000..4f23064 --- /dev/null +++ b/Java/pzz/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=267c11e7 +build.xml.script.CRC32=d6d42c9a +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=267c11e7 +nbproject/build-impl.xml.script.CRC32=d04ef97b +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Java/pzz/nbproject/private/private.properties b/Java/pzz/nbproject/private/private.properties new file mode 100644 index 0000000..c5535e5 --- /dev/null +++ b/Java/pzz/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Hannes\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Java/pzz/nbproject/private/private.xml b/Java/pzz/nbproject/private/private.xml new file mode 100644 index 0000000..2eee429 --- /dev/null +++ b/Java/pzz/nbproject/private/private.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Java/pzz/nbproject/project.properties b/Java/pzz/nbproject/project.properties new file mode 100644 index 0000000..312a401 --- /dev/null +++ b/Java/pzz/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/pzz.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=pzz.Pzz +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java/pzz/nbproject/project.xml b/Java/pzz/nbproject/project.xml new file mode 100644 index 0000000..25a569f --- /dev/null +++ b/Java/pzz/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + pzz + + + + + + + + + diff --git a/Java/pzz/pzz.iml b/Java/pzz/pzz.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Java/pzz/pzz.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Java/pzz/src/pzz/Pzz.java b/Java/pzz/src/pzz/Pzz.java new file mode 100644 index 0000000..5cdf656 --- /dev/null +++ b/Java/pzz/src/pzz/Pzz.java @@ -0,0 +1,6 @@ +package pzz; +public class Pzz { + public static void main(String[] args) { + pzzApp.main(args); + } +} diff --git a/Java/pzz/src/pzz/pzzApp.form b/Java/pzz/src/pzz/pzzApp.form new file mode 100644 index 0000000..c7d28d3 --- /dev/null +++ b/Java/pzz/src/pzz/pzzApp.form @@ -0,0 +1,110 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java/pzz/src/pzz/pzzApp.java b/Java/pzz/src/pzz/pzzApp.java new file mode 100644 index 0000000..42c412c --- /dev/null +++ b/Java/pzz/src/pzz/pzzApp.java @@ -0,0 +1,203 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package pzz; + +import javax.swing.JTextArea; + +/** + * + * @author Hannes + */ +public class pzzApp extends javax.swing.JFrame { + static Primzahl erste = new Primzahl(2); + /** + * Creates new form pzzApp + */ + public pzzApp() { + initComponents(); + } + + + + static public Boolean addIfPrime(int z) + { + Primzahl current = erste; + while(Math.sqrt(z) >= current.Zahl() && current != null) + { + if(z % current.Zahl() == 0) + return false; + current = current.next; + } + erste.append(new Primzahl(z)); + return true; + } + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + textFeld = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + jScrollPane2 = new javax.swing.JScrollPane(); + jTextArea2 = new javax.swing.JTextArea(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jLabel1.setBackground(new java.awt.Color(102, 102, 255)); + jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jLabel1.setForeground(new java.awt.Color(255, 0, 0)); + jLabel1.setText("Primzahlen sollen hier angezeigt werden."); + jLabel1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + pzzApp_Label_mouseClicked(evt); + } + }); + + textFeld.setText("1234"); + + jButton1.setText("jButton1"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jTextArea2.setColumns(20); + jTextArea2.setRows(5); + jScrollPane2.setViewportView(jTextArea2); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(textFeld) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton1))) + .addGap(4, 4, 4))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(textFeld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton1)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + pack(); + }// //GEN-END:initComponents + + private void pzzApp_Label_mouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pzzApp_Label_mouseClicked + System.out.println(textFeld.getText()); + }//GEN-LAST:event_pzzApp_Label_mouseClicked + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + int startCount = 0; + int startZahl = Integer.parseInt(textFeld.getText()); + erste = new Primzahl(2); + + for (int i = 3; startCount <= 10; i++) { + if(addIfPrime(i) && i > startZahl) + startCount ++; + } + Ausgabe(startZahl); + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(pzzApp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(pzzApp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(pzzApp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(pzzApp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new pzzApp().setVisible(true); + } + }); + } + public void Ausgabe(int bigger) + { + Primzahl current = erste; + int c = 1; + String outP = ""; + while(current.next != null) + { + + if(current.Zahl() > bigger) + outP = outP + current.Zahl() + "\n"; + current = current.next; + c++; + } + System.out.println("Anzahl: " + c); + jTextArea2.setText(outP); + outP = ""; + //System.out.println("Anzahl: " + c); + } + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JTextArea jTextArea2; + private javax.swing.JTextField textFeld; + // End of variables declaration//GEN-END:variables +} +class Primzahl +{ + private int id; + public Primzahl next = null; + + + public Primzahl(int nummer) + { + this.id = nummer; + } + public void append(Primzahl p) + { + Primzahl current = this; + while(current.next != null) + { + current = current.next; + } + current.next = p; + } + public int Zahl() {return id;} +} diff --git a/Processing.js/GameOfLife/index.gdoc b/Processing.js/GameOfLife/index.gdoc new file mode 100644 index 0000000..95d3bec --- /dev/null +++ b/Processing.js/GameOfLife/index.gdoc @@ -0,0 +1 @@ +{"url": "https://docs.google.com/open?id=1QkHcl81JN7TfjVc8k7t_bcg5ovx__Q8CeU1VwwTNy6o", "doc_id": "1QkHcl81JN7TfjVc8k7t_bcg5ovx__Q8CeU1VwwTNy6o", "email": "13hannes11@gmail.com", "resource_id": "document:1QkHcl81JN7TfjVc8k7t_bcg5ovx__Q8CeU1VwwTNy6o"} \ No newline at end of file diff --git a/Processing.js/GameOfLife/main.pds b/Processing.js/GameOfLife/main.pds new file mode 100644 index 0000000..cb130de --- /dev/null +++ b/Processing.js/GameOfLife/main.pds @@ -0,0 +1,178 @@ +int minToLive = 2; +int maxToLive = 3; +int countForBirth = 3; + +int sizeX = 20; +int sizeY = 20; +int fieldSize = 10; +boolean[][] board; +boolean paused = true; + +void reInit(int w, int h, int fS){ + noLoop(); + + sizeX = w; + sizeY = h; + fieldSize = fS; + + fill(255); + text("X: " + sizeX + " | Y: " + sizeY + " || FieldSize: " + fieldSize, 20, 20) + paused = true; + setup(); + +} +void setup(){ + board = new boolean[sizeX][sizeY]; + + frameRate(10); + size(sizeX * fieldSize , sizeY * fieldSize); + + loop(); +} +void draw(){ + background(255); + + for(int x = 0; x < sizeX; x++){ + for(int y = 0; y < sizeY; y++){ + noStroke(); + if(board[x][y]) + fill(150,0,0); + else + fill(100); + rect(x*fieldSize, y* fieldSize, fieldSize, fieldSize); + + /*fill(255); + text("" + countNeighbours(x, y) + "" ,x*fieldSize, y*fieldSize + fieldSize);*/ + } + } + update(); +} + +void mouseDragged(){ + if(mousePressed){ + int x = (int)(mouseX / fieldSize); + int y = (int)(mouseY / fieldSize); + + board[x][y] = true; + } +} + +void update(){ + if(!paused){ + boolean[][] _tmp = new boolean[sizeX][sizeY]; + //arrayCopy(board,_tmp); // _tmp = board.clone(); + + for(int x = 0; x < sizeX; x++){ + for(int y = 0; y < sizeY; y++){ + int c = countNeighbours(x,y); + if(c < minToLive || c > maxToLive) + _tmp[x][y] = false; + else if(c == countForBirth || (c >= minToLive && c <= maxToLive && board[x][y])) + _tmp[x][y] = true; + } + } + + arrayCopy(_tmp, board); //board = _tmp.clone(); + //paused = true; + } +} + +// 1 2 3 +// 4 5 +// 6 7 8 +int countNeighbours(int x, int y){ + int counter = 0; + + int _x = 0; + int _y = 0; + + //N1 + if(x == 0) + _x = sizeX -1; + else + _x = x -1; + + if(y == 0) + _y = sizeY -1; + else + _y = y -1; + + if(board[_x][_y]) + counter++; + + //N2 + _x = x; + if(y == 0) + _y = sizeY -1; + else + _y = y - 1; + if(board[_x][_y]) + counter++; + //N3 + if(x == sizeX -1) + _x = 0; + else + _x = x + 1; + if(y == 0) + _y = sizeY -1; + else + _y = y -1; + if(board[_x][_y]) + counter++; + //N4 + _y = y; + if(x == 0) + _x = sizeX -1; + else + _x = x -1; + if(board[_x][_y]) + counter++; + //N5 + _y = y; + if(x == sizeX -1) + _x = 0; + else + _x = x +1; + if(board[_x][_y]) + counter++; + //N6 + if(x == 0) + _x = sizeX -1; + else + _x = x -1; + if(y == sizeY -1) + _y = 0; + else + _y = y +1; + if(board[_x][_y]) + counter++; + //N7 + _x = x; + if(y == sizeY -1) + _y = 0; + else + _y = y +1; + if(board[_x][_y]) + counter++; + //N8 + if(x == sizeX -1) + _x = 0; + else + _x = x +1; + if(y == sizeY -1) + _y = 0; + else + _y = y +1; + if(board[_x][_y]) + counter++; + return counter; +} +void pause(){ + paused = !paused; +} +void keyPressed() { + if(keyCode == ENTER) + paused = !paused; + if(keyCode == DOWN) + reInit(20,20,10); +} diff --git a/Processing.js/Snake/index.gdoc b/Processing.js/Snake/index.gdoc new file mode 100644 index 0000000..26d51ae --- /dev/null +++ b/Processing.js/Snake/index.gdoc @@ -0,0 +1 @@ +{"url": "https://docs.google.com/open?id=1RieLIrJ4LaA-H_IU0cLJ1IX50utv-LYIDgeJX7ekAGA", "doc_id": "1RieLIrJ4LaA-H_IU0cLJ1IX50utv-LYIDgeJX7ekAGA", "email": "13hannes11@gmail.com", "resource_id": "document:1RieLIrJ4LaA-H_IU0cLJ1IX50utv-LYIDgeJX7ekAGA"} \ No newline at end of file diff --git a/Processing.js/Snake/main.pds b/Processing.js/Snake/main.pds new file mode 100644 index 0000000..9456c98 --- /dev/null +++ b/Processing.js/Snake/main.pds @@ -0,0 +1,157 @@ +boolean gameOver = false; +int SizeX = 600; +int SizeY = 600; +sn snake1 = new sn(); +apple a = new apple(); + +void setup(){ + frameRate(10); + size(SizeX, SizeY); +} +void draw(){ + if(focused){ + background(0); + if(gameOver){ + if(keyPressed){ + snake1 = new sn(); + a = new apple(); + gameOver = false; + } + textSize(64); + fill(255); + text("GAME OVER!!!", 100, 180); + + textSize(32); + fill(0,0,255); + text("Score: " + (snake1.Length - 20), 220, 250); + fill(255,0,0); + text("PRESS ANY KEY TO RESTART",100, 300); + } else { + textSize(12); + fill(255); + text("Speed (Pixel per Second): " + (round(frameRate * 10)), 0, 12); + text("Score: " + (snake1.Length - 20), 0, 28); + + if(snake1.Length < 10) + frameRate(10); + else + frameRate(snake1.Length); + + snake1.Draw(); + a.Draw(); + + if(a.Collision(snake1.parts[0].X, snake1.parts[0].Y, snake1.parts[0].size)) { + snake1.parts[snake1.Length] = new Part(snake1.parts[snake1.Length -1].X, snake1.parts[snake1.Length -1].Y); + snake1.Length ++; + a = new apple(); + } + } + gameOver = snake1.Lose(); + } +} +void keyPressed(){ + snake1.keyPressed(); +} + +class apple{ + int posX; + int posY; + int size = 10; + + public apple(){ + posX = (int)random(0, (SizeX - size) / 10) * 10; + posY = (int)random(0, (SizeY - size) / 10) * 10; + } + void Draw(){ + fill(255,0,0); + rect(posX, posY, size, size); + } + + public boolean Collision(int x, int y, int s){ + if(posX == x && posY == y) { + return true; + } else { + return false; + } + } +} + +class sn{ + public int Length = 20; + public String direction = "up"; + public Part[] parts = new Part[1000]; + + public sn(){ + int rx = (int)random(0,SizeX / 10) * 10; + int ry = (int)random(0,SizeY / 10) * 10; + for(int i = 0; i < Length; i++){ + parts[i] = new Part(rx, ry); + ry += 10; + } + } + boolean move(){ + for(int i = Length - 2; i >= 0; i--){ + parts[i + 1] = parts[i]; + } + + if(direction == "up") { + parts[0] = new Part(parts[0].X, parts[0].Y - parts[0].size); + } + if(direction == "down") { + parts[0] = new Part(parts[0].X, parts[0].Y + parts[0].size); + } + if(direction == "left") { + parts[0] = new Part(parts[0].X - parts[0].size, parts[0].Y); + } + if(direction == "right") { + parts[0] = new Part(parts[0].X + parts[0].size, parts[0].Y); + } + + return true; + } + + boolean Lose(){ + //Crossing Border + if(parts[0].X < 0 || parts[0].X + parts[0].size > SizeX || parts[0].Y < 0 || parts[0].Y + parts[0].size > SizeY ){ + return true; + } + + //Snake internal collision + for(int i = 1; i < Length; i++) + if(parts[i].X == parts[0].X && parts[i].Y == parts[0].Y){ + return true; + } + return false; + } + void Draw(){ + fill(255); + for (int i = Length - 1; i >= 0; i--) { + parts[i].Draw(); + println(i + " | " + parts[i].X + " | " + parts[i].Y); + } + move(); + } + void keyPressed(){ + if(keyCode == DOWN && direction != "up") + direction = "down"; + if(keyCode == UP && direction != "down") + direction = "up"; + if(keyCode == LEFT && direction != "right") + direction = "left"; + if(keyCode == RIGHT && direction != "left") + direction = "right"; + } +} +class Part{ + public int size = 10; + public int X; + public int Y; + + public Part(int x, int y){ + X = x; + Y = y; + } + void Draw(){ + rect(X, Y, size, size); + } +} \ No newline at end of file diff --git a/Processing.js/js/processing.js b/Processing.js/js/processing.js new file mode 100644 index 0000000..ea38cb9 --- /dev/null +++ b/Processing.js/js/processing.js @@ -0,0 +1,431 @@ +(function e$$0(x,Q,k){function h(a,b){if(!Q[a]){if(!x[a]){var d="function"==typeof require&&require;if(!b&&d)return d(a,!0);if(m)return m(a,!0);throw Error("Cannot find module '"+a+"'");}d=Q[a]={exports:{}};x[a][0].call(d.exports,function(f){var b=x[a][1][f];return h(b?b:f)},d,d.exports,e$$0,x,Q,k)}return Q[a].exports}for(var m="function"==typeof require&&require,n=0;nr.$methodArgsIndex?r.$overloads[r.$methodArgsIndex]:null)||r.$defaultOverload).apply(this,arguments)};r.$overloads=p;"$methodArgsIndex"in f&&(r.$methodArgsIndex= +f.$methodArgsIndex);r.$defaultOverload=l;r.name=d;a[d]=r}}else a[d]=f}function n(b,d){function f(f){a.defineProperty(b,f,{get:function(){return d[f]},set:function(c){d[f]=c},enumerable:!0})}var l=[],p;for(p in d)"function"===typeof d[p]?m(b,p,d[p]):"$"===p.charAt(0)||p in b||l.push(p);for(;0 +c.$methodArgsIndex?c.$overloads[c.$methodArgsIndex]:null)||c.$defaultOverload).apply(this,arguments)},h=[];p&&(h[p.length]=p);h[r]=f;c.$overloads=h;c.$defaultOverload=p||f;l&&(c.$methodArgsIndex=r);c.name=d;a[d]=c}}else a[d]=f};a.createJavaArray=function(b,d){var f=null,l=null;if("string"===typeof b)if("boolean"===b)l=!1;else{var p;p="string"!==typeof b?!1:-1!=="byte int char color float long double".split(" ").indexOf(b);p&&(l=0)}if("number"===typeof d[0])if(p=0|d[0],1>=d.length){f=[];f.length=p; +for(var r=0;r "+b);if(v===h)if(0===p.length)try{return new k(f,l.join("\n"))}catch(md){throw console.log("Processing.js: Unable to execute pjs sketch."),md;}else throw"Processing.js: Unable to load pjs sketch files: "+p.join("\n");}if("#"===a.charAt(0)){var ca=n.getElementById(a.substring(1));ca?m(ca.text||ca.textContent):m("","Unable to load pjs sketch: element with id '"+ +a.substring(1)+"' was not found")}else d(a,m)}for(var l=[],p=[],h=c.length,v=0,ga=0;gaa||a>b.length)throw"Index out of bounds for addAll: "+a+" greater or equal than "+b.length;for(l=new ObjectIterator(f);l.hasNext();)b.splice(a++,0,l.next())}else for(l=new ObjectIterator(a);l.hasNext();)b.push(l.next())};this.set=function(){if(2===arguments.length){var a= +arguments[0];if("number"===typeof a)if(0<=a&&af?c.length+f:f}function b(){if(!(k<=r*c.length)){for(var f=[],b=0;b=c.length)p= +!0;else if(void 0===c[d]||l>=c[d].length)l=-1,++d;else break}var d=0,l=-1,p=!1,r;this.hasNext=function(){return!p};this.next=function(){r=f(c[d][l]);b();return r};this.remove=function(){void 0!==r&&(a(r),--l,b())};b()}function f(c,f,a){this.clear=function(){ca.clear()};this.contains=function(c){return f(c)};this.containsAll=function(c){for(c=c.iterator();c.hasNext();)if(!this.contains(c.next()))return!1;return!0};this.isEmpty=function(){return ca.isEmpty()};this.iterator=function(){return new d(c, +a)};this.remove=function(c){return this.contains(c)?(a(c),!0):!1};this.removeAll=function(c){for(c=c.iterator();c.hasNext();){var f=c.next();this.contains(f)&&a(f)}return!0};this.retainAll=function(c){for(var f=this.iterator(),b=[];f.hasNext();){var d=f.next();c.contains(d)||b.push(d)}for(c=0;cdbflkhyjqpg";n.body.appendChild(p);var c=l.width,k=l.height,l=k/2;r.fillStyle="white";r.fillRect(0,0,c,k);r.fillStyle="black";r.fillText("dbflkhyjqpg",0,l);for(var k=r.getImageData(0,0,c,k).data,m=0,G=4*c,A=k.length;++m=2*this.size&&(this.leading=Math.round(l/2)));n.body.removeChild(p);f=this.caching?r:void 0;this.context2d=f;this.css=this.getCSSDefinition();this.context2d&&(this.context2d.font=this.css)}var n=k.Browser.document,a=k.noop;m.prototype.caching=!0;m.prototype.getCSSDefinition=function(a,d){a===h&&(a=this.size+"px");d===h&&(d=this.leading+"px");return[this.style,"normal", +this.weight,a+"/"+d,this.family].join(" ")};m.prototype.measureTextWidth=function(a){return this.context2d.measureText(a).width};m.prototype.measureTextWidthFallback=function(a){var d=n.createElement("canvas").getContext("2d");d.font=this.css;return d.measureText(a).width};m.PFontCache={length:0};m.get=function(a,d){d=(10*d+0.5|0)/10;var f=m.PFontCache,l=a+"/"+d;if(!f[l]){f[l]=new m(a,d);f.length++;if(50===f.length){m.prototype.measureTextWidth=m.prototype.measureTextWidthFallback;m.prototype.caching= +!1;for(var p in f)"length"!==p&&(f[p].context2d=null);return new m(a,d)}if(400===f.length)return m.PFontCache={},m.get=m.getFallback,new m(a,d)}return f[l]};m.getFallback=function(a,d){return new m(a,d)};m.list=function(){return["sans-serif","serif","monospace","fantasy","cursive"]};m.preloading={template:{},initialized:!1,initialize:function(){var a=n.createElement("style");a.setAttribute("type","text/css");a.innerHTML='@font-face {\n font-family: "PjsEmptyFont";\n src: url(\'data:application/x-font-ttf;base64,'+ +function(){return"#E3KAI2wAgT1MvMg7Eo3VmNtYX7ABi3CxnbHlm7Abw3kaGVhZ7ACs3OGhoZWE7A53CRobXR47AY3AGbG9jYQ7G03Bm1heH7ABC3CBuYW1l7Ae3AgcG9zd7AI3AE#B3AQ2kgTY18PPPUACwAg3ALSRoo3#yld0xg32QAB77#E777773B#E3C#I#Q77773E#Q7777777772CMAIw7AB77732B#M#Q3wAB#g3B#E#E2BB//82BB////w#B7#gAEg3E77x2B32B#E#Q#MTcBAQ32gAe#M#QQJ#E32M#QQJ#I#g32Q77#".replace(/[#237]/g,function(a){return"AAAAAAAA".substr(~~a?7-a:6)})}()+"')\n format('truetype');\n}";n.head.appendChild(a);a=n.createElement("span");a.style.cssText='position: absolute; top: 0; left: 0; opacity: 0; font-family: "PjsEmptyFont", fantasy;'; +a.innerHTML="AAAAAAAA";n.body.appendChild(a);this.template=a;this.initialized=!0},getElementWidth:function(a){return n.defaultView.getComputedStyle(a,"").getPropertyValue("width")},timeAttempted:0,pending:function(a){this.initialized||this.initialize();for(var d,f,l=this.getElementWidth(this.template),p=0;pthis.timeAttempted&&f===l)return this.timeAttempted+=a,!0;n.body.removeChild(d);this.fontList.splice(p--,1);this.timeAttempted= +0}return 0===this.fontList.length?!1:!0},fontList:[],addedList:{},add:function(a){this.initialized||this.initialize();var d="object"===typeof a?a.fontFace:a;a="object"===typeof a?a.url:a;if(!this.addedList[d]){var f=n.createElement("style");f.setAttribute("type","text/css");f.innerHTML="@font-face{\n font-family: '"+d+"';\n src: url('"+a+"');\n}\n";n.head.appendChild(f);this.addedList[d]=!0;a=n.createElement("span");a.style.cssText="position: absolute; top: 0; left: 0; opacity: 0;";a.style.fontFamily= +'"'+d+'", "PjsEmptyFont", fantasy';a.innerHTML="AAAAAAAA";n.body.appendChild(a);this.fontList.push(a)}}};return m}},{}],13:[function(D,x,Q){x.exports=function(k,h){var m=k.p,n=function(){0===arguments.length?this.reset():1===arguments.length&&arguments[0]instanceof n?this.set(arguments[0].array()):6===arguments.length&&this.set(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])};n.prototype={set:function(){if(6===arguments.length){var a=arguments;this.set([a[0],a[1],a[2], +a[3],a[4],a[5]])}else 1===arguments.length&&arguments[0]instanceof n?this.elements=arguments[0].array():1===arguments.length&&arguments[0]instanceof Array&&(this.elements=arguments[0].slice())},get:function(){var a=new n;a.set(this.elements);return a},reset:function(){this.set([1,0,0,0,1,0])},array:function(){return this.elements.slice()},translate:function(a,b){this.elements[2]=a*this.elements[0]+b*this.elements[1]+this.elements[2];this.elements[5]=a*this.elements[3]+b*this.elements[4]+this.elements[5]}, +invTranslate:function(a,b){this.translate(-a,-b)},transpose:function(){},mult:function(a,b){var d,f;a instanceof PVector?(d=a.x,f=a.y,b||(b=new PVector)):a instanceof Array&&(d=a[0],f=a[1],b||(b=[]));b instanceof Array?(b[0]=this.elements[0]*d+this.elements[1]*f+this.elements[2],b[1]=this.elements[3]*d+this.elements[4]*f+this.elements[5]):b instanceof PVector&&(b.x=this.elements[0]*d+this.elements[1]*f+this.elements[2],b.y=this.elements[3]*d+this.elements[4]*f+this.elements[5],b.z=0);return b},multX:function(a, +b){return a*this.elements[0]+b*this.elements[1]+this.elements[2]},multY:function(a,b){return a*this.elements[3]+b*this.elements[4]+this.elements[5]},skewX:function(a){this.apply(1,0,1,a,0,0)},skewY:function(a){this.apply(1,0,1,0,a,0)},shearX:function(a){this.apply(1,0,1,Math.tan(a),0,0)},shearY:function(a){this.apply(1,0,1,0,Math.tan(a),0)},determinant:function(){return this.elements[0]*this.elements[4]-this.elements[1]*this.elements[3]},invert:function(){var a=this.determinant();if(Math.abs(a)>PConstants.MIN_INT){var b= +this.elements[0],d=this.elements[1],f=this.elements[2],l=this.elements[3],p=this.elements[4],r=this.elements[5];this.elements[0]=p/a;this.elements[3]=-l/a;this.elements[1]=-d/a;this.elements[4]=b/a;this.elements[2]=(d*r-p*f)/a;this.elements[5]=(l*f-b*r)/a;return!0}return!1},scale:function(a,b){a&&!b&&(b=a);a&&b&&(this.elements[0]*=a,this.elements[1]*=b,this.elements[3]*=a,this.elements[4]*=b)},invScale:function(a,b){a&&!b&&(b=a);this.scale(1/a,1/b)},apply:function(){var a;1===arguments.length&&arguments[0]instanceof +n?a=arguments[0].array():6===arguments.length?a=Array.prototype.slice.call(arguments):1===arguments.length&&arguments[0]instanceof Array&&(a=arguments[0]);for(var b=[0,0,this.elements[2],0,0,this.elements[5]],d=0,f=0;2>f;f++)for(var l=0;3>l;l++,d++)b[d]+=this.elements[3*f+0]*a[l+0]+this.elements[3*f+1]*a[l+3];this.elements=b.slice()},preApply:function(){var a;1===arguments.length&&arguments[0]instanceof n?a=arguments[0].array():6===arguments.length?a=Array.prototype.slice.call(arguments):1===arguments.length&& +arguments[0]instanceof Array&&(a=arguments[0]);var b=[0,0,a[2],0,0,a[5]];b[2]=a[2]+this.elements[2]*a[0]+this.elements[5]*a[1];b[5]=a[5]+this.elements[2]*a[3]+this.elements[5]*a[4];b[0]=this.elements[0]*a[0]+this.elements[3]*a[1];b[3]=this.elements[0]*a[3]+this.elements[3]*a[4];b[1]=this.elements[1]*a[0]+this.elements[4]*a[1];b[4]=this.elements[1]*a[3]+this.elements[4]*a[4];this.elements=b.slice()},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var d=this.elements[0],f=this.elements[1];this.elements[0]= +b*d+a*f;this.elements[1]=-a*d+b*f;d=this.elements[3];f=this.elements[4];this.elements[3]=b*d+a*f;this.elements[4]=-a*d+b*f},rotateZ:function(a){this.rotate(a)},invRotateZ:function(a){this.rotateZ(a-Math.PI)},print:function(){var a=printMatrixHelper(this.elements),a=""+m.nfs(this.elements[0],a,4)+" "+m.nfs(this.elements[1],a,4)+" "+m.nfs(this.elements[2],a,4)+"\n"+m.nfs(this.elements[3],a,4)+" "+m.nfs(this.elements[4],a,4)+" "+m.nfs(this.elements[5],a,4)+"\n\n";m.println(a)}};return n}},{}],14:[function(D, +x,Q){x.exports=function(k,h){var m=k.p,n=function(){this.reset()};n.prototype={set:function(){16===arguments.length?this.elements=Array.prototype.slice.call(arguments):1===arguments.length&&arguments[0]instanceof n?this.elements=arguments[0].array():1===arguments.length&&arguments[0]instanceof Array&&(this.elements=arguments[0].slice())},get:function(){var a=new n;a.set(this.elements);return a},reset:function(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},array:function(){return this.elements.slice()}, +translate:function(a,b,d){d===h&&(d=0);this.elements[3]+=a*this.elements[0]+b*this.elements[1]+d*this.elements[2];this.elements[7]+=a*this.elements[4]+b*this.elements[5]+d*this.elements[6];this.elements[11]+=a*this.elements[8]+b*this.elements[9]+d*this.elements[10];this.elements[15]+=a*this.elements[12]+b*this.elements[13]+d*this.elements[14]},transpose:function(){var a=this.elements[4];this.elements[4]=this.elements[1];this.elements[1]=a;a=this.elements[8];this.elements[8]=this.elements[2];this.elements[2]= +a;a=this.elements[6];this.elements[6]=this.elements[9];this.elements[9]=a;a=this.elements[3];this.elements[3]=this.elements[12];this.elements[12]=a;a=this.elements[7];this.elements[7]=this.elements[13];this.elements[13]=a;a=this.elements[11];this.elements[11]=this.elements[14];this.elements[14]=a},mult:function(a,b){var d,f,l,p;a instanceof PVector?(d=a.x,f=a.y,l=a.z,p=1,b||(b=new PVector)):a instanceof Array&&(d=a[0],f=a[1],l=a[2],p=a[3]||1,!b||3!==b.length&&4!==b.length)&&(b=[0,0,0]);b instanceof +Array&&(3===b.length?(b[0]=this.elements[0]*d+this.elements[1]*f+this.elements[2]*l+this.elements[3],b[1]=this.elements[4]*d+this.elements[5]*f+this.elements[6]*l+this.elements[7],b[2]=this.elements[8]*d+this.elements[9]*f+this.elements[10]*l+this.elements[11]):4===b.length&&(b[0]=this.elements[0]*d+this.elements[1]*f+this.elements[2]*l+this.elements[3]*p,b[1]=this.elements[4]*d+this.elements[5]*f+this.elements[6]*l+this.elements[7]*p,b[2]=this.elements[8]*d+this.elements[9]*f+this.elements[10]*l+ +this.elements[11]*p,b[3]=this.elements[12]*d+this.elements[13]*f+this.elements[14]*l+this.elements[15]*p));b instanceof PVector&&(b.x=this.elements[0]*d+this.elements[1]*f+this.elements[2]*l+this.elements[3],b.y=this.elements[4]*d+this.elements[5]*f+this.elements[6]*l+this.elements[7],b.z=this.elements[8]*d+this.elements[9]*f+this.elements[10]*l+this.elements[11]);return b},preApply:function(){var a;1===arguments.length&&arguments[0]instanceof n?a=arguments[0].array():16===arguments.length?a=Array.prototype.slice.call(arguments): +1===arguments.length&&arguments[0]instanceof Array&&(a=arguments[0]);for(var b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],d=0,f=0;4>f;f++)for(var l=0;4>l;l++,d++)b[d]+=this.elements[l+0]*a[4*f+0]+this.elements[l+4]*a[4*f+1]+this.elements[l+8]*a[4*f+2]+this.elements[l+12]*a[4*f+3];this.elements=b.slice()},apply:function(){var a;1===arguments.length&&arguments[0]instanceof n?a=arguments[0].array():16===arguments.length?a=Array.prototype.slice.call(arguments):1===arguments.length&&arguments[0]instanceof Array&& +(a=arguments[0]);for(var b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],d=0,f=0;4>f;f++)for(var l=0;4>l;l++,d++)b[d]+=this.elements[4*f+0]*a[l+0]+this.elements[4*f+1]*a[l+4]+this.elements[4*f+2]*a[l+8]+this.elements[4*f+3]*a[l+12];this.elements=b.slice()},rotate:function(a,b,d,f){if(d){var l=Math.cos(a);a=Math.sin(a);var p=1-l;this.apply(p*b*b+l,p*b*d-a*f,p*b*f+a*d,0,p*b*d+a*f,p*d*d+l,p*d*f-a*b,0,p*b*f-a*d,p*d*f+a*b,p*f*f+l,0,0,0,0,1)}else this.rotateZ(a)},invApply:function(){inverseCopy===h&&(inverseCopy=new n); +var a=arguments;inverseCopy.set(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]);if(!inverseCopy.invert())return!1;this.preApply(inverseCopy);return!0},rotateX:function(a){var b=Math.cos(a);a=Math.sin(a);this.apply([1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1])},rotateY:function(a){var b=Math.cos(a);a=Math.sin(a);this.apply([b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1])},rotateZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.apply([b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1])},scale:function(a, +b,d){!a||b||d?a&&(b&&!d)&&(d=1):b=d=a;a&&(b&&d)&&(this.elements[0]*=a,this.elements[1]*=b,this.elements[2]*=d,this.elements[4]*=a,this.elements[5]*=b,this.elements[6]*=d,this.elements[8]*=a,this.elements[9]*=b,this.elements[10]*=d,this.elements[12]*=a,this.elements[13]*=b,this.elements[14]*=d)},skewX:function(a){a=Math.tan(a);this.apply(1,a,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},skewY:function(a){a=Math.tan(a);this.apply(1,0,0,0,a,1,0,0,0,0,1,0,0,0,0,1)},shearX:function(a){a=Math.tan(a);this.apply(1,a,0,0, +0,1,0,0,0,0,1,0,0,0,0,1)},shearY:function(a){a=Math.tan(a);this.apply(1,0,0,0,a,1,0,0,0,0,1,0,0,0,0,1)},multX:function(a,b,d,f){return d?f?this.elements[0]*a+this.elements[1]*b+this.elements[2]*d+this.elements[3]*f:this.elements[0]*a+this.elements[1]*b+this.elements[2]*d+this.elements[3]:this.elements[0]*a+this.elements[1]*b+this.elements[3]},multY:function(a,b,d,f){return d?f?this.elements[4]*a+this.elements[5]*b+this.elements[6]*d+this.elements[7]*f:this.elements[4]*a+this.elements[5]*b+this.elements[6]* +d+this.elements[7]:this.elements[4]*a+this.elements[5]*b+this.elements[7]},multZ:function(a,b,d,f){return f?this.elements[8]*a+this.elements[9]*b+this.elements[10]*d+this.elements[11]*f:this.elements[8]*a+this.elements[9]*b+this.elements[10]*d+this.elements[11]},multW:function(a,b,d,f){return f?this.elements[12]*a+this.elements[13]*b+this.elements[14]*d+this.elements[15]*f:this.elements[12]*a+this.elements[13]*b+this.elements[14]*d+this.elements[15]},invert:function(){var a=this.elements[0]*this.elements[5]- +this.elements[1]*this.elements[4],b=this.elements[0]*this.elements[6]-this.elements[2]*this.elements[4],d=this.elements[0]*this.elements[7]-this.elements[3]*this.elements[4],f=this.elements[1]*this.elements[6]-this.elements[2]*this.elements[5],l=this.elements[1]*this.elements[7]-this.elements[3]*this.elements[5],p=this.elements[2]*this.elements[7]-this.elements[3]*this.elements[6],r=this.elements[8]*this.elements[13]-this.elements[9]*this.elements[12],c=this.elements[8]*this.elements[14]-this.elements[10]* +this.elements[12],h=this.elements[8]*this.elements[15]-this.elements[11]*this.elements[12],k=this.elements[9]*this.elements[14]-this.elements[10]*this.elements[13],m=this.elements[9]*this.elements[15]-this.elements[11]*this.elements[13],n=this.elements[10]*this.elements[15]-this.elements[11]*this.elements[14],x=a*n-b*m+d*k+f*h-l*c+p*r;if(1E-9>=Math.abs(x))return!1;var v=[];v[0]=+this.elements[5]*n-this.elements[6]*m+this.elements[7]*k;v[4]=-this.elements[4]*n+this.elements[6]*h-this.elements[7]*c; +v[8]=+this.elements[4]*m-this.elements[5]*h+this.elements[7]*r;v[12]=-this.elements[4]*k+this.elements[5]*c-this.elements[6]*r;v[1]=-this.elements[1]*n+this.elements[2]*m-this.elements[3]*k;v[5]=+this.elements[0]*n-this.elements[2]*h+this.elements[3]*c;v[9]=-this.elements[0]*m+this.elements[1]*h-this.elements[3]*r;v[13]=+this.elements[0]*k-this.elements[1]*c+this.elements[2]*r;v[2]=+this.elements[13]*p-this.elements[14]*l+this.elements[15]*f;v[6]=-this.elements[12]*p+this.elements[14]*d-this.elements[15]* +b;v[10]=+this.elements[12]*l-this.elements[13]*d+this.elements[15]*a;v[14]=-this.elements[12]*f+this.elements[13]*b-this.elements[14]*a;v[3]=-this.elements[9]*p+this.elements[10]*l-this.elements[11]*f;v[7]=+this.elements[8]*p-this.elements[10]*d+this.elements[11]*b;v[11]=-this.elements[8]*l+this.elements[9]*d-this.elements[11]*a;v[15]=+this.elements[8]*f-this.elements[9]*b+this.elements[10]*a;a=1/x;v[0]*=a;v[1]*=a;v[2]*=a;v[3]*=a;v[4]*=a;v[5]*=a;v[6]*=a;v[7]*=a;v[8]*=a;v[9]*=a;v[10]*=a;v[11]*=a;v[12]*= +a;v[13]*=a;v[14]*=a;v[15]*=a;this.elements=v.slice();return!0},toString:function(){for(var a="",b=0;15>b;b++)a+=this.elements[b]+", ";return a+=this.elements[15]},print:function(){var a=printMatrixHelper(this.elements),a=""+m.nfs(this.elements[0],a,4)+" "+m.nfs(this.elements[1],a,4)+" "+m.nfs(this.elements[2],a,4)+" "+m.nfs(this.elements[3],a,4)+"\n"+m.nfs(this.elements[4],a,4)+" "+m.nfs(this.elements[5],a,4)+" "+m.nfs(this.elements[6],a,4)+" "+m.nfs(this.elements[7],a,4)+"\n"+m.nfs(this.elements[8], +a,4)+" "+m.nfs(this.elements[9],a,4)+" "+m.nfs(this.elements[10],a,4)+" "+m.nfs(this.elements[11],a,4)+"\n"+m.nfs(this.elements[12],a,4)+" "+m.nfs(this.elements[13],a,4)+" "+m.nfs(this.elements[14],a,4)+" "+m.nfs(this.elements[15],a,4)+"\n\n";m.println(a)},invTranslate:function(a,b,d){this.preApply(1,0,0,-a,0,1,0,-b,0,0,1,-d,0,0,0,1)},invRotateX:function(a){var b=Math.cos(-a);a=Math.sin(-a);this.preApply([1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1])},invRotateY:function(a){var b=Math.cos(-a);a=Math.sin(-a); +this.preApply([b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1])},invRotateZ:function(a){var b=Math.cos(-a);a=Math.sin(-a);this.preApply([b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1])},invScale:function(a,b,d){this.preApply([1/a,0,0,0,0,1/b,0,0,0,0,1/d,0,0,0,0,1])}};return n}},{}],15:[function(D,x,Q){x.exports=function(k){var h=k.PConstants,m=k.PMatrix2D,n=k.PMatrix3D;k=function(a){this.family=a||h.GROUP;this.style=this.visible=!0;this.children=[];this.nameTable=[];this.params=[];this.name="";this.parent=this.height=this.width= +this.close=this.kind=this.matrix=this.image=null};k.prototype={isVisible:function(){return this.visible},setVisible:function(a){this.visible=a},disableStyle:function(){this.style=!1;for(var a=0,b=this.children.length;a, it's <"+this.element.getName()+">";}else 2===arguments.length&&("string"===typeof arguments[1]?-1 tag of this file.";this.parseColors(this.element);this.parseChildren(this.element)};d.prototype=new n;d.prototype.parseMatrix=function(){function f(f){var a=[];f.replace(/\((.*?)\)/,function(){return function(f,c){a=c.replace(/,+/g," ").split(/\s+/)}}()); +return a}return function(a){this.checkMatrix(2);var b=[];a.replace(/\s*(\w+)\((.*?)\)/g,function(c){b.push(h.trim(c))});if(0===b.length)return null;a=0;for(var d=b.length;a=v||97<=v&&122>=v){u=x;x++;if(x=v||97<=v&&100>=v||102<=v&&122>=v)&&!1===D;)32===v?""!==ga&&(q.push(parseFloat(ga)),ga=""):45===v?101===f[x-1].charCodeAt(0)?ga+=f[x].toString():(""!== +ga&&q.push(parseFloat(ga)),ga=f[x].toString()):ga+=f[x].toString(),x++,x===f.length?D=!0:v=f[x].charCodeAt(0);""!==ga&&(q.push(parseFloat(ga)),ga="");nc=f[u];v=nc.charCodeAt(0);if(77===v){if(2<=q.length&&0===q.length%2&&(a=q[0],b=q[1],this.parsePathMoveto(a,b),2this.params[2]||0>this.params[3])throw"svg error: negative width or height found while parsing ";};d.prototype.parseEllipse=function(a){this.kind=m.ELLIPSE;this.family=m.PRIMITIVE;this.params=[];this.params[0]=this.element.getFloatAttribute("cx")|0;this.params[1]=this.element.getFloatAttribute("cy")|0;var b;if(a){if(a=b=this.element.getFloatAttribute("r"), +0>a)throw"svg error: negative radius found while parsing ";}else if(a=this.element.getFloatAttribute("rx"),b=this.element.getFloatAttribute("ry"),0>a||0>b)throw"svg error: negative x-axis radius or y-axis radius found while parsing ";this.params[0]-=a;this.params[1]-=b;this.params[2]=2*a;this.params[3]=2*b};d.prototype.parseLine=function(){this.kind=m.LINE;this.family=m.PRIMITIVE;this.params=[];this.params[0]=this.element.getFloatAttribute("x1");this.params[1]=this.element.getFloatAttribute("y1"); +this.params[2]=this.element.getFloatAttribute("x2");this.params[3]=this.element.getFloatAttribute("y2")};d.prototype.parseColors=function(a){a.hasAttribute("opacity")&&this.setOpacity(a.getAttribute("opacity"));a.hasAttribute("stroke")&&this.setStroke(a.getAttribute("stroke"));a.hasAttribute("stroke-width")&&this.setStrokeWeight(a.getAttribute("stroke-width"));a.hasAttribute("stroke-linejoin")&&this.setStrokeJoin(a.getAttribute("stroke-linejoin"));a.hasAttribute("stroke-linecap")&&this.setStrokeCap(a.getStringAttribute("stroke-linecap")); +a.hasAttribute("fill")&&this.setFill(a.getStringAttribute("fill"));if(a.hasAttribute("style")){a=a.getStringAttribute("style").toString().split(";");for(var b=0,d=a.length;bb?a:a.indexOf("pt")===b?1.25*parseFloat(a.substring(0,b)):a.indexOf("pc")=== +b?15*parseFloat(a.substring(0,b)):a.indexOf("mm")===b?3.543307*parseFloat(a.substring(0,b)):a.indexOf("cm")===b?35.43307*parseFloat(a.substring(0,b)):a.indexOf("in")===b?90*parseFloat(a.substring(0,b)):a.indexOf("px")===b?parseFloat(a.substring(0,b)):parseFloat(a)};return d}},{}],17:[function(D,x,Q){x.exports=function(k,h){function m(a,b,l){this.x=a||0;this.y=b||0;this.z=l||0}function n(a){return function(b,l){var p=b.get();p[a](l);return p}}var a=k.PConstants;m.fromAngle=function(a,b){if(b===h|| +null===b)b=new m;b.x=Math.cos(a);b.y=Math.sin(a);return b};m.random2D=function(b){return m.fromAngle(Math.random()*a.TWO_PI,b)};m.random3D=function(b){var f=Math.random()*a.TWO_PI,l=2*Math.random()-1,p=Math.sqrt(1-l*l),r=p*Math.cos(f),f=p*Math.sin(f);b===h||null===b?b=new m(r,f,l):b.set(r,f,l);return b};m.dist=function(a,b){return a.dist(b)};m.dot=function(a,b){return a.dot(b)};m.cross=function(a,b){return a.cross(b)};m.sub=function(a,b){return new m(a.x-b.x,a.y-b.y,a.z-b.z)};m.angleBetween=function(a, +b){return Math.acos(a.dot(b)/(a.mag()*b.mag()))};m.lerp=function(a,b,l){a=new m(a.x,a.y,a.z);a.lerp(b,l);return a};m.prototype={set:function(a,b,l){1===arguments.length?this.set(a.x||a[0]||0,a.y||a[1]||0,a.z||a[2]||0):(this.x=a,this.y=b,this.z=l)},get:function(){return new m(this.x,this.y,this.z)},mag:function(){var a=this.x,b=this.y,l=this.z;return Math.sqrt(a*a+b*b+l*l)},magSq:function(){var a=this.x,b=this.y,l=this.z;return a*a+b*b+l*l},setMag:function(a,b){if(b===h)b=a,this.normalize(),this.mult(b); +else return a.normalize(),a.mult(b),a},add:function(a,b,l){1===arguments.length?(this.x+=a.x,this.y+=a.y,this.z+=a.z):(this.x+=a,this.y+=b,this.z+=l)},sub:function(a,b,l){1===arguments.length?(this.x-=a.x,this.y-=a.y,this.z-=a.z):(this.x-=a,this.y-=b,this.z-=l)},mult:function(a){"number"===typeof a?(this.x*=a,this.y*=a,this.z*=a):(this.x*=a.x,this.y*=a.y,this.z*=a.z)},div:function(a){"number"===typeof a?(this.x/=a,this.y/=a,this.z/=a):(this.x/=a.x,this.y/=a.y,this.z/=a.z)},rotate:function(a){var b= +this.x,l=Math.cos(a);a=Math.sin(a);this.x=l*this.x-a*this.y;this.y=a*b+l*this.y},dist:function(a){var b=this.x-a.x,l=this.y-a.y;a=this.z-a.z;return Math.sqrt(b*b+l*l+a*a)},dot:function(a,b,l){return 1===arguments.length?this.x*a.x+this.y*a.y+this.z*a.z:this.x*a+this.y*b+this.z*l},cross:function(a){var b=this.x,l=this.y,p=this.z;return new m(l*a.z-a.y*p,p*a.x-a.z*b,b*a.y-a.x*l)},lerp:function(a,b,l,p){var r,c;2===arguments.length?(p=b,r=a.x,c=a.y,l=a.z):(r=a,c=b);this.x+=(r-this.x)*p;this.y+=(c-this.y)* +p;this.z+=(l-this.z)*p},normalize:function(){var a=this.mag();0a&&(this.normalize(),this.mult(a))},heading:function(){return-Math.atan2(-this.y,this.x)},heading2D:function(){return this.heading()},toString:function(){return"["+this.x+", "+this.y+", "+this.z+"]"},array:function(){return[this.x,this.y,this.z]}};for(var b in m.prototype)m.prototype.hasOwnProperty(b)&&!m.hasOwnProperty(b)&&(m[b]=n(b));return m}},{}],18:[function(D,x,Q){x.exports=function(){var k= +function(h,k,n,a,b){this.fullName=h||"";this.name=k||"";this.namespace=n||"";this.value=a;this.type=b};k.prototype={getName:function(){return this.name},getFullName:function(){return this.fullName},getNamespace:function(){return this.namespace},getValue:function(){return this.value},getType:function(){return this.type},setValue:function(h){this.value=h}};return k}},{}],19:[function(D,x,Q){x.exports=function(k,h){var m=k.Browser,n=m.ajax,a=m.window.DOMParser,b=k.XMLAttribute,d=function(a,b,d,r){this.attributes= +[];this.children=[];this.name=this.fullName=null;this.namespace="";this.parent=this.content=null;this.systemID=this.lineNr="";this.type="ELEMENT";a&&("string"===typeof a?b===h&&-1":">","'":"'",'"':"""},r;for(r in d)Object.hasOwnProperty(d, +r)||(a=a.replace(RegExp(r,"g"),d[r]));b.cdata=a;return b},hasAttribute:function(){if(1===arguments.length)return null!==this.getAttribute(arguments[0]);if(2===arguments.length)return null!==this.getAttribute(arguments[0],arguments[1])},equals:function(a){if(!(a instanceof d))return!1;var b,p;if(this.fullName!==a.fullName||this.attributes.length!==a.getAttributeCount()||this.attributes.length!==a.attributes.length)return!1;var r,c;b=0;for(p=this.attributes.length;ba&&this.children.splice(a,1)},findAttribute:function(a,b){this.namespace=b||"";for(var d=0,r=this.attributes.length;da?arguments[0]:arguments[0].substring(a+1);this.fullName=arguments[0];this.namespace=arguments[1]}},getName:function(){return this.fullName},getLocalName:function(){return this.name},getAttributeCount:function(){return this.attributes.length},toString:function(){if("TEXT"===this.type)return this.content; +if("CDATA"===this.type)return this.cdata;var a=this.fullName,b="<"+a,d;for(d=0;d":b+(">"+this.content+"");else{b+=">";for(d=0;d"}return b}};d.parse=function(a){var b=new d;b.parse(a);return b};return d}},{}],20:[function(D,x,Q){x.exports={aliceblue:"#f0f8ff",antiquewhite:"#faebd7", +aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f", +darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0", +hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32", +linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6", +palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4", +tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},{}],21:[function(D,x,Q){x.exports=function(k,h,m){return function(n,a){n.__contains=function(b,d){return"string"!==typeof b?b.contains.apply(b,a(arguments)):null!==b&&null!==d&&"string"===typeof d&&-1h)return b;var k=0,r="";do r+=b.substring(k,h)+f,k=h+d.length;while(0<=(h=b.indexOf(d,k)));return r+b.substring(k)};n.__equals=function(b, +d){return b.equals instanceof Function?b.equals.apply(b,a(arguments)):h(b,d)};n.__equalsIgnoreCase=function(b,d){return"string"!==typeof b?b.equalsIgnoreCase.apply(b,a(arguments)):b.toLowerCase()===d.toLowerCase()};n.__toCharArray=function(b){if("string"!==typeof b)return b.toCharArray.apply(b,a(arguments));for(var d=[],f=0,h=b.length;ff)return b.split(h); +for(var k=[],r=b,c;-1!==(c=r.search(h))&&k.length=f?(h=a.charCodeAt(d+1),1024*(f-55296)+(h-56320)+65536):f};n.__matches=function(a,d){return RegExp(d).test(a)};n.__startsWith=function(b,d,f){if("string"!==typeof b)return b.startsWith.apply(b,a(arguments));f=f||0;return 0>f||f>b.length?!1:""===d||d===b? +!0:b.indexOf(d)===f};n.__endsWith=function(b,d){if("string"!==typeof b)return b.endsWith.apply(b,a(arguments));var f=d?d.length:0;return""===d||d===b?!0:b.indexOf(d)===b.length-f};n.__hashCode=function(b){return b.hashCode instanceof Function?b.hashCode.apply(b,a(arguments)):k(b)};n.__printStackTrace=function(a){n.println("Exception: "+a.toString())}}}},{}],22:[function(D,x,Q){x.exports=function(k,h){function m(a,b){var c=a||362436069,d=b||521288629,f=function(){c=36969*(c&65535)+(c>>>16)&4294967295; +d=18E3*(d&65535)+(d>>>16)&4294967295;return((c&65535)<<16|d&65535)&4294967295};this.doubleGenerator=function(){var a=f()/4294967296;return 0>a?1+a:a};this.intGenerator=f}function n(a){function b(a,c,d,f){a&=15;var r=8>a?c:d;c=4>a?d:12===a||14===a?c:f;return(0===(a&1)?r:-r)+(0===(a&2)?c:-c)}function c(a,b,c){b=0===(a&1)?b:c;return 0===(a&2)?-b:b}function d(a,b,c){return b+a*(c-b)}a=a!==h?new m(a):m.createRandomized();var f,k,l=new Uint8Array(512);for(f=0;256>f;++f)l[f]=f;for(f=0;256>f;++f){var n=l[k= +a.intGenerator()&255];l[k]=l[f];l[f]=n}for(f=0;256>f;++f)l[f+256]=l[f];this.noise3d=function(a,c,f){var h=Math.floor(a)&255,k=Math.floor(c)&255,p=Math.floor(f)&255;a-=Math.floor(a);c-=Math.floor(c);f-=Math.floor(f);var m=(3-2*a)*a*a,n=(3-2*c)*c*c,G=l[h]+k,ca=l[G]+p,G=l[G+1]+p,k=l[h+1]+k,h=l[k]+p,p=l[k+1]+p;return d((3-2*f)*f*f,d(n,d(m,b(l[ca],a,c,f),b(l[h],a-1,c,f)),d(m,b(l[G],a,c-1,f),b(l[p],a-1,c-1,f))),d(n,d(m,b(l[ca+1],a,c,f-1),b(l[h+1],a-1,c,f-1)),d(m,b(l[G+1],a,c-1,f-1),b(l[p+1],a-1,c-1,f-1))))}; +this.noise2d=function(a,b){var f=Math.floor(a)&255,r=Math.floor(b)&255;a-=Math.floor(a);b-=Math.floor(b);var h=(3-2*a)*a*a,k=l[f]+r,f=l[f+1]+r;return d((3-2*b)*b*b,d(h,c(l[k],a,b),c(l[f],a-1,b)),d(h,c(l[k+1],a,b-1),c(l[f+1],a-1,b-1)))};this.noise1d=function(a){var b=Math.floor(a)&255;a-=Math.floor(a);return d((3-2*a)*a*a,0===(l[b]&1)?-a:a,0===(l[b+1]&1)?-(a-1):a-1)}}var a=function(){return Math.random()};k.abs=Math.abs;k.ceil=Math.ceil;k.exp=Math.exp;k.floor=Math.floor;k.log=Math.log;k.pow=Math.pow; +k.round=Math.round;k.sqrt=Math.sqrt;k.acos=Math.acos;k.asin=Math.asin;k.atan=Math.atan;k.atan2=Math.atan2;k.cos=Math.cos;k.sin=Math.sin;k.tan=Math.tan;k.constrain=function(a,b,c){return a>c?c:aa[d]&&(b=a[d]);return b};k.norm=function(a,b,c){return(a-b)/(c-b)};k.sq=function(a){return a*a};k.degrees=function(a){return 180*a/Math.PI};k.random=function(){if(0===arguments.length)return a();if(1===arguments.length)return a()*arguments[0];var b=arguments[0],d=arguments[1];return a()*(d-b)+b};m.createRandomized=function(){var a= +new Date;return new m(a/6E4&4294967295,a&4294967295)};k.randomSeed=function(b){a=(new m(b)).doubleGenerator;this.haveNextNextGaussian=!1};k.randomGaussian=function(){if(this.haveNextNextGaussian)return this.haveNextNextGaussian=!1,this.nextNextGaussian;var b,d,c;do b=2*a()-1,d=2*a()-1,c=b*b+d*d;while(1<=c||0===c);c=Math.sqrt(-2*Math.log(c)/c);this.nextNextGaussian=d*c;this.haveNextNextGaussian=!0;return b*c};var b=h,d=4,f=0.5,l=h;k.noise=function(a,k,c){b===h&&(b=new n(l));for(var m=b,ca=1,G=1,A= +0,x=0;xh?a:n;a=0===d;d=d===k||0>d?0:d;h=Math.abs(h);if(a)for(d=1,h*=10;1E-6d;)++d,h*=10;else 0!==d&&(h*=Math.pow(10,d));a=2*h;Math.floor(h)===h?a=h:Math.floor(a)===a?(h=Math.floor(h),a=h+h%2):a=Math.round(h);h="";for(b+=d;0\=]+)/g,function(a,b){var e=c(b);return e.untrim("__int_cast("+e.middle+")")});a=a.replace(/\bsuper(\s*"B\d+")/g,"$$superCstr$1").replace(/\bsuper(\s*\.)/g,"$$super$1");a=a.replace(/\b0+((\d*)(?:\.[\d*])?(?:[eE][\-\+]?\d+)?[fF]?)\b/,function(a,b,c){return b===c?a:""===c?"0"+b:b});a=a.replace(/\b(\.?\d+\.?)[fF]\b/g,"$1");a= +a.replace(/([^\s])%([^=\s])/g,"$1 % $2");a=a.replace(/\b(frameRate|keyPressed|mousePressed)\b(?!\s*"B)/g,"__$1");a=a.replace(/\b(boolean|byte|char|float|int)\s*"B/g,function(a,b){return"parse"+b.substring(0,1).toUpperCase()+b.substring(1)+'"B'});a=a.replace(/\bpixels\b\s*(("C(\d+)")|\.length)?(\s*=(?!=)([^,\]\)\}]+))?/g,function(a,b,c,e,d,f){return c?(a=N[e],d?"pixels.setPixel"+n("("+a.substring(1,a.length-1)+","+f+")","B"):"pixels.getPixel"+n("("+a.substring(1,a.length-1)+")","B")):b?"pixels.getLength"+ +n("()","B"):d?"pixels.set"+n("("+f+")","B"):"pixels.toArray"+n("()","B")});var d;do d=!1,a=a.replace(/((?:'\d+'|\b[A-Za-z_$][\w$]*\s*(?:"[BC]\d+")*)\s*\.\s*(?:[A-Za-z_$][\w$]*\s*(?:"[BC]\d+"\s*)*\.\s*)*)(replace|replaceAll|replaceFirst|contains|equals|equalsIgnoreCase|hashCode|toCharArray|printStackTrace|split|startsWith|endsWith|codePointAt|matches)\s*"B(\d+)"/g,b);while(d);do d=!1,a=a.replace(/((?:'\d+'|\b[A-Za-z_$][\w$]*\s*(?:"[BC]\d+")*)\s*(?:\.\s*[A-Za-z_$][\w$]*\s*(?:"[BC]\d+"\s*)*)*)instanceof\s+([A-Za-z_$][\w$]*\s*(?:\.\s*[A-Za-z_$][\w$]*)*)/g, +e);while(d);return a=a.replace(/\bthis(\s*"B\d+")/g,"$$constr$1")}function u(a,b){this.baseInterfaceName=a;this.body=b;b.owner=this}function nd(a){var b=RegExp(/\bnew\s*([A-Za-z_$][\w$]*\s*(?:\.\s*[A-Za-z_$][\w$]*)*)\s*"B\d+"\s*"A(\d+)"/).exec(a);a=ja;var c="class"+ ++ab;ja=c;var e=b[1]+"$"+c,b=new u(e,ea(N[b[2]],e,"","implements "+b[1]));b.classId=c;b.scopeId=a;X[c]=b;ja=a;return b}function Ia(a,b,c){this.name=a;this.params=b;this.body=c}function T(a){a=RegExp(/\b([A-Za-z_$][\w$]*)\s*"B(\d+)"\s*"A(\d+)"/).exec(a); +return new Ia("function"!==a[1]?a[1]:null,M(N[a[2]]),ra(N[a[3]]))}function Y(a){this.members=a}function U(a){a=a.split(",");for(var b=0;bc?{value:ma(a[b])}:{label:f(a[b].substring(0,c)),value:ma(f(a[b].substring(c+1)))}}return new Y(a)}function Z(a){if("("===a.charAt(0)||"["===a.charAt(0))return a.charAt(0)+Z(a.substring(1,a.length-1))+a.charAt(a.length-1);if("{"===a.charAt(0))return/^\{\s*(?:[A-Za-z_$][\w$]*|'\d+')\s*:/.test(a)?"{"+n(a.substring(1,a.length- +1),"I")+"}":"["+Z(a.substring(1,a.length-1))+"]";a=c(a);var b=Q(a.middle),b=b.replace(/"[ABC](\d+)"/g,function(a,b){return Z(N[b])});return a.untrim(b)}function sa(a){return a.replace(/(\.\s*)?((?:\b[A-Za-z_]|\$)[\w$]*)(\s*\.\s*([A-Za-z_$][\w$]*)(\s*\()?)?/g,function(a,b,c,e,d,f){return b?a:C({name:c,member:d,callSign:!!f})+(e===p?"":e)})}function ta(a,b){this.expr=a;this.transforms=b}function $b(a,b,c){this.name=a;this.value=b;this.isDefault=c}function bb(a,b){var c=a.indexOf("="),e,d;0>c?(e=a,c= +b,d=!0):(e=a.substring(0,c),c=ma(a.substring(c+1)),d=!1);return new $b(f(e.replace(/(\s*"C\d+")+/g,"")),c,d)}function Sa(a){return"int"===a||"float"===a?"0":"boolean"===a?"false":"color"===a?"0x00000000":"null"}function cb(a,b){this.definitions=a;this.varType=b}function Fb(a){this.expression=a}function db(a){if(Gb.test(a)){var b=ub.exec(a);a=a.substring(b[0].length).split(",");for(var c=Sa(b[2]),e=0;ea.indexOf(";"))return a=a.substring(1,a.length-1).split(":"),new wa(db(f(a[0])),ma(a[1]));a=a.substring(1,a.length-1).split(";");return new Hb(db(f(a[0])),ma(a[1]),ma(a[2]))}function Ta(a){a.sort(function(a,b){return b.weight- +a.weight})}function Ja(a,b,c){this.name=a;this.body=b;this.isStatic=c;b.owner=this}function Jb(a,b,c){this.name=a;this.body=b;this.isStatic=c;b.owner=this}function Kb(a){var b=qa.exec(a);qa.lastIndex=0;var c=0<=b[1].indexOf("static"),e=N[l(b[6])];a=ja;var d="class"+ ++ab;ja=d;b="interface"===b[2]?new Ja(b[3],eb(e,b[3],b[4]),c):new Jb(b[3],ea(e,b[3],b[4],b[5]),c);b.classId=d;b.scopeId=a;X[d]=b;ja=a;return b}function Lb(a,b,c,e){this.name=a;this.params=b;this.body=c;this.isStatic=e}function fb(a){a= +la.exec(a);la.lastIndex=0;var b=0<=a[1].indexOf("static"),c=";"!==a[6]?N[l(a[6])]:"{}";return new Lb(a[3],M(N[l(a[4])]),ra(c),b)}function Mb(a,b,c){this.definitions=a;this.fieldType=b;this.isStatic=c}function Ua(a){var b=ub.exec(a),c=0<=b[1].indexOf("static");a=a.substring(b[0].length).split(/,\s*/g);for(var e=Sa(b[2]),d=0;d([=]?)/g,La);while(ka);var N=function(a){var b=[];a=a.split(/([\{\[\(\)\]\}])/);for(var c=a[0],e=[],d=1;d=":"===")+" "+m+") { $constr_"+m+".apply("+a+", arguments); }");0f)return!1;d.splice(f,1);if(0");b.javaconsole.innerHTML=b.BufferArray.join("");"hidden"===b.wrapper.style.visibility&&(b.wrapper.style.visibility="visible");b.BufferArray.length>b.BufferMax?b.BufferArray.splice(0, +1):b.javaconsole.scrollTop=b.javaconsole.scrollHeight;"hidden"===b.wrapper.style.visibility&&(b.wrapper.style.visibility="visible")};b.showconsole=function(){b.wrapper.style.visibility="visible"};b.hideconsole=function(){b.wrapper.style.visibility="hidden"};b.closer.onclick=function(){b.hideconsole()};b.hideconsole();return b}(l);return k}},{}],26:[function(D,x,Q){x.exports=function(k,h){function m(a,b){return a in l?l[a]:"function"===typeof l[b]?l[b]:function(a){if(a instanceof Array)return a;if("number"=== +typeof a){var b=[];b.length=a;return b}}}var n=k.defaultScope,a=k.extend,b=k.Browser,d=b.ajax,f=b.navigator,l=b.window,p=b.document,r=k.noop,c=n.PConstants;PFont=n.PFont;PShapeSVG=n.PShapeSVG;PVector=n.PVector;Char=Character=n.Char;ObjectIterator=n.ObjectIterator;XMLElement=n.XMLElement;XML=n.XML;var x=l.HTMLCanvasElement,D=l.HTMLImageElement,G=l.localStorage;p.head||(p.head=p.getElementsByTagName("head")[0]);var A=m("Float32Array","WebGLFloatArray"),Q=m("Int32Array","WebGLIntArray"),v=m("Uint16Array", +"WebGLUnsignedShortArray"),ga=m("Uint8Array","WebGLUnsignedByteArray");if(9<=p.documentMode&&!p.doctype)throw"The doctype directive is missing. The recommended doctype in Internet Explorer is the HTML5 doctype: ";var q=[],Zb={},M=this.Processing=function(b,k,m){function Ia(a,b,z){a.addEventListener?a.addEventListener(b,z,!1):a.attachEvent("on"+b,z);wb.push({elem:a,type:b,fn:z})}function T(a,b,z,c){var e=Fa.locations[a];e===h&&(e=g.getUniformLocation(b,z),Fa.locations[a]=e);null!==e&& +(4===c.length?g.uniform4fv(e,c):3===c.length?g.uniform3fv(e,c):2===c.length?g.uniform2fv(e,c):g.uniform1f(e,c))}function Y(a,b,z,c){var e=Fa.locations[a];e===h&&(e=g.getUniformLocation(b,z),Fa.locations[a]=e);null!==e&&(4===c.length?g.uniform4iv(e,c):3===c.length?g.uniform3iv(e,c):2===c.length?g.uniform2iv(e,c):g.uniform1i(e,c))}function U(a,b,z,c,e){var d=Fa.locations[a];d===h&&(d=g.getUniformLocation(b,z),Fa.locations[a]=d);-1!==d&&(16===e.length?g.uniformMatrix4fv(d,c,e):9===e.length?g.uniformMatrix3fv(d, +c,e):g.uniformMatrix2fv(d,c,e))}function Z(a,b,z,c,e){var d=Fa.attributes[a];d===h&&(d=g.getAttribLocation(b,z),Fa.attributes[a]=d);-1!==d&&(g.bindBuffer(g.ARRAY_BUFFER,e),g.vertexAttribPointer(d,c,g.FLOAT,!1,0,0),g.enableVertexAttribArray(d))}function sa(a,b,z){var c=Fa.attributes[a];c===h&&(c=g.getAttribLocation(b,z),Fa.attributes[a]=c);-1!==c&&g.disableVertexAttribArray(c)}function ta(a,b,z,$){Va===c.HSB?(z=e.color.toRGB(a,b,z),a=z[0],b=z[1],z=z[2]):(a=Math.round(255*(a/xa)),b=Math.round(255*(b/ +Ea)),z=Math.round(255*(z/ya)));$=Math.round(255*($/ia));a=0>a?0:a;b=0>b?0:b;z=0>z?0:z;$=0>$?0:$;return(255<$?255:$)<<24&c.ALPHA_MASK|(255>>16)/255;z=((a&c.GREEN_MASK)>>>8)/255;$=(a&c.BLUE_MASK)/255;a=e.max(e.max(b,z),$);var d=e.min(e.min(b, +z),$);if(d===a)return[0,0,a*ya];b=(b===a?(z-$)/(a-d):z===a?2+($-b)/(a-d):4+(b-z)/(a-d))/6;0>b?b+=1:1>>16;d[e+1]=(b&c.GREEN_MASK)>>>8;d[e+2]=b&c.BLUE_MASK; +d[e+3]=(b&c.ALPHA_MASK)>>>24;a.__isDirty=!0}}(a),toArray:function(a){return function(){var L=[],b=a.imageData.data,e=a.width*a.height;if(a.isRemote)throw"Image is loaded remotely. Cannot get pixels.";for(var d=0,f=0;d>>16,e[b+1]=(d&c.GREEN_MASK)>>>8,e[b+2]=d&c.BLUE_MASK,e[b+3]=(d&c.ALPHA_MASK)>>>24;a.__isDirty=!0}}(a)}}function Kb(a,b,z,$){var d=new Ga(z,$,c.ARGB);d.fromImageData(e.toImageData(a,b,z,$));return d}function Lb(a,b,z,e,d){if(d.isRemote)throw"Image is loaded remotely. Cannot get x,y,w,h.";var f=new Ga(z,e,c.ARGB),g=f.imageData.data,h=d.width,s=d.height;d=d.imageData.data;var k=Math.max(0,-b),l=Math.max(0,-a);e=Math.min(e,s-b);for(s=Math.min(z,h-a);ka.indexOf("\n")?(a=[a],d=1):(a=a.split(/\r?\n/g),d=a.length);var f=0;Wa===c.TOP?f=Xa+Ma:Wa===c.CENTER?f=Xa/2-(d-1)*Aa/2:Wa===c.BOTTOM&&(f=-(Ma+(d-1)*Aa));for(var g=0;gd)){for(var g=-1,h=0,s=0,k=[],l=0,n=a.length;ld-Ma)break;s=k[h];ha.text$line(s.text,b+a,z+g+l,f,nb)}}}function Ka(a){ha="3D"===a?new B:"2D"===a?new E:new F;for(var b in F.prototype)F.prototype.hasOwnProperty(b)&& +0>b.indexOf("$")&&(e[b]=ha[b]);ha.$init()}function H(a){return function(){Ka("2D");return ha[a].apply(this,arguments)}}function lb(a){a=a.which||a.keyCode;switch(a){case 13:return 10;case 91:case 93:case 224:return 157;case 57392:return 17;case 46:return 127;case 45:return 155}return a}function mb(a){"function"===typeof a.preventDefault?a.preventDefault():"function"===typeof a.stopPropagation&&a.stopPropagation();return!1}function Ob(){for(var a in hb)if(hb.hasOwnProperty(a)){e.__keyPressed=!0;return}e.__keyPressed= +!1}function vb(a,b){hb[a]=b;ob=null;e.key=b;e.keyCode=a;e.keyPressed();e.keyCode=0;e.keyTyped();Ob()}function rc(a){var b=lb(a);if(b===c.DELETE)vb(b,new Char(127));else if(0>qd.indexOf(b))ob=b;else{var z=new Char(c.CODED);e.key=z;e.keyCode=b;hb[b]=z;e.keyPressed();ob=null;Ob();return mb(a)}}function Pb(a){if(null!==ob){var b=ob,z;z=a.which||a.keyCode;var c=a.shiftKey||a.ctrlKey||a.altKey||a.metaKey;switch(z){case 13:z=c?13:10;break;case 8:z=c?127:8}z=new Char(z);vb(b,z);return mb(a)}}function bc(a){a= +lb(a);var b=hb[a];b!==h&&(e.key=b,e.keyCode=a,e.keyReleased(),delete hb[a],Ob())}if(!(this instanceof M))throw"called Processing constructor as if it were a function: missing 'new'.";var S={},Qb=b===h&&k===h,S=Qb?p.createElement("canvas"):"string"===typeof b?p.getElementById(b):b;if(!("getContext"in S))throw"called Processing constructor without passing canvas element reference or id.";var wb=[],e=this;e.Char=e.Character=Char;a.withCommonFunctions(e);a.withMath(e);a.withProxyFunctions(e,function(a){return Array.prototype.slice.call(a, +1)});a.withTouch(e,S,Ia,p,c);m&&Object.keys(m).forEach(function(a){e[a]=m[a]});e.externals={canvas:S,context:h,sketch:h,window:l};e.name="Processing.js Instance";e.use3DContext=!1;e.focused=!1;e.breakShape=!1;e.glyphTable={};e.pmouseX=0;e.pmouseY=0;e.mouseX=0;e.mouseY=0;e.mouseButton=0;e.mouseScroll=0;e.mouseClicked=h;e.mouseDragged=h;e.mouseMoved=h;e.mousePressed=h;e.mouseReleased=h;e.mouseScrolled=h;e.mouseOver=h;e.mouseOut=h;e.touchStart=h;e.touchEnd=h;e.touchMove=h;e.touchCancel=h;e.key=h;e.keyCode= +h;e.keyPressed=r;e.keyReleased=r;e.keyTyped=r;e.draw=h;e.setup=h;e.__mousePressed=!1;e.__keyPressed=!1;e.__frameRate=60;e.frameCount=0;e.width=100;e.height=100;var g,da,ha,R=!0,ka=[1,1,1,1],La=4294967295,N=!0,C=!0,X=[0,0,0,1],ja=4278190080,ab=!0,ea=1,eb=!1,ra=!1,Da=!0,ma=0,qa=c.CORNER,la=c.CENTER,Gb=0,Eb=0,ub=0,jb=c.NORMAL_MODE_AUTO,tb=60,Kc=1E3/tb,od=S.style.cursor,aa=c.POLYGON,oc=0,pc=20,Lc=!1,kb=-3355444,qc=20,ia=255,xa=255,Ea=255,ya=255,cc=0,dc=0,Va=c.RGB,gb=null,sc=null,Oc=Date.now(),tc=Oc,ec= +0,Ba,Sb,fc,xb,yb,uc,vc,Fa={attributes:{},locations:{}},y,J,na,wc,xc,yc,gc,zc,Tb,Ac,Pc,Bc,Qc,hc,Rc,Sc,Tc,Uc=0,Vc=0,Wc=c.IMAGE,ua=!1,Cc,Dc,Ec,nb=c.LEFT,Wa=c.BASELINE,ic=c.MODEL,zb="Arial",Na=12,Xa=9,Ma=2,Aa=14,ba=PFont.get(zb,Na),Nc,Fc=null,Rb=!1,Xc,Yc=1E3,hb=[],ob=null,qd=[c.SHIFT,c.CONTROL,c.ALT,c.CAPSLK,c.PGUP,c.PGDN,c.END,c.HOME,c.LEFT,c.UP,c.RIGHT,c.DOWN,c.NUMLK,c.INSERT,c.F1,c.F2,c.F3,c.F4,c.F5,c.F6,c.F7,c.F8,c.F9,c.F10,c.F11,c.F12,c.META],O=0,jc=0,pb=0,Oa=[],Pa=[],Qa=[],Ub=new A(c.SINCOS_LENGTH), +Vb=new A(c.SINCOS_LENGTH),P,qb,Ra,K,fa,Ab,Bb,Wb,Ha,kc=!1,lc=60*(Math.PI/180),Gc=e.width/2,rb=e.height/2,sb=rb/Math.tan(lc/2),Zc=sb/10,$c=10*sb,ad=e.width/e.height,t=[],va=[],oa=0,Cb=!1,Db=!1,ib=!0,Xb=c.CORNER,bd=[],cd=new A([0.5,0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,-0.5,0.5,-0.5,0.5,-0.5,-0.5, +0.5,-0.5,-0.5,0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,0.5,0.5,0.5,0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,0.5,0.5,0.5,0.5]),dd=new A([0.5,0.5,0.5,0.5,-0.5,0.5,0.5,0.5,-0.5,0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5, +-0.5,-0.5,0.5,-0.5,-0.5,0.5,0.5,-0.5,0.5]),rd=new A([0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0]),Hc=new A([0,0,0,0,1,0,1,1,0,1,0,0]),sd=new A([0,0,1,0,0,1,0,0,1,0,0,1]),td="varying vec4 vFrontColor;attribute vec3 aVertex;attribute vec3 aNormal;attribute vec4 aColor;attribute vec2 aTexture;varying vec2 vTexture;uniform vec4 uColor;uniform bool uUsingMat;uniform vec3 uSpecular;uniform vec3 uMaterialEmissive;uniform vec3 uMaterialAmbient;uniform vec3 uMaterialSpecular;uniform float uShininess;uniform mat4 uModel;uniform mat4 uView;uniform mat4 uProjection;uniform mat4 uNormalTransform;uniform int uLightCount;uniform vec3 uFalloff;struct Light { int type; vec3 color; vec3 position; vec3 direction; float angle; vec3 halfVector; float concentration;};uniform Light uLights0;uniform Light uLights1;uniform Light uLights2;uniform Light uLights3;uniform Light uLights4;uniform Light uLights5;uniform Light uLights6;uniform Light uLights7;Light getLight(int index){ if(index == 0) return uLights0; if(index == 1) return uLights1; if(index == 2) return uLights2; if(index == 3) return uLights3; if(index == 4) return uLights4; if(index == 5) return uLights5; if(index == 6) return uLights6; return uLights7;}void AmbientLight( inout vec3 totalAmbient, in vec3 ecPos, in Light light ) { float d = length( light.position - ecPos ); float attenuation = 1.0 / ( uFalloff[0] + ( uFalloff[1] * d ) + ( uFalloff[2] * d * d )); totalAmbient += light.color * attenuation;}void DirectionalLight( inout vec3 col, inout vec3 spec, in vec3 vertNormal, in vec3 ecPos, in Light light ) { float powerFactor = 0.0; float nDotVP = max(0.0, dot( vertNormal, normalize(-light.position) )); float nDotVH = max(0.0, dot( vertNormal, normalize(-light.position-normalize(ecPos) ))); if( nDotVP != 0.0 ){ powerFactor = pow( nDotVH, uShininess ); } col += light.color * nDotVP; spec += uSpecular * powerFactor;}void PointLight( inout vec3 col, inout vec3 spec, in vec3 vertNormal, in vec3 ecPos, in Light light ) { float powerFactor; vec3 VP = light.position - ecPos; float d = length( VP ); VP = normalize( VP ); float attenuation = 1.0 / ( uFalloff[0] + ( uFalloff[1] * d ) + ( uFalloff[2] * d * d )); float nDotVP = max( 0.0, dot( vertNormal, VP )); vec3 halfVector = normalize( VP - normalize(ecPos) ); float nDotHV = max( 0.0, dot( vertNormal, halfVector )); if( nDotVP == 0.0 ) { powerFactor = 0.0; } else { powerFactor = pow( nDotHV, uShininess ); } spec += uSpecular * powerFactor * attenuation; col += light.color * nDotVP * attenuation;}void SpotLight( inout vec3 col, inout vec3 spec, in vec3 vertNormal, in vec3 ecPos, in Light light ) { float spotAttenuation; float powerFactor = 0.0; vec3 VP = light.position - ecPos; vec3 ldir = normalize( -light.direction ); float d = length( VP ); VP = normalize( VP ); float attenuation = 1.0 / ( uFalloff[0] + ( uFalloff[1] * d ) + ( uFalloff[2] * d * d ) ); float spotDot = dot( VP, ldir );"+ +(/Windows/.test(f.userAgent)?" spotAttenuation = 1.0; ":" if( spotDot > cos( light.angle ) ) { spotAttenuation = pow( spotDot, light.concentration ); } else{ spotAttenuation = 0.0; } attenuation *= spotAttenuation;")+" float nDotVP = max( 0.0, dot( vertNormal, VP ) ); vec3 halfVector = normalize( VP - normalize(ecPos) ); float nDotHV = max( 0.0, dot( vertNormal, halfVector ) ); if( nDotVP != 0.0 ) { powerFactor = pow( nDotHV, uShininess ); } spec += uSpecular * powerFactor * attenuation; col += light.color * nDotVP * attenuation;}void main(void) { vec3 finalAmbient = vec3( 0.0 ); vec3 finalDiffuse = vec3( 0.0 ); vec3 finalSpecular = vec3( 0.0 ); vec4 col = uColor; if ( uColor[0] == -1.0 ){ col = aColor; } vec3 norm = normalize(vec3( uNormalTransform * vec4( aNormal, 0.0 ) )); vec4 ecPos4 = uView * uModel * vec4(aVertex, 1.0); vec3 ecPos = (vec3(ecPos4))/ecPos4.w; if( uLightCount == 0 ) { vFrontColor = col + vec4(uMaterialSpecular, 1.0); } else { for( int i = 0; i < 8; i++ ) { Light l = getLight(i); if( i >= uLightCount ){ break; } if( l.type == 0 ) { AmbientLight( finalAmbient, ecPos, l ); } else if( l.type == 1 ) { DirectionalLight( finalDiffuse, finalSpecular, norm, ecPos, l ); } else if( l.type == 2 ) { PointLight( finalDiffuse, finalSpecular, norm, ecPos, l ); } else { SpotLight( finalDiffuse, finalSpecular, norm, ecPos, l ); } } if( uUsingMat == false ) { vFrontColor = vec4( vec3( col ) * finalAmbient + vec3( col ) * finalDiffuse + vec3( col ) * finalSpecular, col[3] ); } else{ vFrontColor = vec4( uMaterialEmissive + (vec3(col) * uMaterialAmbient * finalAmbient ) + (vec3(col) * finalDiffuse) + (uMaterialSpecular * finalSpecular), col[3] ); } } vTexture.xy = aTexture.xy; gl_Position = uProjection * uView * uModel * vec4( aVertex, 1.0 );}", +Ic=function(a,b,z){var c=a.createShader(a.VERTEX_SHADER);a.shaderSource(c,b);a.compileShader(c);if(!a.getShaderParameter(c,a.COMPILE_STATUS))throw a.getShaderInfoLog(c);b=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(b,z);a.compileShader(b);if(!a.getShaderParameter(b,a.COMPILE_STATUS))throw a.getShaderInfoLog(b);z=a.createProgram();a.attachShader(z,c);a.attachShader(z,b);a.linkProgram(z);if(!a.getProgramParameter(z,a.LINK_STATUS))throw"Error linking shaders.";return z},ed=function(a,b,z,c,e){return{x:a, +y:b,w:z,h:c}},mc=ed,ud=function(a,b,z,c,e){return{x:a,y:b,w:e?z:z-a,h:e?c:c-b}},vd=function(a,b,z,c,e){return{x:a-z/2,y:b-c/2,w:z,h:c}},W=function(){},E=function(){},B=function(){},F=function(){};E.prototype=new W;E.prototype.constructor=E;B.prototype=new W;B.prototype.constructor=B;F.prototype=new W;F.prototype.constructor=F;W.prototype.a3DOnlyFunction=r;e.shape=function(a,b,z,$,d){1<=arguments.length&&null!==arguments[0]&&a.isVisible()&&(e.pushMatrix(),Xb===c.CENTER?5===arguments.length?(e.translate(b- +$/2,z-d/2),e.scale($/a.getWidth(),d/a.getHeight())):3===arguments.length?e.translate(b-a.getWidth()/2,-a.getHeight()/2):e.translate(-a.getWidth()/2,-a.getHeight()/2):Xb===c.CORNER?5===arguments.length?(e.translate(b,z),e.scale($/a.getWidth(),d/a.getHeight())):3===arguments.length&&e.translate(b,z):Xb===c.CORNERS&&(5===arguments.length?($-=b,d-=z,e.translate(b,z),e.scale($/a.getWidth(),d/a.getHeight())):3===arguments.length&&e.translate(b,z)),a.draw(e),(1===arguments.length&&Xb===c.CENTER||1c.MIN_INT){var b=this.elements[0],z=this.elements[1],e=this.elements[2],d=this.elements[3],f=this.elements[4],g=this.elements[5];this.elements[0]=f/a;this.elements[3]=-d/a;this.elements[1]=-z/a;this.elements[4]=b/a;this.elements[2]=(z*g-f*e)/a;this.elements[5]=(d*e-b*g)/a;return!0}return!1},scale:function(a,b){a&&!b&&(b=a);a&& +b&&(this.elements[0]*=a,this.elements[1]*=b,this.elements[3]*=a,this.elements[4]*=b)},invScale:function(a,b){a&&!b&&(b=a);this.scale(1/a,1/b)},apply:function(){var a;1===arguments.length&&arguments[0]instanceof Ya?a=arguments[0].array():6===arguments.length?a=Array.prototype.slice.call(arguments):1===arguments.length&&arguments[0]instanceof Array&&(a=arguments[0]);for(var b=[0,0,this.elements[2],0,0,this.elements[5]],z=0,c=0;2>c;c++)for(var e=0;3>e;e++,z++)b[z]+=this.elements[3*c+0]*a[e+0]+this.elements[3* +c+1]*a[e+3];this.elements=b.slice()},preApply:function(){var a;1===arguments.length&&arguments[0]instanceof Ya?a=arguments[0].array():6===arguments.length?a=Array.prototype.slice.call(arguments):1===arguments.length&&arguments[0]instanceof Array&&(a=arguments[0]);var b=[0,0,a[2],0,0,a[5]];b[2]=a[2]+this.elements[2]*a[0]+this.elements[5]*a[1];b[5]=a[5]+this.elements[2]*a[3]+this.elements[5]*a[4];b[0]=this.elements[0]*a[0]+this.elements[3]*a[1];b[3]=this.elements[0]*a[3]+this.elements[3]*a[4];b[1]= +this.elements[1]*a[0]+this.elements[4]*a[1];b[4]=this.elements[1]*a[3]+this.elements[4]*a[4];this.elements=b.slice()},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.elements[0],e=this.elements[1];this.elements[0]=b*c+a*e;this.elements[1]=-a*c+b*e;c=this.elements[3];e=this.elements[4];this.elements[3]=b*c+a*e;this.elements[4]=-a*c+b*e},rotateZ:function(a){this.rotate(a)},invRotateZ:function(a){this.rotateZ(a-Math.PI)},print:function(){var a=fd(this.elements),a=""+e.nfs(this.elements[0], +a,4)+" "+e.nfs(this.elements[1],a,4)+" "+e.nfs(this.elements[2],a,4)+"\n"+e.nfs(this.elements[3],a,4)+" "+e.nfs(this.elements[4],a,4)+" "+e.nfs(this.elements[5],a,4)+"\n\n";e.println(a)}};var I=e.PMatrix3D=function(){this.reset()};I.prototype={set:function(){16===arguments.length?this.elements=Array.prototype.slice.call(arguments):1===arguments.length&&arguments[0]instanceof I?this.elements=arguments[0].array():1===arguments.length&&arguments[0]instanceof Array&&(this.elements=arguments[0].slice())}, +get:function(){var a=new I;a.set(this.elements);return a},reset:function(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},array:function(){return this.elements.slice()},translate:function(a,b,c){c===h&&(c=0);this.elements[3]+=a*this.elements[0]+b*this.elements[1]+c*this.elements[2];this.elements[7]+=a*this.elements[4]+b*this.elements[5]+c*this.elements[6];this.elements[11]+=a*this.elements[8]+b*this.elements[9]+c*this.elements[10];this.elements[15]+=a*this.elements[12]+b*this.elements[13]+c*this.elements[14]}, +transpose:function(){var a=this.elements[4];this.elements[4]=this.elements[1];this.elements[1]=a;a=this.elements[8];this.elements[8]=this.elements[2];this.elements[2]=a;a=this.elements[6];this.elements[6]=this.elements[9];this.elements[9]=a;a=this.elements[3];this.elements[3]=this.elements[12];this.elements[12]=a;a=this.elements[7];this.elements[7]=this.elements[13];this.elements[13]=a;a=this.elements[11];this.elements[11]=this.elements[14];this.elements[14]=a},mult:function(a,b){var c,e,d,f;a instanceof +PVector?(c=a.x,e=a.y,d=a.z,f=1,b||(b=new PVector)):a instanceof Array&&(c=a[0],e=a[1],d=a[2],f=a[3]||1,!b||3!==b.length&&4!==b.length)&&(b=[0,0,0]);b instanceof Array&&(3===b.length?(b[0]=this.elements[0]*c+this.elements[1]*e+this.elements[2]*d+this.elements[3],b[1]=this.elements[4]*c+this.elements[5]*e+this.elements[6]*d+this.elements[7],b[2]=this.elements[8]*c+this.elements[9]*e+this.elements[10]*d+this.elements[11]):4===b.length&&(b[0]=this.elements[0]*c+this.elements[1]*e+this.elements[2]*d+this.elements[3]* +f,b[1]=this.elements[4]*c+this.elements[5]*e+this.elements[6]*d+this.elements[7]*f,b[2]=this.elements[8]*c+this.elements[9]*e+this.elements[10]*d+this.elements[11]*f,b[3]=this.elements[12]*c+this.elements[13]*e+this.elements[14]*d+this.elements[15]*f));b instanceof PVector&&(b.x=this.elements[0]*c+this.elements[1]*e+this.elements[2]*d+this.elements[3],b.y=this.elements[4]*c+this.elements[5]*e+this.elements[6]*d+this.elements[7],b.z=this.elements[8]*c+this.elements[9]*e+this.elements[10]*d+this.elements[11]); +return b},preApply:function(){var a;1===arguments.length&&arguments[0]instanceof I?a=arguments[0].array():16===arguments.length?a=Array.prototype.slice.call(arguments):1===arguments.length&&arguments[0]instanceof Array&&(a=arguments[0]);for(var b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0,e=0;4>e;e++)for(var d=0;4>d;d++,c++)b[c]+=this.elements[d+0]*a[4*e+0]+this.elements[d+4]*a[4*e+1]+this.elements[d+8]*a[4*e+2]+this.elements[d+12]*a[4*e+3];this.elements=b.slice()},apply:function(){var a;1===arguments.length&& +arguments[0]instanceof I?a=arguments[0].array():16===arguments.length?a=Array.prototype.slice.call(arguments):1===arguments.length&&arguments[0]instanceof Array&&(a=arguments[0]);for(var b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0,e=0;4>e;e++)for(var d=0;4>d;d++,c++)b[c]+=this.elements[4*e+0]*a[d+0]+this.elements[4*e+1]*a[d+4]+this.elements[4*e+2]*a[d+8]+this.elements[4*e+3]*a[d+12];this.elements=b.slice()},rotate:function(a,b,c,d){if(4>arguments.length)this.rotateZ(a);else{var f=new PVector(b,c,d),g= +f.mag();if(0!==g){1!=g&&(f.normalize(),b=f.x,c=f.y,d=f.z);var f=e.cos(a),g=e.sin(a),h=1-f;this.apply(h*b*b+f,h*b*c-g*d,h*b*d+g*c,0,h*b*c+g*d,h*c*c+f,h*c*d-g*b,0,h*b*d-g*c,h*c*d+g*b,h*d*d+f,0,0,0,0,1)}}},invApply:function(){Wb===h&&(Wb=new I);var a=arguments;Wb.set(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]);if(!Wb.invert())return!1;this.preApply(Wb);return!0},rotateX:function(a){var b=e.cos(a);a=e.sin(a);this.apply([1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1])},rotateY:function(a){var b= +e.cos(a);a=e.sin(a);this.apply([b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1])},rotateZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.apply([b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1])},scale:function(a,b,c){!a||b||c?a&&(b&&!c)&&(c=1):b=c=a;a&&(b&&c)&&(this.elements[0]*=a,this.elements[1]*=b,this.elements[2]*=c,this.elements[4]*=a,this.elements[5]*=b,this.elements[6]*=c,this.elements[8]*=a,this.elements[9]*=b,this.elements[10]*=c,this.elements[12]*=a,this.elements[13]*=b,this.elements[14]*=c)},skewX:function(a){a= +Math.tan(a);this.apply(1,a,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},skewY:function(a){a=Math.tan(a);this.apply(1,0,0,0,a,1,0,0,0,0,1,0,0,0,0,1)},shearX:function(a){a=Math.tan(a);this.apply(1,a,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},shearY:function(a){a=Math.tan(a);this.apply(1,0,0,0,a,1,0,0,0,0,1,0,0,0,0,1)},multX:function(a,b,c,e){return c?e?this.elements[0]*a+this.elements[1]*b+this.elements[2]*c+this.elements[3]*e:this.elements[0]*a+this.elements[1]*b+this.elements[2]*c+this.elements[3]:this.elements[0]*a+this.elements[1]* +b+this.elements[3]},multY:function(a,b,c,e){return c?e?this.elements[4]*a+this.elements[5]*b+this.elements[6]*c+this.elements[7]*e:this.elements[4]*a+this.elements[5]*b+this.elements[6]*c+this.elements[7]:this.elements[4]*a+this.elements[5]*b+this.elements[7]},multZ:function(a,b,c,e){return e?this.elements[8]*a+this.elements[9]*b+this.elements[10]*c+this.elements[11]*e:this.elements[8]*a+this.elements[9]*b+this.elements[10]*c+this.elements[11]},multW:function(a,b,c,e){return e?this.elements[12]*a+ +this.elements[13]*b+this.elements[14]*c+this.elements[15]*e:this.elements[12]*a+this.elements[13]*b+this.elements[14]*c+this.elements[15]},invert:function(){var a=this.elements[0]*this.elements[5]-this.elements[1]*this.elements[4],b=this.elements[0]*this.elements[6]-this.elements[2]*this.elements[4],c=this.elements[0]*this.elements[7]-this.elements[3]*this.elements[4],e=this.elements[1]*this.elements[6]-this.elements[2]*this.elements[5],d=this.elements[1]*this.elements[7]-this.elements[3]*this.elements[5], +f=this.elements[2]*this.elements[7]-this.elements[3]*this.elements[6],g=this.elements[8]*this.elements[13]-this.elements[9]*this.elements[12],h=this.elements[8]*this.elements[14]-this.elements[10]*this.elements[12],s=this.elements[8]*this.elements[15]-this.elements[11]*this.elements[12],k=this.elements[9]*this.elements[14]-this.elements[10]*this.elements[13],l=this.elements[9]*this.elements[15]-this.elements[11]*this.elements[13],n=this.elements[10]*this.elements[15]-this.elements[11]*this.elements[14], +p=a*n-b*l+c*k+e*s-d*h+f*g;if(1E-9>=Math.abs(p))return!1;var m=[];m[0]=+this.elements[5]*n-this.elements[6]*l+this.elements[7]*k;m[4]=-this.elements[4]*n+this.elements[6]*s-this.elements[7]*h;m[8]=+this.elements[4]*l-this.elements[5]*s+this.elements[7]*g;m[12]=-this.elements[4]*k+this.elements[5]*h-this.elements[6]*g;m[1]=-this.elements[1]*n+this.elements[2]*l-this.elements[3]*k;m[5]=+this.elements[0]*n-this.elements[2]*s+this.elements[3]*h;m[9]=-this.elements[0]*l+this.elements[1]*s-this.elements[3]* +g;m[13]=+this.elements[0]*k-this.elements[1]*h+this.elements[2]*g;m[2]=+this.elements[13]*f-this.elements[14]*d+this.elements[15]*e;m[6]=-this.elements[12]*f+this.elements[14]*c-this.elements[15]*b;m[10]=+this.elements[12]*d-this.elements[13]*c+this.elements[15]*a;m[14]=-this.elements[12]*e+this.elements[13]*b-this.elements[14]*a;m[3]=-this.elements[9]*f+this.elements[10]*d-this.elements[11]*e;m[7]=+this.elements[8]*f-this.elements[10]*c+this.elements[11]*b;m[11]=-this.elements[8]*d+this.elements[9]* +c-this.elements[11]*a;m[15]=+this.elements[8]*e-this.elements[9]*b+this.elements[10]*a;a=1/p;m[0]*=a;m[1]*=a;m[2]*=a;m[3]*=a;m[4]*=a;m[5]*=a;m[6]*=a;m[7]*=a;m[8]*=a;m[9]*=a;m[10]*=a;m[11]*=a;m[12]*=a;m[13]*=a;m[14]*=a;m[15]*=a;this.elements=m.slice();return!0},toString:function(){for(var a="",b=0;15>b;b++)a+=this.elements[b]+", ";return a+=this.elements[15]},print:function(){var a=fd(this.elements),a=""+e.nfs(this.elements[0],a,4)+" "+e.nfs(this.elements[1],a,4)+" "+e.nfs(this.elements[2],a,4)+" "+ +e.nfs(this.elements[3],a,4)+"\n"+e.nfs(this.elements[4],a,4)+" "+e.nfs(this.elements[5],a,4)+" "+e.nfs(this.elements[6],a,4)+" "+e.nfs(this.elements[7],a,4)+"\n"+e.nfs(this.elements[8],a,4)+" "+e.nfs(this.elements[9],a,4)+" "+e.nfs(this.elements[10],a,4)+" "+e.nfs(this.elements[11],a,4)+"\n"+e.nfs(this.elements[12],a,4)+" "+e.nfs(this.elements[13],a,4)+" "+e.nfs(this.elements[14],a,4)+" "+e.nfs(this.elements[15],a,4)+"\n\n";e.println(a)},invTranslate:function(a,b,c){this.preApply(1,0,0,-a,0,1,0,-b, +0,0,1,-c,0,0,0,1)},invRotateX:function(a){var b=Math.cos(-a);a=Math.sin(-a);this.preApply([1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1])},invRotateY:function(a){var b=Math.cos(-a);a=Math.sin(-a);this.preApply([b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1])},invRotateZ:function(a){var b=Math.cos(-a);a=Math.sin(-a);this.preApply([b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1])},invScale:function(a,b,c){this.preApply([1/a,0,0,0,0,1/b,0,0,0,0,1/c,0,0,0,0,1])}};var Za=e.PMatrixStack=function(){this.matrixStack=[]};Za.prototype.load=function(){var a= +ha.$newPMatrix();1===arguments.length?a.set(arguments[0]):a.set(arguments);this.matrixStack.push(a)};E.prototype.$newPMatrix=function(){return new Ya};B.prototype.$newPMatrix=function(){return new I};Za.prototype.push=function(){this.matrixStack.push(this.peek())};Za.prototype.pop=function(){return this.matrixStack.pop()};Za.prototype.peek=function(){var a=ha.$newPMatrix();a.set(this.matrixStack[this.matrixStack.length-1]);return a};Za.prototype.mult=function(a){this.matrixStack[this.matrixStack.length- +1].apply(a)};e.split=function(a,b){return a.split(b)};e.splitTokens=function(a,b){if(b===h)return a.split(/\s+/g);var c=b.split(/()/g),e="",d=a.length,f,g,k=[];for(f=0;f>8)};e.peg=function(a){return 0>a?0:255>>24)+L,255)<<24;c+=($-c)*L>>8;e+=(h-e)*L>>8;L=d+((pd-d)*L>>8);return b|(0>c?0:255e?0:255L?0:255>>24,h=a&e,k=a&d,w=a&f,l=L&e,m=L&d,n=L&f;return g(((a&b)>>>24)+c,255)<<24|h+((l-h)*c>>8)&e|k+((m-k)*c>>8)&d|w+((n-w)*c>>8)&f},add:function(a,L){var c=(L&b)>>>24;return g(((a& +b)>>>24)+c,255)<<24|g((a&e)+((L&e)>>8)*c,e)&e|g((a&d)+((L&d)>>8)*c,d)&d|g((a&f)+((L&f)*c>>8),f)},subtract:function(a,L){var c=(L&b)>>>24;return g(((a&b)>>>24)+c,255)<<24|h((a&e)-((L&e)>>8)*c,d)&e|h((a&d)-((L&d)>>8)*c,f)&d|h((a&f)-((L&f)*c>>8),0)},lightest:function(a,L){var c=(L&b)>>>24;return g(((a&b)>>>24)+c,255)<<24|h(a&e,((L&e)>>8)*c)&e|h(a&d,((L&d)>>8)*c)&d|h(a&f,(L&f)*c>>8)},darkest:function(a,L){var c=(L&b)>>>24,h=a&e,k=a&d,w=a&f,l=g(a&e,((L&e)>>8)*c),m=g(a&d,((L&d)>>8)*c),n=g(a&f,(L&f)*c>> +8);return g(((a&b)>>>24)+c,255)<<24|h+((l-h)*c>>8)&e|k+((m-k)*c>>8)&d|w+((n-w)*c>>8)&f},difference:function(c,g){var h=(c&e)>>16,k=(c&d)>>8,w=c&f,V=(g&e)>>16,l=(g&d)>>8,m=g&f;return a(c,(g&b)>>>24,h,k,w,V,l,m,h>V?h-V:V-h,k>l?k-l:l-k,w>m?w-m:m-w)},exclusion:function(c,g){var h=(c&e)>>16,k=(c&d)>>8,w=c&f,V=(g&e)>>16,l=(g&d)>>8,m=g&f;return a(c,(g&b)>>>24,h,k,w,V,l,m,h+V-(h*V>>7),k+l-(k*l>>7),w+m-(w*m>>7))},multiply:function(c,g){var h=(c&e)>>16,k=(c&d)>>8,w=c&f,V=(g&e)>>16,l=(g&d)>>8,m=g&f;return a(c, +(g&b)>>>24,h,k,w,V,l,m,h*V>>8,k*l>>8,w*m>>8)},screen:function(c,g){var h=(c&e)>>16,k=(c&d)>>8,w=c&f,V=(g&e)>>16,l=(g&d)>>8,m=g&f;return a(c,(g&b)>>>24,h,k,w,V,l,m,255-((255-h)*(255-V)>>8),255-((255-k)*(255-l)>>8),255-((255-w)*(255-m)>>8))},hard_light:function(c,g){var h=(c&e)>>16,k=(c&d)>>8,w=c&f,V=(g&e)>>16,l=(g&d)>>8,m=g&f;return a(c,(g&b)>>>24,h,k,w,V,l,m,128>V?h*V>>7:255-((255-h)*(255-V)>>7),128>l?k*l>>7:255-((255-k)*(255-l)>>7),128>m?w*m>>7:255-((255-w)*(255-m)>>7))},soft_light:function(c,g){var h= +(c&e)>>16,k=(c&d)>>8,w=c&f,V=(g&e)>>16,l=(g&d)>>8,m=g&f;return a(c,(g&b)>>>24,h,k,w,V,l,m,(h*V>>7)+(h*h>>8)-(h*h*V>>15),(k*l>>7)+(k*k>>8)-(k*k*l>>15),(w*m>>7)+(w*w>>8)-(w*w*m>>15))},overlay:function(c,g){var h=(c&e)>>16,k=(c&d)>>8,w=c&f,V=(g&e)>>16,l=(g&d)>>8,m=g&f;return a(c,(g&b)>>>24,h,k,w,V,l,m,128>h?h*V>>7:255-((255-h)*(255-V)>>7),128>k?k*l>>7:255-((255-k)*(255-l)>>7),128>w?w*m>>7:255-((255-w)*(255-m)>>7))},dodge:function(c,g){var h=(g&b)>>>24,k=(c&e)>>16,w=(c&d)>>8,V=c&f,l=(g&e)>>16,m=(g&d)>> +8,n=g&f,p=255;255!==l&&(p=(k<<8)/(255-l),p=0>p?0:255r?0:255t?0:255>>24,k=(c&e)>>16,w=(c&d)>>8,V=c&f,l=(g&e)>>16,m=(g&d)>>8,n=g&f,p=0;0!==l&&(p=(255-k<<8)/l,p=255-(0>p?0:255r?0:255t?0:255b?0:b)<<24&c.ALPHA_MASK)):a=Va===c.RGB?ta(a,a,a,b):Va===c.HSB?ta(0,0,a/xa*ya,b):void 0,a):"number"===typeof a?$b(a):ta(xa,Ea,ya,ia)};e.color.toString=function(a){return"rgba("+((a&c.RED_MASK)>>>16)+","+((a&c.GREEN_MASK)>>>8)+","+(a&c.BLUE_MASK)+","+((a&c.ALPHA_MASK)>>>24)/255+")"};e.color.toInt= +function(a,b,e,d){return d<<24&c.ALPHA_MASK|a<<16&c.RED_MASK|b<<8&c.GREEN_MASK|e&c.BLUE_MASK};e.color.toArray=function(a){return[(a&c.RED_MASK)>>>16,(a&c.GREEN_MASK)>>>8,a&c.BLUE_MASK,(a&c.ALPHA_MASK)>>>24]};e.color.toGLArray=function(a){return[((a&c.RED_MASK)>>>16)/255,((a&c.GREEN_MASK)>>>8)/255,(a&c.BLUE_MASK)/255,((a&c.ALPHA_MASK)>>>24)/255]};e.color.toRGB=function(a,b,c){a=a>xa?xa:a;b=b>Ea?Ea:b;c=c>ya?ya:c;a=360*(a/xa);b=100*(b/Ea);c=100*(c/ya);var e=Math.round(255*(c/100));if(0===b)return[e, +e,e];a%=360;var d=a%60,f=Math.round(255*(c*(100-b)/1E4)),g=Math.round(255*(c*(6E3-b*d)/6E5));b=Math.round(255*(c*(6E3-b*(60-d))/6E5));switch(Math.floor(a/60)){case 0:return[e,b,f];case 1:return[g,e,f];case 2:return[f,e,b];case 3:return[f,g,e];case 4:return[b,f,e];case 5:return[e,f,g]}};e.brightness=function(a){return bb(a)[2]};e.saturation=function(a){return bb(a)[1]};e.hue=function(a){return bb(a)[0]};e.red=function(a){return((a&c.RED_MASK)>>>16)/255*xa};e.green=function(a){return((a&c.GREEN_MASK)>>> +8)/255*Ea};e.blue=function(a){return(a&c.BLUE_MASK)/255*ya};e.alpha=function(a){return((a&c.ALPHA_MASK)>>>24)/255*ia};e.lerpColor=function(a,b,d){var f,g,h,k,l,s;a=e.color(a);b=e.color(b);if(Va===c.HSB)return h=bb(a),a=((a&c.ALPHA_MASK)>>>24)/ia,g=bb(b),b=((b&c.ALPHA_MASK)>>>24)/ia,s=e.lerp(h[0],g[0],d),f=e.lerp(h[1],g[1],d),h=e.lerp(h[2],g[2],d),h=e.color.toRGB(s,f,h),d=e.lerp(a,b,d)*ia,d<<24&c.ALPHA_MASK|h[0]<<16&c.RED_MASK|h[1]<<8&c.GREEN_MASK|h[2]&c.BLUE_MASK;f=(a&c.RED_MASK)>>>16;g=(a&c.GREEN_MASK)>>> +8;h=a&c.BLUE_MASK;a=((a&c.ALPHA_MASK)>>>24)/ia;k=(b&c.RED_MASK)>>>16;l=(b&c.GREEN_MASK)>>>8;s=b&c.BLUE_MASK;b=((b&c.ALPHA_MASK)>>>24)/ia;f=e.lerp(f,k,d)|0;g=e.lerp(g,l,d)|0;h=e.lerp(h,s,d)|0;d=e.lerp(a,b,d)*ia;return d<<24&c.ALPHA_MASK|f<<16&c.RED_MASK|g<<8&c.GREEN_MASK|h&c.BLUE_MASK};e.colorMode=function(){Va=arguments[0];1b;b++)a[b]=0;a[10]=a[15]=1;W.prototype.applyMatrix.apply(this,a)};e.rotateX=function(a){K.rotateX(a);fa.invRotateX(a)}; +E.prototype.rotateZ=function(){throw"rotateZ() is not supported in 2D mode. Use rotate(float) instead.";};B.prototype.rotateZ=function(a){K.rotateZ(a);fa.invRotateZ(a)};e.rotateY=function(a){K.rotateY(a);fa.invRotateY(a)};E.prototype.rotate=function(a){K.rotateZ(a);fa.invRotateZ(a);g.rotate(a)};B.prototype.rotate=function(a){4>arguments.length?e.rotateZ(a):(K.rotate(a,arguments[1],arguments[2],arguments[3]),fa.rotate(-a,arguments[1],arguments[2],arguments[3]))};E.prototype.shearX=function(a){K.shearX(a); +g.transform(1,0,a,1,0,0)};B.prototype.shearX=function(a){K.shearX(a)};E.prototype.shearY=function(a){K.shearY(a);g.transform(1,a,0,1,0,0)};B.prototype.shearY=function(a){K.shearY(a)};e.pushStyle=function(){g.save();e.pushMatrix();bd.push({doFill:R,currentFillColor:La,doStroke:C,currentStrokeColor:ja,curTint:gb,curRectMode:qa,curColorMode:Va,colorModeX:xa,colorModeZ:ya,colorModeY:Ea,colorModeA:ia,curTextFont:ba,horizontalTextAlignment:nb,verticalTextAlignment:Wa,textMode:ic,curFontName:zb,curTextSize:Na, +curTextAscent:Xa,curTextDescent:Ma,curTextLeading:Aa})};e.popStyle=function(){var a=bd.pop();if(a)Sa(),e.popMatrix(),R=a.doFill,La=a.currentFillColor,C=a.doStroke,ja=a.currentStrokeColor,gb=a.curTint,qa=a.curRectMode,Va=a.curColorMode,xa=a.colorModeX,ya=a.colorModeZ,Ea=a.colorModeY,ia=a.colorModeA,ba=a.curTextFont,zb=a.curFontName,Na=a.curTextSize,nb=a.horizontalTextAlignment,Wa=a.verticalTextAlignment,ic=a.textMode,Xa=a.curTextAscent,Ma=a.curTextDescent,Aa=a.curTextLeading;else throw"Too many popStyle() without enough pushStyle()"; +};e.year=function(){return(new Date).getFullYear()};e.month=function(){return(new Date).getMonth()+1};e.day=function(){return(new Date).getDate()};e.hour=function(){return(new Date).getHours()};e.minute=function(){return(new Date).getMinutes()};e.second=function(){return(new Date).getSeconds()};e.millis=function(){return Date.now()-Oc};E.prototype.redraw=function(){cb();g.lineWidth=ea;var a=e.pmouseX,b=e.pmouseY;e.pmouseX=cc;e.pmouseY=dc;g.save();e.draw();Sa();cc=e.mouseX;dc=e.mouseY;e.pmouseX=a; +e.pmouseY=b};B.prototype.redraw=function(){cb();var a=e.pmouseX,b=e.pmouseY;e.pmouseX=cc;e.pmouseY=dc;g.clear(g.DEPTH_BUFFER_BIT);Fa={attributes:{},locations:{}};e.noLights();e.lightFalloff(1,0,0);e.shininess(1);e.ambient(255,255,255);e.specular(0,0,0);e.emissive(0,0,0);e.camera();e.draw();cc=e.mouseX;dc=e.mouseY;e.pmouseX=a;e.pmouseY=b};e.noLoop=function(){eb=Da=!1;clearInterval(ma);da.onPause()};e.loop=function(){eb||(tc=Date.now(),ec=0,ma=l.setInterval(function(){try{da.onFrameStart(),e.redraw(), +da.onFrameEnd()}catch(a){throw l.clearInterval(ma),a;}},Kc),eb=Da=!0,da.onLoop())};e.frameRate=function(a){tb=a;Kc=1E3/tb;Da&&(e.noLoop(),e.loop())};e.exit=function(){l.clearInterval(ma);var a=e.externals.canvas.id;q.splice(Zb[a],1);delete Zb[a];delete S.onmousedown;for(var b in M.lib)M.lib.hasOwnProperty(b)&&M.lib[b].hasOwnProperty("detach")&&M.lib[b].detach(e);for(a=wb.length;a--;){var c=wb[a];b=c.elem;var d=c.type,c=c.fn;b.removeEventListener?b.removeEventListener(d,c,!1):b.detachEvent&&b.detachEvent("on"+ +d,c)}da.onExit()};e.cursor=function(){if(1b||0>c||c>=a.height||b>=a.width)throw"x and y must be non-negative and less than the dimensions of the image";}else b=a.width>>>1,c=a.height>>>1;a='url("'+a.toDataURL()+'") '+b+" "+c+", default";S.style.cursor=a}else S.style.cursor=1===arguments.length?arguments[0]:od};e.noCursor=function(){S.style.cursor= +c.NOCURSOR};e.link=function(a,b){b!==h?l.open(a,b):l.location=a};e.beginDraw=r;e.endDraw=r;E.prototype.toImageData=function(a,b,c,d){a=a!==h?a:0;b=b!==h?b:0;c=c!==h?c:e.width;d=d!==h?d:e.height;return g.getImageData(a,b,c,d)};B.prototype.toImageData=function(a,b,c,d){a=a!==h?a:0;b=b!==h?b:0;c=c!==h?c:e.width;d=d!==h?d:e.height;var f=p.createElement("canvas").getContext("2d").createImageData(c,d),k=new ga(4*c*d);g.readPixels(a,b,c,d,g.RGBA,g.UNSIGNED_BYTE,k);a=0;b=k.length;for(var w=f.data;a>>c-1&1);)c--;for(var e="";0>>--c&1?"1":"0";return e};e.unbinary=function(a){for(var b=a.length-1,c=1,e=0;0<=b;){var d=a[b--];if("0"!==d&&"1"!==d)throw"the value passed into unbinary was not an 8 bit binary number";"1"===d&&(e+=c);c<<=1}return e};e.hex=function(a,b){1===arguments.length&&(b=a instanceof Char?4: +8);var c=a,e=b,e=e===h||null===e?e=8:e;0>c&&(c=4294967295+c+1);for(c=Number(c).toString(16).toUpperCase();c.length=e&&(c=c.substring(c.length-e,c.length));return c};e.unhex=function(a){if(a instanceof Array){for(var b=[],c=0;c 0.5){ discard; } } if(uIsDrawingText == 1){ float alpha = texture2D(uSampler, vTextureCoord).a; gl_FragColor = vec4(vFrontColor.rgb * alpha, alpha); } else{ gl_FragColor = vFrontColor; }}"); +na=Ic(g,"varying vec4 vFrontColor;attribute vec3 aVertex;attribute vec4 aColor;uniform mat4 uView;uniform mat4 uProjection;uniform float uPointSize;void main(void) { vFrontColor = aColor; gl_PointSize = uPointSize; gl_Position = uProjection * uView * vec4(aVertex, 1.0);}","#ifdef GL_ES\nprecision highp float;\n#endif\nvarying vec4 vFrontColor;uniform bool uSmooth;void main(void){ if(uSmooth == true){ float dist = distance(gl_PointCoord, vec2(0.5)); if(dist > 0.5){ discard; } } gl_FragColor = vFrontColor;}"); +e.strokeWeight(1);y=Ic(g,td,"#ifdef GL_ES\nprecision highp float;\n#endif\nvarying vec4 vFrontColor;uniform sampler2D uSampler;uniform bool uUsingTexture;varying vec2 vTexture;void main(void){ if( uUsingTexture ){ gl_FragColor = vec4(texture2D(uSampler, vTexture.xy)) * vFrontColor; } else{ gl_FragColor = vFrontColor; }}");g.useProgram(y);Y("usingTexture3d",y,"usingTexture",ua);e.lightFalloff(1,0,0);e.shininess(1);e.ambient(255,255,255);e.specular(0,0,0);e.emissive(0,0,0);wc=g.createBuffer(); +g.bindBuffer(g.ARRAY_BUFFER,wc);g.bufferData(g.ARRAY_BUFFER,cd,g.STATIC_DRAW);xc=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,xc);g.bufferData(g.ARRAY_BUFFER,rd,g.STATIC_DRAW);yc=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,yc);g.bufferData(g.ARRAY_BUFFER,dd,g.STATIC_DRAW);gc=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,gc);g.bufferData(g.ARRAY_BUFFER,Hc,g.STATIC_DRAW);zc=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,zc);g.bufferData(g.ARRAY_BUFFER,sd,g.STATIC_DRAW);Tb=g.createBuffer();Ac=g.createBuffer(); +Pc=g.createBuffer();Bc=g.createBuffer();Qc=g.createBuffer();Rc=g.createBuffer();hc=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,hc);g.bufferData(g.ARRAY_BUFFER,new A([0,0,0]),g.STATIC_DRAW);Cc=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,Cc);g.bufferData(g.ARRAY_BUFFER,new A([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),g.STATIC_DRAW);Dc=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,Dc);g.bufferData(g.ARRAY_BUFFER,new A([0,0,1,0,1,1,0,1]),g.STATIC_DRAW);Ec=g.createBuffer();g.bindBuffer(g.ELEMENT_ARRAY_BUFFER,Ec); +g.bufferData(g.ELEMENT_ARRAY_BUFFER,new v([0,1,2,2,3,0]),g.STATIC_DRAW);qb=new I;Ra=new I;K=new I;fa=new I;Ha=new I;e.camera();e.perspective();Ab=new Za;Bb=new Za;Sb=new I;fc=new I;xb=new I;yb=new I;uc=new I;vc=new I;vc.set(-1,3,-3,1,3,-6,3,0,-3,3,0,0,1,0,0,0);W.prototype.size.apply(this,arguments)}}();E.prototype.ambientLight=W.prototype.a3DOnlyFunction;B.prototype.ambientLight=function(a,b,e,d,f,h){if(O===c.MAX_LIGHTS)throw"can only create "+c.MAX_LIGHTS+" lights";d=new PVector(d,f,h);f=new I;f.scale(1, +-1,1);f.apply(K.array());f.mult(d,d);a=ta(a,b,e,0);a=[((a&c.RED_MASK)>>>16)/255,((a&c.GREEN_MASK)>>>8)/255,(a&c.BLUE_MASK)/255];g.useProgram(y);T("uLights.color.3d."+O,y,"uLights"+O+".color",a);T("uLights.position.3d."+O,y,"uLights"+O+".position",d.array());Y("uLights.type.3d."+O,y,"uLights"+O+".type",0);Y("uLightCount3d",y,"uLightCount",++O)};E.prototype.directionalLight=W.prototype.a3DOnlyFunction;B.prototype.directionalLight=function(a,b,e,d,f,h){if(O===c.MAX_LIGHTS)throw"can only create "+c.MAX_LIGHTS+ +" lights";g.useProgram(y);var k=new I;k.scale(1,-1,1);k.apply(K.array());k=k.array();d=[k[0]*d+k[4]*f+k[8]*h,k[1]*d+k[5]*f+k[9]*h,k[2]*d+k[6]*f+k[10]*h];a=ta(a,b,e,0);T("uLights.color.3d."+O,y,"uLights"+O+".color",[((a&c.RED_MASK)>>>16)/255,((a&c.GREEN_MASK)>>>8)/255,(a&c.BLUE_MASK)/255]);T("uLights.position.3d."+O,y,"uLights"+O+".position",d);Y("uLights.type.3d."+O,y,"uLights"+O+".type",1);Y("uLightCount3d",y,"uLightCount",++O)};E.prototype.lightFalloff=W.prototype.a3DOnlyFunction;B.prototype.lightFalloff= +function(a,b,c){g.useProgram(y);T("uFalloff3d",y,"uFalloff",[a,b,c])};E.prototype.lightSpecular=W.prototype.a3DOnlyFunction;B.prototype.lightSpecular=function(a,b,e){a=ta(a,b,e,0);a=[((a&c.RED_MASK)>>>16)/255,((a&c.GREEN_MASK)>>>8)/255,(a&c.BLUE_MASK)/255];g.useProgram(y);T("uSpecular3d",y,"uSpecular",a)};e.lights=function(){e.ambientLight(128,128,128);e.directionalLight(128,128,128,0,0,-1);e.lightFalloff(1,0,0);e.lightSpecular(0,0,0)};E.prototype.pointLight=W.prototype.a3DOnlyFunction;B.prototype.pointLight= +function(a,b,e,d,f,h){if(O===c.MAX_LIGHTS)throw"can only create "+c.MAX_LIGHTS+" lights";d=new PVector(d,f,h);f=new I;f.scale(1,-1,1);f.apply(K.array());f.mult(d,d);a=ta(a,b,e,0);a=[((a&c.RED_MASK)>>>16)/255,((a&c.GREEN_MASK)>>>8)/255,(a&c.BLUE_MASK)/255];g.useProgram(y);T("uLights.color.3d."+O,y,"uLights"+O+".color",a);T("uLights.position.3d."+O,y,"uLights"+O+".position",d.array());Y("uLights.type.3d."+O,y,"uLights"+O+".type",2);Y("uLightCount3d",y,"uLightCount",++O)};E.prototype.noLights=W.prototype.a3DOnlyFunction; +B.prototype.noLights=function(){O=0;g.useProgram(y);Y("uLightCount3d",y,"uLightCount",O)};E.prototype.spotLight=W.prototype.a3DOnlyFunction;B.prototype.spotLight=function(a,b,e,d,f,h,k,l,s,m,n){if(O===c.MAX_LIGHTS)throw"can only create "+c.MAX_LIGHTS+" lights";g.useProgram(y);d=new PVector(d,f,h);f=new I;f.scale(1,-1,1);f.apply(K.array());f.mult(d,d);f=f.array();k=[f[0]*k+f[4]*l+f[8]*s,f[1]*k+f[5]*l+f[9]*s,f[2]*k+f[6]*l+f[10]*s];a=ta(a,b,e,0);T("uLights.color.3d."+O,y,"uLights"+O+".color",[((a&c.RED_MASK)>>> +16)/255,((a&c.GREEN_MASK)>>>8)/255,(a&c.BLUE_MASK)/255]);T("uLights.position.3d."+O,y,"uLights"+O+".position",d.array());T("uLights.direction.3d."+O,y,"uLights"+O+".direction",k);T("uLights.concentration.3d."+O,y,"uLights"+O+".concentration",n);T("uLights.angle.3d."+O,y,"uLights"+O+".angle",m);Y("uLights.type.3d."+O,y,"uLights"+O+".type",3);Y("uLightCount3d",y,"uLightCount",++O)};E.prototype.beginCamera=function(){throw"beginCamera() is not available in 2D mode";};B.prototype.beginCamera=function(){if(kc)throw"You cannot call beginCamera() again before calling endCamera()"; +kc=!0;K=Ra;fa=qb};E.prototype.endCamera=function(){throw"endCamera() is not available in 2D mode";};B.prototype.endCamera=function(){if(!kc)throw"You cannot call endCamera() before calling beginCamera()";K.set(qb);fa.set(Ra);kc=!1};e.camera=function(a,b,c,d,f,g,k,l,s){a===h&&(Gc=e.width/2,rb=e.height/2,sb=rb/Math.tan(lc/2),a=Gc,b=rb,c=sb,d=Gc,f=rb,k=g=0,l=1,s=0);d=new PVector(a-d,b-f,c-g);var m=new PVector(k,l,s);d.normalize();s=PVector.cross(m,d);m=PVector.cross(d,s);s.normalize();m.normalize(); +k=s.x;l=s.y;s=s.z;f=m.x;g=m.y;var m=m.z,n=d.x,p=d.y;d=d.z;qb.set(k,l,s,0,f,g,m,0,n,p,d,0,0,0,0,1);qb.translate(-a,-b,-c);Ra.reset();Ra.invApply(k,l,s,0,f,g,m,0,n,p,d,0,0,0,0,1);Ra.translate(a,b,c);K.set(qb);fa.set(Ra)};e.perspective=function(a,b,c,d){0===arguments.length&&(rb=S.height/2,sb=rb/Math.tan(lc/2),Zc=sb/10,$c=10*sb,ad=e.width/e.height,a=lc,b=ad,c=Zc,d=$c);var f,g;f=c*Math.tan(a/2);g=-f;e.frustum(g*b,f*b,g,f,c,d)};E.prototype.frustum=function(){throw"Processing.js: frustum() is not supported in 2D mode"; +};B.prototype.frustum=function(a,b,c,e,d,f){Ha=new I;Ha.set(2*d/(b-a),0,(b+a)/(b-a),0,0,2*d/(e-c),(e+c)/(e-c),0,0,0,-(f+d)/(f-d),-(2*f*d)/(f-d),0,0,-1,0);a=new I;a.set(Ha);a.transpose();g.useProgram(J);U("projection2d",J,"uProjection",!1,a.array());g.useProgram(y);U("projection3d",y,"uProjection",!1,a.array());g.useProgram(na);U("uProjectionUS",na,"uProjection",!1,a.array())};e.ortho=function(a,b,c,d,f,h){0===arguments.length&&(a=0,b=e.width,c=0,d=e.height,f=-10,h=10);var k=2/(b-a),l=2/(d-c),s=-2/ +(h-f),m=-(b+a)/(b-a),n=-(d+c)/(d-c),p=-(h+f)/(h-f);Ha=new I;Ha.set(k,0,0,m,0,l,0,n,0,0,s,p,0,0,0,1);k=new I;k.set(Ha);k.transpose();g.useProgram(J);U("projection2d",J,"uProjection",!1,k.array());g.useProgram(y);U("projection3d",y,"uProjection",!1,k.array());g.useProgram(na);U("uProjectionUS",na,"uProjection",!1,k.array())};e.printProjection=function(){Ha.print()};e.printCamera=function(){qb.print()};E.prototype.box=W.prototype.a3DOnlyFunction;B.prototype.box=function(a,b,c){b&&c||(b=c=a);var e=new I; +e.scale(a,b,c);a=new I;a.scale(1,-1,1);a.apply(K.array());a.transpose();R&&(g.useProgram(y),U("model3d",y,"uModel",!1,e.array()),U("view3d",y,"uView",!1,a.array()),g.enable(g.POLYGON_OFFSET_FILL),g.polygonOffset(1,1),T("color3d",y,"uColor",ka),0a&&(a=3);2>b&&(b=2);if(a!==pb|| +b!==jc){var d=c.SINCOS_LENGTH/a,f=new A(a),h=new A(a);for(e=0;epb||2>jc)&&e.sphereDetail(30);var b=new I;b.scale(a,a,a);a=new I;a.scale(1,-1,1);a.apply(K.array());a.transpose();if(R){if(0d?0:d,f=1f?0:f);g[0]=a;g[1]=b;g[2]=e||0;g[3]=d||0;g[4]=f||0;g[5]=ka[0];g[6]=ka[1];g[7]=ka[2];g[8]=ka[3];g[9]=X[0];g[10]=X[1];g[11]=X[2];g[12]=X[3];g[13]=Gb;g[14]=Eb;g[15]=ub;t.push(g)};var gd=function(a, +b){var c=new I;c.scale(1,-1,1);c.apply(K.array());c.transpose();g.useProgram(na);U("uViewUS",na,"uView",!1,c.array());Y("uSmoothUS",na,"uSmooth",ra);Z("aVertexUS",na,"aVertex",3,hc);g.bufferData(g.ARRAY_BUFFER,new A(a),g.STREAM_DRAW);Z("aColorUS",na,"aColor",4,Bc);g.bufferData(g.ARRAY_BUFFER,new A(b),g.STREAM_DRAW);g.drawArrays(g.POINTS,0,a.length/3)},Ca=function(a,b,c){b="LINES"===b?g.LINES:"LINE_LOOP"===b?g.LINE_LOOP:g.LINE_STRIP;var e=new I;e.scale(1,-1,1);e.apply(K.array());e.transpose();g.useProgram(na); +U("uViewUS",na,"uView",!1,e.array());Z("aVertexUS",na,"aVertex",3,Ac);g.bufferData(g.ARRAY_BUFFER,new A(a),g.STREAM_DRAW);Z("aColorUS",na,"aColor",4,Qc);g.bufferData(g.ARRAY_BUFFER,new A(c),g.STREAM_DRAW);g.drawArrays(b,0,a.length/3)},$a=function(a,b,c,e){b="TRIANGLES"===b?g.TRIANGLES:"TRIANGLE_FAN"===b?g.TRIANGLE_FAN:g.TRIANGLE_STRIP;var d=new I;d.scale(1,-1,1);d.apply(K.array());d.transpose();g.useProgram(y);U("model3d",y,"uModel",!1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);U("view3d",y,"uView",!1,d.array()); +g.enable(g.POLYGON_OFFSET_FILL);g.polygonOffset(1,1);T("color3d",y,"uColor",[-1,0,0,0]);Z("vertex3d",y,"aVertex",3,Pc);g.bufferData(g.ARRAY_BUFFER,new A(a),g.STREAM_DRAW);ua&&null!==gb&&sc(c);Z("aColor3d",y,"aColor",4,Bc);g.bufferData(g.ARRAY_BUFFER,new A(c),g.STREAM_DRAW);sa("aNormal3d",y,"aNormal");ua&&(Y("uUsingTexture3d",y,"uUsingTexture",ua),Z("aTexture3d",y,"aTexture",2,Rc),g.bufferData(g.ARRAY_BUFFER,new A(e),g.STREAM_DRAW));g.drawArrays(b,0,a.length/3);g.disable(g.POLYGON_OFFSET_FILL)};E.prototype.endShape= +function(a){if(0!==t.length){(a=a===c.CLOSE)&&t.push(t[0]);var b=[],d=[],f=[],k=[],l;ib=!0;var w,m,s=t.length;for(w=0;wm;m++)b.push(l[m]);for(w=0;wm;m++)d.push(l[m]);for(w=0;wm;m++)f.push(l[m]);for(w=0;wm;m++)g.lineTo(t[w+m][0],t[w+m][1]);g.lineTo(l[0],l[1]);R&&(e.fill(t[w+3][5]),wa());C&&(e.stroke(t[w+3][6]),za());g.closePath()}else if(aa===c.QUAD_STRIP){if(3s;s++)e.push(l[s]);for(m=0;ms;s++)d.push(l[s]);for(m=0;ms;s++)f.push(l[s]);for(m=0;mm;m++)d.push(t[0][m]);for(m=9;13>m;m++)f.push(t[0][m]);k.push(t[0][3]);k.push(t[0][4])}if(!Cb||aa!==c.POLYGON&&aa!==h)if(!Db||aa!==c.POLYGON&&aa!==h){if(aa===c.POINTS){for(m=0;ms;s++)a.push(l[s]);gd(a,f)}else if(aa===c.LINES){for(m=0;ms;s++)a.push(l[s]);for(m=0;ms;s++)d.push(l[s]);Ca(a,"LINES",f)}else if(aa===c.TRIANGLES){if(2s;s++)for(b=0;3>b;b++)a.push(t[m+ +s][b]),e.push(t[m+s][b]);for(s=0;3>s;s++)for(b=3;5>b;b++)k.push(t[m+s][b]);for(s=0;3>s;s++)for(b=5;9>b;b++)d.push(t[m+s][b]),f.push(t[m+s][b+4]);C&&Ca(a,"LINE_LOOP",f);(R||ua)&&$a(e,"TRIANGLES",d,k)}}else if(aa===c.TRIANGLE_STRIP){if(2s;s++)for(b=0;3>b;b++)a.push(t[m+s][b]),e.push(t[m+s][b]);for(s=0;3>s;s++)for(b=3;5>b;b++)k.push(t[m+s][b]);for(s=0;3>s;s++)for(b=5;9>b;b++)f.push(t[m+s][b+4]),d.push(t[m+s][b]);(R||ua)&&$a(e,"TRIANGLE_STRIP", +d,k);C&&Ca(a,"LINE_LOOP",f)}}else if(aa===c.TRIANGLE_FAN){if(2m;m++)for(l=t[m],s=0;3>s;s++)a.push(l[s]);for(m=0;3>m;m++)for(l=t[m],s=9;13>s;s++)f.push(l[s]);C&&Ca(a,"LINE_LOOP",f);for(m=2;m+1s;s++)for(b=0;3>b;b++)a.push(t[m+s][b]);for(s=0;2>s;s++)for(b=9;13>b;b++)f.push(t[m+s][b]);C&&Ca(a,"LINE_STRIP",f)}(R||ua)&&$a(e,"TRIANGLE_FAN",d,k)}}else if(aa=== +c.QUADS)for(m=0;m+3s;s++)for(l=t[m+s],b=0;3>b;b++)a.push(l[b]);C&&Ca(a,"LINE_LOOP",f);if(R){e=[];d=[];k=[];for(s=0;3>s;s++)e.push(t[m][s]);for(s=5;9>s;s++)d.push(t[m][s]);for(s=0;3>s;s++)e.push(t[m+1][s]);for(s=5;9>s;s++)d.push(t[m+1][s]);for(s=0;3>s;s++)e.push(t[m+3][s]);for(s=5;9>s;s++)d.push(t[m+3][s]);for(s=0;3>s;s++)e.push(t[m+2][s]);for(s=5;9>s;s++)d.push(t[m+2][s]);ua&&(k.push(t[m+0][3]),k.push(t[m+0][4]),k.push(t[m+1][3]),k.push(t[m+1][4]),k.push(t[m+3][3]),k.push(t[m+ +3][4]),k.push(t[m+2][3]),k.push(t[m+2][4]));$a(e,"TRIANGLE_STRIP",d,k)}}else if(aa===c.QUAD_STRIP){if(3m;m++)for(l=t[m],s=0;3>s;s++)a.push(l[s]);for(m=0;2>m;m++)for(l=t[m],s=9;13>s;s++)f.push(l[s]);Ca(a,"LINE_STRIP",f);4s;s++)a.push(t[m+1][s]);for(s=0;3>s;s++)a.push(t[m+3][s]);for(s=0;3>s;s++)a.push(t[m+2][s]);for(s=0;3>s;s++)a.push(t[m+0][s]);for(s=9;13>s;s++)f.push(t[m+1][s]);for(s=9;13>s;s++)f.push(t[m+ +3][s]);for(s=9;13>s;s++)f.push(t[m+2][s]);for(s=9;13>s;s++)f.push(t[m+0][s]);C&&Ca(a,"LINE_STRIP",f)}(R||ua)&&$a(e,"TRIANGLE_LIST",d,k)}}else if(1===n){for(s=0;3>s;s++)a.push(t[0][s]);for(s=9;13>s;s++)f.push(t[0][s]);gd(a,f)}else{for(m=0;ms;s++)a.push(l[s]);for(s=5;9>s;s++)f.push(l[s])}C&&b?Ca(a,"LINE_LOOP",f):C&&!b&&Ca(a,"LINE_STRIP",f);(R||ua)&&$a(e,"TRIANGLE_FAN",d,k)}ua=!1;g.useProgram(y);Y("usingTexture3d",y,"uUsingTexture",ua)}else a=e,a.splice(a.length-3),f.splice(f.length- +4),C&&Ca(a,null,f),R&&$a(e,"TRIANGLES",d);else C&&Ca(e,null,f),R&&$a(e,null,d);Db=Cb=!1;va=[];oa=0}};var hd=function(a,b){var c=1/a,e=c*c,d=e*c;b.set(0,0,0,1,d,e,c,0,6*d,2*e,0,0,6*d,0,0,0)},id=function(){xb||(Sb=new I,xb=new I,Lc=!0);var a=oc;Sb.set((a-1)/2,(a+3)/2,(-3-a)/2,(1-a)/2,1-a,(-5-a)/2,a+2,(a-1)/2,(a-1)/2,0,(1-a)/2,0,0,1,0,0);hd(pc,xb);uc||(fc=new I);fc.set(Sb);fc.preApply(uc);xb.apply(Sb)};E.prototype.bezierVertex=function(){Db=!0;var a=[];if(ib)throw"vertex() must be used at least once before calling bezierVertex()"; +for(var b=0;b=d||hg;)g+=c.TWO_PI,h+=c.TWO_PI;h-g>c.TWO_PI&&(g=0,h=c.TWO_PI);d/=2;f/=2;a+=d;b+=f;g=0|0.5+2*g*e.RAD_TO_DEG;h=0|0.5+2*h*e.RAD_TO_DEG;var k,l;if(R){var m=C;C=!1;e.beginShape();e.vertex(a,b);for(k= +g;k<=h;k++)l=k%c.SINCOS_LENGTH,e.vertex(a+Vb[l]*d,b+Ub[l]*f);e.endShape(c.CLOSE);C=m}if(C){m=R;R=!1;e.beginShape();for(k=g;k<=h;k++)l=k%c.SINCOS_LENGTH,e.vertex(a+Vb[l]*d,b+Ub[l]*f);e.endShape();R=m}}};E.prototype.line=function(a,b,c,d){if(C)if(a=Math.round(a),c=Math.round(c),b=Math.round(b),d=Math.round(d),a===c&&b===d)e.point(a,b);else{for(var f=h,k=h,l=!0,f=K.array(),m=[1,0,0,0,1,0],s=0;6>s&&l;s++)l=f[s]===m[s];l&&(a===c?(b>d&&(f=b,b=d,d=f),d++,1===ea%2&&g.translate(0.5,0)):b===d&&(a>c&&(f=a,a= +c,c=f),c++,1===ea%2&&g.translate(0,0.5)),1===ea&&(k=g.lineCap,g.lineCap="butt"));g.beginPath();g.moveTo(a||0,b||0);g.lineTo(c||0,d||0);za();l&&(a===c&&1===ea%2?g.translate(-0.5,0):b===d&&1===ea%2&&g.translate(0,-0.5),1===ea&&(g.lineCap=k))}};B.prototype.line=function(a,b,c,d,f,k){if(f===h||k===h)k=0,f=d,d=c,c=0;a===d&&b===f&&c===k?e.point(a,b,c):(a=[a,b,c,d,f,k],b=new I,b.scale(1,-1,1),b.apply(K.array()),b.transpose(),0s||f>n)f=Math.min(s,n);if(k>s||k>n)k=Math.min(s,n);if(l>s||l>n)l=Math.min(s,n);if(m>s||m>n)m=Math.min(s,n);R&&!C||g.translate(0.5,0.5);g.beginPath();g.moveTo(a+f,b);g.lineTo(a+e-k,b);g.quadraticCurveTo(a+e,b,a+e,b+k);g.lineTo(a+ +e,b+d-l);g.quadraticCurveTo(a+e,b+d,a+e-l,b+d);g.lineTo(a+m,b+d);g.quadraticCurveTo(a,b+d,a,b+d-m);g.lineTo(a,b+f);g.quadraticCurveTo(a,b,a+f,b);R&&!C||g.translate(-0.5,-0.5);wa();za()}else C&&1===ea%2&&g.translate(0.5,0.5),g.beginPath(),g.rect(a,b,e,d),wa(),za(),C&&1===ea%2&&g.translate(-0.5,-0.5)};B.prototype.rect=function(a,b,e,d,f,k,l,m){if(f!==h)throw"rect() with rounded corners is not supported in 3D mode";qa===c.CORNERS?(e-=a,d-=b):qa===c.RADIUS?(e*=2,d*=2,a-=e/2,b-=d/2):qa===c.CENTER&&(a-= +e/2,b-=d/2);f=new I;f.translate(a,b,0);f.scale(e,d,1);f.transpose();b=new I;b.scale(1,-1,1);b.apply(K.array());b.transpose();0=d&&0>=f))if(la===c.RADIUS?(d*=2,f*=2):la=== +c.CORNERS?(d-=a,f-=b,a+=d/2,b+=f/2):la===c.CORNER&&(a+=d/2,b+=f/2),d===f)g.beginPath(),g.arc(a,b,d/2,0,c.TWO_PI,!1),wa(),za();else{d/=2;f/=2;var h=0.5522847498307933*d,k=0.5522847498307933*f;e.beginShape();e.vertex(a+d,b);e.bezierVertex(a+d,b-k,a+h,b-f,a,b-f);e.bezierVertex(a-h,b-f,a-d,b-k,a-d,b);e.bezierVertex(a-d,b+k,a-h,b+f,a,b+f);e.bezierVertex(a+h,b+f,a+d,b+k,a+d,b);e.endShape()}};B.prototype.ellipse=function(a,b,d,f){a=a||0;b=b||0;if(!(0>=d&&0>=f)){la===c.RADIUS?(d*=2,f*=2):la===c.CORNERS?(d-= +a,f-=b,a+=d/2,b+=f/2):la===c.CORNER&&(a+=d/2,b+=f/2);d/=2;f/=2;var g=0.5522847498307933*d,h=0.5522847498307933*f;e.beginShape();e.vertex(a+d,b);e.bezierVertex(a+d,b-h,0,a+g,b-f,0,a,b-f,0);e.bezierVertex(a-g,b-f,0,a-d,b-h,0,a-d,b,0);e.bezierVertex(a-d,b+h,0,a-g,b+f,0,a,b+f,0);e.bezierVertex(a+g,b+f,0,a+d,b+h,0,a+d,b,0);e.endShape();if(R){for(g=f=d=0;gd;d++)a.push(t[g][d]);for(d=5;9>d;d++)b.push(t[g][d])}$a(a,"TRIANGLE_FAN",b)}}};e.normal=function(a,b,d){if(3!==arguments.length||"number"!==typeof a||"number"!==typeof b||"number"!==typeof d)throw"normal() requires three numeric arguments.";Gb=a;Eb=b;ub=d;0!==aa&&(jb===c.NORMAL_MODE_AUTO?jb=c.NORMAL_MODE_SHAPE:jb===c.NORMAL_MODE_SHAPE&&(jb=c.NORMAL_MODE_VERTEX))};e.save=function(a, +b){return b!==h?l.open(b.toDataURL(),"_blank"):l.open(e.externals.canvas.toDataURL(),"_blank")};var wd=0;e.saveFrame=function(a){a===h&&(a="screen-####.png");a=a.replace(/#+/,function(a){for(var b=""+wd++;b.length=e.width||0>a||0>b||b>=e.height?d=0:Rb?(a=4*((0|a)+e.width*(0|b)),d=e.imageData.data,d=d[a+3]<<24&c.ALPHA_MASK| +d[a]<<16&c.RED_MASK|d[a+1]<<8&c.GREEN_MASK|d[a+2]&c.BLUE_MASK):(d=e.toImageData(0|a,0|b,1,1).data,d=d[3]<<24&c.ALPHA_MASK|d[0]<<16&c.RED_MASK|d[1]<<8&c.GREEN_MASK|d[2]&c.BLUE_MASK),d):void 0!==a?Lb(0,0,a.width,a.height,a):Kb(0,0,e.width,e.height)};e.createGraphics=function(a,b,c){var d=new M;d.size(a,b,c);d.background(0,0);return d};e.set=function(a,b,c,d){if(3===arguments.length)"number"===typeof c?aYc&&fb()):(c instanceof Ga||c.__isPImage)&&e.image(c,a,b);else if(4===arguments.length){if(d.isRemote)throw"Image is loaded remotely. Cannot set x,y.";var f=e.color.toArray(c),h=4*b*d.width+4*a,k=d.imageData.data;k[h]=f[0];k[h+1]=f[1];k[h+2]=f[2];k[h+3]=f[3]}};e.imageData={};e.pixels={getLength:function(){return e.imageData.data.length?e.imageData.data.length/4:0},getPixel:function(a){a*=4;var b=e.imageData.data;return b[a+3]<<24&4278190080|b[a+0]<< +16&16711680|b[a+1]<<8&65280|b[a+2]&255},setPixel:function(a,b){var c=4*a,d=e.imageData.data;d[c+0]=(b&16711680)>>>16;d[c+1]=(b&65280)>>>8;d[c+2]=b&255;d[c+3]=(b&4278190080)>>>24},toArray:function(){for(var a=[],b=e.imageData.width*e.imageData.height,c=e.imageData.data,d=0,f=0;darguments.length);if(a.sourceImg&&null===gb){var h=a.sourceImg;a.__isDirty&&a.updatePixels();g.drawImage(h,0,0,h.width,h.height,f.x,f.y,f.w,f.h)}else h=a.toImageData(),null!==gb&&(gb(h),a.__isDirty=!0),g.drawImage(Ja(h).canvas,0,0,a.width,a.height,f.x, +f.y,f.w,f.h)}};B.prototype.image=function(a,b,c,d,f){0=g&&(l=c),0>n&&(n=0),p>=d&&(p=c),n=b.pixels.getPixel(n),m=b.pixels.getPixel(m),p=b.pixels.getPixel(p),l=b.pixels.getPixel(l),h=77*(h>>16&255)+ +151*(h>>8&255)+28*(h&255),t=77*(m>>16&255)+151*(m>>8&255)+28*(m&255),r=77*(l>>16&255)+151*(l>>8&255)+28*(l&255),q=77*(n>>16&255)+151*(n>>8&255)+28*(n&255),v=77*(p>>16&255)+151*(p>>8&255)+28*(p&255),t=g&&(l=c),0>n&&(n=0),p>=d&&(p=c),n=b.pixels.getPixel(n),m=b.pixels.getPixel(m),p=b.pixels.getPixel(p),l=b.pixels.getPixel(l), +h=77*(h>>16&255)+151*(h>>8&255)+28*(h&255),t=77*(m>>16&255)+151*(m>>8&255)+28*(m&255),r=77*(l>>16&255)+151*(l>>8&255)+28*(l&255),q=77*(n>>16&255)+151*(n>>8&255)+28*(n&255),v=77*(p>>16&255)+151*(p>>8&255)+28*(p&255),t>h&&(k=m,h=t),r>h&&(k=l,h=r),q>h&&(k=n,h=q),v>h&&(k=p),e[c++]=k;b.pixels.set(e)};e.filter=function(a,b,d){var f,g,k,l;3===arguments.length?(d.loadPixels(),f=d):(e.loadPixels(),f=e);b===h&&(b=null);if(f.isRemote)throw"Image is loaded remotely. Cannot filter image.";var m=f.pixels.getLength(); +switch(a){case c.BLUR:var n=b||1,p=f,r,t,q,v,u,x,y,C,D;k=p.pixels.getLength();l=new A(k);m=new A(k);g=new A(k);k=new A(k);var F=0,G,E,H,n=e.floor(3.5*n),B,n=1>n?1:248>n?n:248;if(e.shared.blurRadius!==n){e.shared.blurRadius=n;e.shared.blurKernelSize=1+(e.shared.blurRadius<<1);e.shared.blurKernel=new A(e.shared.blurKernelSize);var I=e.shared.blurKernel,J=e.shared.blurKernelSize;for(B=0;Bx)u=-x,x=0;else{if(x>=B)break;u=0}for(H=u;H=B);H++)y=4*(x+F),u=J[H],v+=u*K[y+3],r+=u*K[y],t+=u*K[y+1],q+=u*K[y+2],p+=u,x++;y=F+G;k[y]=v/p;l[y]=r/p;m[y]=t/p;g[y]=q/p}F+=B}F=0;C=-C;D=C*B;for(E=0;EC)u=y=-C,x=G;else{if(C>=n)break;u=0;y=C;x=G+D}for(H=u;H=n);H++)u=J[H],v+=u*k[x],r+=u*l[x],t+=u*m[x],q+=u*g[x],p+=u,y++,x+=B;y= +4*(G+F);K[y]=r/p;K[y+1]=t/p;K[y+2]=q/p;K[y+3]=v/p}F+=B;D+=B;C++}break;case c.GRAY:if(f.format===c.ALPHA){for(l=0;l>16&255)+151*(g>>8&255)+28*(g&255)>>8,f.pixels.setPixel(l,g&c.ALPHA_MASK|k<<16|k<<8|k);break;case c.INVERT:for(l=0;lg||255>16&255,n=f.pixels.getPixel(l)>>8&255,B=f.pixels.getPixel(l)&255,F=255*(F*g>>8)/k,n=255*(n*g>>8)/k,B=255*(B*g>>8)/k,f.pixels.setPixel(l,4278190080&f.pixels.getPixel(l)|F<<16|n<<8|B);break;case c.OPAQUE:for(l=0;lb||1>16,e.max((f.pixels.getPixel(l)&c.GREEN_MASK)>>8,f.pixels.getPixel(l)&c.BLUE_MASK)),f.pixels.setPixel(l,f.pixels.getPixel(l)&c.ALPHA_MASK|(kc&&(g=c)):(a=c+a-e,g>a&&(g=a));fd&&(h=d)):(b=d+b-f,h>b&&(h=b));return!(0>=g||0>=h)};var pa={};pa[c.BLEND]=e.modes.blend;pa[c.ADD]=e.modes.add;pa[c.SUBTRACT]=e.modes.subtract;pa[c.LIGHTEST]=e.modes.lightest;pa[c.DARKEST]=e.modes.darkest;pa[c.REPLACE]=e.modes.replace;pa[c.DIFFERENCE]=e.modes.difference;pa[c.EXCLUSION]=e.modes.exclusion;pa[c.MULTIPLY]=e.modes.multiply;pa[c.SCREEN]= +e.modes.screen;pa[c.OVERLAY]=e.modes.overlay;pa[c.HARD_LIGHT]=e.modes.hard_light;pa[c.SOFT_LIGHT]=e.modes.soft_light;pa[c.DODGE]=e.modes.dodge;pa[c.BURN]=e.modes.burn;e.blit_resize=function(a,b,d,f,g,h,k,l,m,n,p,r,t){0>b&&(b=0);0>d&&(d=0);f>=a.width&&(f=a.width-1);g>=a.height&&(g=a.height-1);f-=b;g-=d;p-=m;r-=n;if(!(0>=p||0>=r||0>=f||0>=g||m>=k||n>=l||b>=a.width||d>=a.height)){f=Math.floor(f/p*c.PRECISIONF);g=Math.floor(g/r*c.PRECISIONF);var q=e.shared;q.srcXOffset=Math.floor(0>m?-m*f:b*c.PRECISIONF); +q.srcYOffset=Math.floor(0>n?-n*g:d*c.PRECISIONF);0>m&&(p+=m,m=0);0>n&&(r+=n,n=0);p=Math.min(p,k-m);r=Math.min(r,l-n);b=n*k+m;var v;q.srcBuffer=a.imageData.data;q.iw=a.width;q.iw1=a.width-1;q.ih1=a.height-1;d=pa[t];var u,x,y,C;m=c.ALPHA_MASK;n=c.RED_MASK;var A=c.GREEN_MASK,B=c.BLUE_MASK,F=c.PREC_MAXVAL,D=c.PRECISIONB,G=c.PREC_RED_SHIFT,H=c.PREC_ALPHA_SHIFT,E=q.srcBuffer,I=Math.min;for(t=0;t>D)*q.iw;q.v2=I((q.srcYOffset>> +D)+1,q.ih1)*q.iw;for(a=0;a>D,q.ll=q.ifU*q.fracV>>D,q.ur=q.fracU*q.ifV>>D,q.lr=q.fracU*q.fracV>>D,q.u1=q.sX>>D,q.u2=I(q.u1+1,q.iw1),u=4*(q.v1+q.u1),x=4*(q.v1+q.u2),y=4*(q.v2+q.u1),C=4*(q.v2+q.u2),q.cUL=E[u+3]<<24&m|E[u]<<16&n|E[u+1]<<8&A|E[u+2]&B,q.cUR=E[x+3]<<24&m|E[x]<<16&n|E[x+1]<<8&A|E[x+2]&B,q.cLL=E[y+3]<<24&m|E[y]<<16&n|E[y+1]<<8&A|E[y+2]&B,q.cLR=E[C+3]<<24&m|E[C]<<16&n|E[C+1]<<8&A| +E[C+2]&B,q.r=q.ul*((q.cUL&n)>>16)+q.ll*((q.cLL&n)>>16)+q.ur*((q.cUR&n)>>16)+q.lr*((q.cLR&n)>>16)<>>D&A,q.b=q.ul*(q.cUL&B)+q.ll*(q.cLL&B)+q.ur*(q.cUR&B)+q.lr*(q.cLR&B)>>>D,q.a=q.ul*((q.cUL&m)>>>24)+q.ll*((q.cLL&m)>>>24)+q.ur*((q.cUR&m)>>>24)+q.lr*((q.cLR&m)>>>24)<>>16,h[l+1]=(v&A)>>>8,h[l+2]=v&B,h[l+3]=(v&m)>>>24,q.sX+=f;b+=k;q.srcYOffset+=g}}};e.loadFont=function(a,b){if(a===h)throw"font name required in loadFont."; +if(-1===a.indexOf(".svg"))return b===h&&(b=ba.size),PFont.get(a,b);var c=e.loadGlyphs(a);return{name:a,css:"12px sans-serif",glyph:!0,units_per_em:c.units_per_em,horiz_adv_x:1/c.units_per_em*c.horiz_adv_x,ascent:c.ascent,descent:c.descent,width:function(b){for(var c=0,d=b.length,f=0;f":return a.greater;case "?":return a.question;case "@":return a.at;case "[":return a.bracketleft;case "\\":return a.backslash;case "]":return a.bracketright;case "^":return a.asciicircum;case "`":return a.grave;case "{":return a.braceleft;case "|":return a.bar;case "}":return a.braceright;case "~":return a.asciitilde;default:return a[b]}}catch(c){M.debug(c)}};E.prototype.text$line=function(a,b,d,f,h){f=f=0;if(ba.glyph){f= +e.glyphTable[zb];g.save();g.translate(b,d+Na);h!==c.RIGHT&&h!==c.CENTER||f.width(a);b=1/f.units_per_em*Na;g.scale(b,b);b=0;for(d=a.length;b + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/.classpath b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/.project b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/.project new file mode 100644 index 0000000..e6ff7a8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/.project @@ -0,0 +1,17 @@ + + + Assignment3A_TicTacToe + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..5ec6fb4 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/Assignment3A_TicTacToe.iml b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/Assignment3A_TicTacToe.iml new file mode 100644 index 0000000..1570ffe --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/Assignment3A_TicTacToe.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/bin/edu/kit/informatik/FieldState.class b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/bin/edu/kit/informatik/FieldState.class new file mode 100644 index 0000000..fdd9f06 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/bin/edu/kit/informatik/FieldState.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..1105188 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/bin/edu/kit/informatik/TicTacToeGame.class b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/bin/edu/kit/informatik/TicTacToeGame.class new file mode 100644 index 0000000..f8f0e03 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/bin/edu/kit/informatik/TicTacToeGame.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/allclasses-frame.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/allclasses-frame.html new file mode 100644 index 0000000..f56dedc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/allclasses-frame.html @@ -0,0 +1,21 @@ + + + + + +All Classes + + + + + +

All Classes

+ + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/allclasses-noframe.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/allclasses-noframe.html new file mode 100644 index 0000000..f562cd8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/allclasses-noframe.html @@ -0,0 +1,21 @@ + + + + + +All Classes + + + + + +

All Classes

+ + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/constant-values.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/constant-values.html new file mode 100644 index 0000000..253ffb0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/constant-values.html @@ -0,0 +1,122 @@ + + + + + +Constant Field Values + + + + + + + + + + + +
+

Constant Field Values

+

Contents

+
+ + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/deprecated-list.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/deprecated-list.html new file mode 100644 index 0000000..bc8f7ce --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/deprecated-list.html @@ -0,0 +1,122 @@ + + + + + +Deprecated List + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/help-doc.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/help-doc.html new file mode 100644 index 0000000..5c9a99a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API Help + + + + + + + + + + + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-1.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-1.html new file mode 100644 index 0000000..cc86028 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-1.html @@ -0,0 +1,129 @@ + + + + + +B-Index + + + + + + + + +
+ + + + + + + +
+ + +
B C F G I M P T V  + + +

B

+
+
board - Variable in class mainpackage.TicTacToeGame
+
+
The board.
+
+
+B C F G I M P T V 
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-2.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-2.html new file mode 100644 index 0000000..251565a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-2.html @@ -0,0 +1,137 @@ + + + + + +C-Index + + + + + + + + +
+ + + + + + + +
+ + +
B C F G I M P T V  + + +

C

+
+
calcWinner(int[]) - Method in class mainpackage.TicTacToeGame
+
+
Calculate the winner and the turn in which the winning move was made and returns it.
+
+
convertFieldIDToColumn(int) - Method in class mainpackage.TicTacToeGame
+
+
Convert field id to column.
+
+
convertFieldIDToRow(int) - Method in class mainpackage.TicTacToeGame
+
+
Convert field id to row.
+
+
+B C F G I M P T V 
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-3.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-3.html new file mode 100644 index 0000000..a50eebf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-3.html @@ -0,0 +1,131 @@ + + + + + +F-Index + + + + + + + + +
+ + + + + + + +
+ + +
B C F G I M P T V  + + +

F

+
+
FieldState - Enum in mainpackage
+
+
FieldState which tells who occupies the field.
+
+
FieldState() - Constructor for enum mainpackage.FieldState
+
 
+
+B C F G I M P T V 
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-4.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-4.html new file mode 100644 index 0000000..7d2bcf2 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-4.html @@ -0,0 +1,129 @@ + + + + + +G-Index + + + + + + + + +
+ + + + + + + +
+ + +
B C F G I M P T V  + + +

G

+
+
gameWinner(int) - Method in class mainpackage.TicTacToeGame
+
+
Determines if the game in it's current state has a winner.
+
+
+B C F G I M P T V 
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-5.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-5.html new file mode 100644 index 0000000..5c1b7c8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-5.html @@ -0,0 +1,133 @@ + + + + + +I-Index + + + + + + + + +
+ + + + + + + +
+ + +
B C F G I M P T V  + + +

I

+
+
initFieldStateArray(int) - Method in class mainpackage.TicTacToeGame
+
+
Initializes the field state array.
+
+
isFirstPlayersTurn() - Method in class mainpackage.TicTacToeGame
+
+
Checks if it is first players turn.
+
+
+B C F G I M P T V 
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-6.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-6.html new file mode 100644 index 0000000..88ef797 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-6.html @@ -0,0 +1,143 @@ + + + + + +M-Index + + + + + + + + +
+ + + + + + + +
+ + +
B C F G I M P T V  + + +

M

+
+
Main - Class in mainpackage
+
+
The Class Main.
+
+
Main() - Constructor for class mainpackage.Main
+
+
Instantiates a new main.
+
+
main(String[]) - Static method in class mainpackage.Main
+
+
The main method.
+
+
mainpackage - package mainpackage
+
 
+
makeTurn(int) - Method in class mainpackage.TicTacToeGame
+
+
Makes turn.
+
+
+B C F G I M P T V 
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-7.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-7.html new file mode 100644 index 0000000..8cd06a9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-7.html @@ -0,0 +1,129 @@ + + + + + +P-Index + + + + + + + + +
+ + + + + + + +
+ + +
B C F G I M P T V  + + +

P

+
+
parseToIntArray(String[]) - Static method in class mainpackage.Main
+
+
Parses String array to int array.
+
+
+B C F G I M P T V 
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-8.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-8.html new file mode 100644 index 0000000..2d66a1c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-8.html @@ -0,0 +1,141 @@ + + + + + +T-Index + + + + + + + + +
+ + + + + + + +
+ + +
B C F G I M P T V  + + +

T

+
+
TicTacToeGame - Class in mainpackage
+
+
The Class TicTacToeGame.
+
+
TicTacToeGame() - Constructor for class mainpackage.TicTacToeGame
+
+
Instantiates a new tic tac toe game.
+
+
toString() - Method in enum mainpackage.FieldState
+
+
Player2 occupies the Field.
+
+
turnCount - Variable in class mainpackage.TicTacToeGame
+
+
The turn count.
+
+
+B C F G I M P T V 
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-9.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-9.html new file mode 100644 index 0000000..9544130 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index-files/index-9.html @@ -0,0 +1,134 @@ + + + + + +V-Index + + + + + + + + +
+ + + + + + + +
+ + +
B C F G I M P T V  + + +

V

+
+
valueOf(String) - Static method in enum mainpackage.FieldState
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum mainpackage.FieldState
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
+B C F G I M P T V 
+ +
+ + + + + + + +
+ + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index.html new file mode 100644 index 0000000..f2ea09d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/index.html @@ -0,0 +1,71 @@ + + + + + +Generated Documentation (Untitled) + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="mainpackage/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/FieldState.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/FieldState.html new file mode 100644 index 0000000..f944eec --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/FieldState.html @@ -0,0 +1,378 @@ + + + + + +FieldState + + + + + + + + + + + + +
+
mainpackage
+

Enum FieldState

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<FieldState>
    • +
    • +
        +
      • mainpackage.FieldState
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<FieldState>
    +
    +
    +
    +
     enum FieldState
    +extends java.lang.Enum<FieldState>
    +
    FieldState which tells who occupies the field.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + +
      Enum Constants 
      Enum Constant and Description
      Empty 
      Player1 +
      Empty Field.
      +
      Player2 +
      Player1 occupies the Field.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.StringtoString() +
      Player2 occupies the Field.
      +
      static FieldStatevalueOf(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static FieldState[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        Empty

        +
        public static final FieldState Empty
        +
      • +
      + + + +
        +
      • +

        Player1

        +
        public static final FieldState Player1
        +
        Empty Field.
        +
      • +
      + + + +
        +
      • +

        Player2

        +
        public static final FieldState Player2
        +
        Player1 occupies the Field.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static FieldState[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (FieldState c : FieldState.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static FieldState valueOf(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Player2 occupies the Field.
        +
        +
        Overrides:
        +
        toString in class java.lang.Enum<FieldState>
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/Main.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/Main.html new file mode 100644 index 0000000..268fe19 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/Main.html @@ -0,0 +1,304 @@ + + + + + +Main + + + + + + + + + + + + +
+
mainpackage
+

Class Main

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • mainpackage.Main
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Main
    +extends java.lang.Object
    +
    The Class Main.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ModifierConstructor and Description
      private Main() +
      Instantiates a new main.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static voidmain(java.lang.String[] args) +
      The main method.
      +
      private static int[]parseToIntArray(java.lang.String[] arr) +
      Parses String array to int array.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Main

        +
        private Main()
        +
        Instantiates a new main. (useless but required by checkstyle)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        main

        +
        public static void main(java.lang.String[] args)
        +
        The main method.
        +
        +
        Parameters:
        +
        args - the arguments used to start the program
        +
        +
      • +
      + + + +
        +
      • +

        parseToIntArray

        +
        private static int[] parseToIntArray(java.lang.String[] arr)
        +
        Parses String array to int array.
        +
        +
        Parameters:
        +
        arr - the String[] that should be parsed
        +
        Returns:
        +
        the parsed int[]
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/TicTacToeGame.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/TicTacToeGame.html new file mode 100644 index 0000000..02b1550 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/TicTacToeGame.html @@ -0,0 +1,467 @@ + + + + + +TicTacToeGame + + + + + + + + + + + + +
+
mainpackage
+

Class TicTacToeGame

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • mainpackage.TicTacToeGame
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class TicTacToeGame
    +extends java.lang.Object
    +
    The Class TicTacToeGame.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      private FieldState[]board +
      The board.
      +
      private intturnCount +
      The turn count.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      TicTacToeGame() +
      Instantiates a new tic tac toe game.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.StringcalcWinner(int[] turns) +
      Calculate the winner and the turn in which the winning move was made and returns it.
      +
      private intconvertFieldIDToColumn(int fieldID) +
      Convert field id to column.
      +
      private intconvertFieldIDToRow(int fieldID) +
      Convert field id to row.
      +
      private FieldStategameWinner(int lastTurn) +
      Determines if the game in it's current state has a winner.
      +
      private FieldState[]initFieldStateArray(int size) +
      Initializes the field state array.
      +
      private booleanisFirstPlayersTurn() +
      Checks if it is first players turn.
      +
      private voidmakeTurn(int fieldID) +
      Makes turn.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        board

        +
        private FieldState[] board
        +
        The board.
        +
      • +
      + + + +
        +
      • +

        turnCount

        +
        private int turnCount
        +
        The turn count.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TicTacToeGame

        +
        public TicTacToeGame()
        +
        Instantiates a new tic tac toe game.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        calcWinner

        +
        public java.lang.String calcWinner(int[] turns)
        +
        Calculate the winner and the turn in which the winning move was made and returns it.
        +
        +
        Parameters:
        +
        turns - all turns that were made in the game
        +
        Returns:
        +
        winner and turn in which the winning move was made as String
        +
        +
      • +
      + + + +
        +
      • +

        gameWinner

        +
        private FieldState gameWinner(int lastTurn)
        +
        Determines if the game in it's current state has a winner. + If not FieldState.Empty will be returned
        +
        +
        Parameters:
        +
        lastTurn - the field occupied with last turn
        +
        Returns:
        +
        the player who is the winner
        +
        +
      • +
      + + + +
        +
      • +

        convertFieldIDToRow

        +
        private int convertFieldIDToRow(int fieldID)
        +
        Convert field id to row.
        +
        +
        Parameters:
        +
        fieldID - the field id
        +
        Returns:
        +
        the row
        +
        +
      • +
      + + + +
        +
      • +

        convertFieldIDToColumn

        +
        private int convertFieldIDToColumn(int fieldID)
        +
        Convert field id to column.
        +
        +
        Parameters:
        +
        fieldID - the field id
        +
        Returns:
        +
        the column
        +
        +
      • +
      + + + +
        +
      • +

        makeTurn

        +
        private void makeTurn(int fieldID)
        +
        Makes turn. (Field with fieldID gets occupied by the player that does the turn)
        +
        +
        Parameters:
        +
        fieldID - the ID of the field that should be occupied
        +
        +
      • +
      + + + +
        +
      • +

        isFirstPlayersTurn

        +
        private boolean isFirstPlayersTurn()
        +
        Checks if it is first players turn.
        +
        +
        Returns:
        +
        true, if it is first players turn
        +
        +
      • +
      + + + +
        +
      • +

        initFieldStateArray

        +
        private FieldState[] initFieldStateArray(int size)
        +
        Initializes the field state array. + Every field has the state FieldState.Empty
        +
        +
        Parameters:
        +
        size - the size
        +
        Returns:
        +
        the field state[]
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/class-use/FieldState.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/class-use/FieldState.html new file mode 100644 index 0000000..ec8b498 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/class-use/FieldState.html @@ -0,0 +1,183 @@ + + + + + +Uses of Class mainpackage.FieldState + + + + + + + + + + + +
+

Uses of Class
mainpackage.FieldState

+
+
+
    +
  • +
      +
    • + + +

      Uses of FieldState in mainpackage

      + + + + + + + + + + + + +
      Fields in mainpackage declared as FieldState 
      Modifier and TypeField and Description
      private FieldState[]TicTacToeGame.board +
      The board.
      +
      + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods in mainpackage that return FieldState 
      Modifier and TypeMethod and Description
      private FieldStateTicTacToeGame.gameWinner(int lastTurn) +
      Determines if the game in it's current state has a winner.
      +
      private FieldState[]TicTacToeGame.initFieldStateArray(int size) +
      Initializes the field state array.
      +
      static FieldStateFieldState.valueOf(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static FieldState[]FieldState.values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
    • +
    +
  • +
+
+ + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/class-use/Main.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/class-use/Main.html new file mode 100644 index 0000000..a215cb8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/class-use/Main.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class mainpackage.Main + + + + + + + + + + + +
+

Uses of Class
mainpackage.Main

+
+
No usage of mainpackage.Main
+ + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/class-use/TicTacToeGame.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/class-use/TicTacToeGame.html new file mode 100644 index 0000000..02cfb1e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/class-use/TicTacToeGame.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class mainpackage.TicTacToeGame + + + + + + + + + + + +
+

Uses of Class
mainpackage.TicTacToeGame

+
+
No usage of mainpackage.TicTacToeGame
+ + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-frame.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-frame.html new file mode 100644 index 0000000..9e6e117 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-frame.html @@ -0,0 +1,25 @@ + + + + + +mainpackage + + + + + +

mainpackage

+
+

Classes

+ +

Enums

+ +
+ + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-summary.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-summary.html new file mode 100644 index 0000000..622f1bc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-summary.html @@ -0,0 +1,165 @@ + + + + + +mainpackage + + + + + + + + + + + +
+

Package mainpackage

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Main +
    The Class Main.
    +
    TicTacToeGame +
    The Class TicTacToeGame.
    +
    +
  • +
  • + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    FieldState +
    FieldState which tells who occupies the field.
    +
    +
  • +
+
+ + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-tree.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-tree.html new file mode 100644 index 0000000..bc588de --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-tree.html @@ -0,0 +1,144 @@ + + + + + +mainpackage Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package mainpackage

+
+
+

Class Hierarchy

+ +

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+ + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-use.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-use.html new file mode 100644 index 0000000..fd0997f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/mainpackage/package-use.html @@ -0,0 +1,142 @@ + + + + + +Uses of Package mainpackage + + + + + + + + + + + +
+

Uses of Package
mainpackage

+
+
+ +
+ + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/overview-tree.html b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/overview-tree.html new file mode 100644 index 0000000..af12136 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/overview-tree.html @@ -0,0 +1,148 @@ + + + + + +Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+ + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/package-list b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/package-list new file mode 100644 index 0000000..81d11a7 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/package-list @@ -0,0 +1 @@ +mainpackage diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/script.js b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/script.js new file mode 100644 index 0000000..b346356 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/stylesheet.css b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/stylesheet.css new file mode 100644 index 0000000..98055b2 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/doc/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/src/edu/kit/informatik/FieldState.java b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/src/edu/kit/informatik/FieldState.java new file mode 100644 index 0000000..adc1153 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/src/edu/kit/informatik/FieldState.java @@ -0,0 +1,33 @@ +package edu.kit.informatik; + +/** + * FieldState which tells who occupies the field. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +enum FieldState { + /** Empty Field. */ + Empty, + /** Player1 occupies the Field. */ + Player1, + /** Player2 occupies the Field. */ + Player2; + + /* + * (non-Javadoc) + * + * @see java.lang.Enum#toString() + */ + @Override + public String toString() { + switch (this) { + case Player1: + return "P1"; + case Player2: + return "P2"; + default: + return ""; + } + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..b4a0137 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/src/edu/kit/informatik/Main.java @@ -0,0 +1,44 @@ +package edu.kit.informatik; + +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + + /** + * Instantiates a new main. + */ + private Main() { + + } + + /** + * The main method. + * + * @param args + * the arguments used to start the program + */ + public static void main(String[] args) { + TicTacToeGame myGame = new TicTacToeGame(); + System.out.println(myGame.calcWinner(parseToIntArray(args))); + } + + /** + * Parses String array to int array. + * + * @param arr + * the String[] that should be parsed + * @return the parsed int[] + */ + private static int[] parseToIntArray(String[] arr) { + int[] parsedArr = new int[arr.length]; + for (int i = 0; i < parsedArr.length; i++) { + parsedArr[i] = Integer.parseInt(arr[i]); + } + return parsedArr; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/src/edu/kit/informatik/TicTacToeGame.java b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/src/edu/kit/informatik/TicTacToeGame.java new file mode 100644 index 0000000..e36171b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3A_TicTacToe/src/edu/kit/informatik/TicTacToeGame.java @@ -0,0 +1,209 @@ +package edu.kit.informatik; + +/** + * The Class TicTacToeGame. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class TicTacToeGame { + + /** The board. */ + private FieldState[] board; + + /** The turn count. */ + private int turnCount; + + /** + * Instantiates a new tic tac toe game. + */ + public TicTacToeGame() { + turnCount = 0; + board = initFieldStateArray(9); + } + + /** + * Calculate the winner and the turn in which the winning move was made and + * returns it. + * + * @param turns + * all turns that were made in the game + * @return winner and turn in which the winning move was made as String + */ + public String calcWinner(int[] turns) { + int winningTurn = 0; + FieldState winner = FieldState.Empty; + + for (int turn : turns) { + makeTurn(turn); + if (winner.equals(FieldState.Empty) && !gameWinner(turn).equals(FieldState.Empty)) { + winningTurn = turnCount; + winner = gameWinner(turn); + } + } + if (winner.equals(FieldState.Empty)) + return "draw"; + else + return winner + " wins " + winningTurn; + } + + /** + * Determines if the game in it's current state has a winner. If not + * FieldState.Empty will be returned + * + * @param lastTurn + * the field occupied with last turn + * @return the player who is the winner + */ + private FieldState gameWinner(int lastTurn) { + FieldState comperator = null; + int row = 0; + int column = 0; + boolean hasWon = false; + + if (turnCount < 5) { + return FieldState.Empty; + } + + if (isFirstPlayersTurn()) + comperator = FieldState.Player1; + else + comperator = FieldState.Player2; + + /* + * Checks row of newly occupied field -> if all in row are occupied by + * the player who made the last turn return him as winner + */ + hasWon = true; + row = convertFieldIdToRow(lastTurn); + + for (int i = (row * 3) - 1; i >= (row * 3) - 3; i--) { // start with 2, + // 5 or 8 and + // move down the + // row from back + // to front (-1 + // for next + // field) + if (!comperator.equals(this.board[i])) + hasWon = false; + } + if (hasWon) + return comperator; + + /* + * Checks column of newly occupied field -> if all in column are + * occupied by the player who made the last turn return him as winner + */ + hasWon = true; + column = convertFieldIdToColumn(lastTurn); + + for (int i = 0; i < 3; i++) { // start with 0, 1 or 2 and move down the + // column from from top to bottom (+3 for + // next field) + if (!comperator.equals(this.board[i * 3 + column - 1])) + hasWon = false; + } + if (hasWon) + return comperator; + + /* + * Checks diagonals of newly occupied field -> if all in diagonals are + * occupied by the player who made the last turn return him as winner + */ + hasWon = true; + if ((lastTurn % 2) == 0) { // if lastTurn is in a corner or the center, + // diagonals need to be checked + if (lastTurn != 2 && lastTurn != 6) { // Diagonal from top-left to + // bottom-right + for (int i = 0; i <= 8; i += 4) { + if (!comperator.equals(this.board[i])) + hasWon = false; + } + } + if (hasWon) + return comperator; + if (lastTurn != 0 && lastTurn != 8) { // Diagonal from top-right to + // bottom-left + for (int i = 2; i <= 6; i += 2) { + if (!comperator.equals(this.board[i])) + hasWon = false; + } + } + if (hasWon) + return comperator; + } + + return FieldState.Empty; + } + + /** + * Convert field Id to row. + * + * @param fieldId + * the field Id + * @return the row + */ + private int convertFieldIdToRow(int fieldId) { + return fieldId / 3 + 1; // First row has Id 1 + } + + /** + * Convert field Id to column. + * + * @param fieldId + * the field Id + * @return the column + */ + private int convertFieldIdToColumn(int fieldId) { + return fieldId % 3 + 1; // First column has Id 1 + } + + /** + * Makes turn. (Field with fieldId gets occupied by the player that does the + * turn) + * + * @param fieldId + * the Id of the field that should be occupied + */ + private void makeTurn(int fieldId) { + if (board[fieldId].equals(FieldState.Empty)) { + turnCount++; + + if (isFirstPlayersTurn()) { + board[fieldId] = FieldState.Player1; + } else { + board[fieldId] = FieldState.Player2; + } + + } + } + + /** + * Checks if it is first players turn. + * + * @return true, if it is first players turn + */ + private boolean isFirstPlayersTurn() { + // After second Player has made a turn turnCount will be an even number + if ((turnCount % 2) == 0) + return false; + else + return true; + } + + /** + * Initializes the field state array. Every field has the state + * FieldState.Empty + * + * @param size + * the size + * @return the field state[] + */ + private FieldState[] initFieldStateArray(int size) { + FieldState[] fieldStates = new FieldState[size]; + for (int i = 0; i < size; i++) { + fieldStates[i] = FieldState.Empty; + } + return fieldStates; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.checkstyle b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.checkstyle new file mode 100644 index 0000000..262c487 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.classpath b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.project b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.project new file mode 100644 index 0000000..4af6ad4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.project @@ -0,0 +1,17 @@ + + + Assignment3B_Bank + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..2d4af53 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/Assignment3B_Bank.iml b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/Assignment3B_Bank.iml new file mode 100644 index 0000000..1570ffe --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/Assignment3B_Bank.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/bin/edu/kit/informatik/Account.class b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/bin/edu/kit/informatik/Account.class new file mode 100644 index 0000000..6ae4e44 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/bin/edu/kit/informatik/Account.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/bin/edu/kit/informatik/Bank.class b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/bin/edu/kit/informatik/Bank.class new file mode 100644 index 0000000..2b3da1c Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/bin/edu/kit/informatik/Bank.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..3c5645f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/src/edu/kit/informatik/Account.java b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/src/edu/kit/informatik/Account.java new file mode 100644 index 0000000..563bc14 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/src/edu/kit/informatik/Account.java @@ -0,0 +1,112 @@ +package edu.kit.informatik; + +/** + * The Class Account. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Account { + + /** The account number. */ + private int accountNumber; + + /** The bank code. */ + private int bankCode; + + /** The balance. */ + private int balance; + + /** + * Instantiates a new account. + * + * @param bnkCode + * the bank code + * @param accNumber + * the account number + */ + public Account(int bnkCode, int accNumber) { + this.bankCode = bnkCode; + this.accountNumber = accNumber; + this.balance = 0; + } + + /** + * Withdraw money. + * + * @param amount + * the amount + * @return true, if successful + */ + public boolean withdraw(int amount) { + if ((this.balance - amount) < 0) + return false; + else { + this.balance -= amount; + return true; + } + } + + /** + * Deposit money. + * + * @param amount + * the amount + */ + public void deposit(int amount) { + this.balance += amount; + } + + /** + * Gets the account number. + * + * @return the account number + */ + public int getAccountNumber() { + return accountNumber; + } + + /** + * Gets the bank code. + * + * @return the bank code + */ + public int getBankCode() { + return bankCode; + } + + /** + * Gets the balance. + * + * @return the balance + */ + public int getBalance() { + return balance; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (obj instanceof Account) { + return (this.accountNumber == ((Account) obj).getAccountNumber()); + } else + return false; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + String str = "\t" + "accountNumber: " + accountNumber + "\n"; + str += "\t\t" + "bankCode" + bankCode + "\n"; + str += "\t\t" + "balance: " + balance; + return str; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/src/edu/kit/informatik/Bank.java b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/src/edu/kit/informatik/Bank.java new file mode 100644 index 0000000..2af40d8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/src/edu/kit/informatik/Bank.java @@ -0,0 +1,235 @@ +package edu.kit.informatik; + +/** + * The Class Account. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Bank { + + /** The bank code. */ + private int bankCode; + + /** The accounts. */ + private Account[] accounts; + + /** + * Instantiates a new bank. + * + * @param bnkCode + * the bankCode + */ + public Bank(Integer bnkCode) { + this.bankCode = bnkCode; + accounts = new Account[4]; + } + + /** + * Creates an account. + * + * @param accountNumber + * the account number + * @return position of the created account inside the accounts + */ + public int createAccount(int accountNumber) { + if (this.size() == this.length()) { + // If account is half way filled: double the amount of elements + // accounts can hold + Account[] tmpArr = accounts; + accounts = new Account[tmpArr.length * 2]; + System.arraycopy(tmpArr, 0, accounts, 0, tmpArr.length); + } + // Return index of newly added element + int index = this.size(); + accounts[index] = new Account(this.bankCode, accountNumber); + return index; + } + + /** + * Removes the account. + * + * @param accountNumber + * the account number for the account that should be removed + * @return true, if successful + */ + public boolean removeAccount(int accountNumber) { + if (!this.containsAccount(accountNumber)) { // if account is not in that + // bank it cannot be removed + return false; + } else { + /* + * Loop through each account until account is found that should be + * removed. After that close the 'gap' -> change index of all + * accounts (after the removed one) by -1 + */ + for (int i = 0; i < accounts.length; i++) { + if (accounts[i] == null) { + if (accounts[i + 1] == null) { // break if end of existing + // accounts is reached + break; + } else if (i + 1 < accounts.length && accounts[i + 1] != null) { // fill + // in + // the + // gap + accounts[i] = accounts[i + 1]; + accounts[i + 1] = null; + } + } else if (accounts[i].getAccountNumber() == accountNumber) { // remove + // account + accounts[i] = accounts[i + 1]; + accounts[i + 1] = null; + } + } + // If the number of accounts gets smaller than 1/4 of the arraysize + // it will be halfed in size + if (this.size() * 4 < this.length() && this.length() > 4) { // Make + // array + // smaller + // if + // necessary + Account[] tmpAcc = this.accounts; + int length = this.size(); + this.accounts = new Account[this.length() / 2]; + + System.arraycopy(tmpAcc, 0, this.accounts, 0, length); + } + return true; + } + } + + /** + * Contains account. + * + * @param accountNumber + * the account number + * @return true, if successful + */ + public boolean containsAccount(int accountNumber) { + for (int i = 0; i < accounts.length; i++) { + if (accounts[i].getAccountNumber() == accountNumber) + return true; + } + return false; + } + + /** + * Internal bank transfer. + * + * @param fromAccountNumber + * the account number of the account money should be withdrawn + * from + * @param toAccountNumber + * the account number of the account the money should be + * transfered to + * @param amount + * the amount + * @return true, if successful + */ + public boolean internalBankTransfer(int fromAccountNumber, int toAccountNumber, int amount) { + if (getAccountID(fromAccountNumber) < 0 && getAccountID(toAccountNumber) < 0) + return false; + + Account fromAcc = this.getAccount(this.getAccountID(fromAccountNumber)); + Account toAcc = this.getAccount(this.getAccountID(toAccountNumber)); + + if (fromAcc.withdraw(amount)) + toAcc.deposit(amount); + + return false; + } + + /** + * Length. + * + * @return the the length of the internal array used to store all accounts + */ + public int length() { + return accounts.length; + } + + /** + * Number of accounts. + * + * @return the number of accounts inside the bank + */ + public int size() { + if (accounts[0] == null) + return 0; + for (int i = 1; i < accounts.length; i++) { + if (accounts[i] == null) + return (i); + } + + return accounts.length; // This should never be called + } + + /** + * Gets the bank code. + * + * @return the bank code + */ + public int getBankCode() { + return bankCode; + } + + /** + * Gets an account. + * + * @param index + * the index of the account that should be returned + * @return the account + */ + public Account getAccount(int index) { + if (size() <= index || index < 0) + return null; + else { + return accounts[index]; + } + } + + /** + * Gets the account id. + * + * @param accountNumber + * the account number + * @return the account id + */ + private int getAccountID(int accountNumber) { + for (int i = 0; i < accounts.length; i++) { + if (accounts[i].getAccountNumber() == accountNumber) + return i; + } + return -1; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + String str = "BankCode: " + bankCode + "\n"; + str += "size: " + size() + "\n"; + str += "length: " + length() + "\n"; + + for (Account account : accounts) { + if (account != null) + str += "\t" + account + "\n\n"; + } + return str.trim(); + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (obj instanceof Bank && ((Bank) obj).getBankCode() == this.bankCode) + return true; + return false; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..2b8176f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3B_Bank/src/edu/kit/informatik/Main.java @@ -0,0 +1,15 @@ +package edu.kit.informatik; + +public final class Main { + public static void main(final String[] args) { + final Bank bank = new Bank(0); + for (int i = 0; i < 10; i++) { + bank.createAccount(i); + } + System.out.println(bank); + } + + private Main() { + + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.checkstyle b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.checkstyle new file mode 100644 index 0000000..66517d9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.classpath b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.project b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.project new file mode 100644 index 0000000..398de67 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.project @@ -0,0 +1,17 @@ + + + Assignment3C_Routing + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.project[Konflikt] b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.project[Konflikt] new file mode 100644 index 0000000..398de67 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.project[Konflikt] @@ -0,0 +1,17 @@ + + + Assignment3C_Routing + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..bae4af6 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/Assignment3C_Routing.iml b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/Assignment3C_Routing.iml new file mode 100644 index 0000000..1570ffe --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/Assignment3C_Routing.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Edge.class b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Edge.class new file mode 100644 index 0000000..d17f3c4 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Edge.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Graph.class b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Graph.class new file mode 100644 index 0000000..11526ff Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Graph.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..9eadd3e Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Matrix.class b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Matrix.class new file mode 100644 index 0000000..6f2d3a4 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Matrix.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/VectorInt.class b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/VectorInt.class new file mode 100644 index 0000000..3aa1f2b Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/VectorInt.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Vertex.class b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Vertex.class new file mode 100644 index 0000000..bd6ba4c Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/Vertex.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/input.txt b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/input.txt new file mode 100644 index 0000000..6538252 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/bin/edu/kit/informatik/input.txt @@ -0,0 +1,7 @@ +1 0 +1 2 +2 0 +0 2 +2 3 +3 2 +0 3 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Edge.java b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Edge.java new file mode 100644 index 0000000..16fedd4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Edge.java @@ -0,0 +1,57 @@ +package edu.kit.informatik; + +/** + * The Class Edge. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Edge { + + /** The vertex the edge begins at. */ + private final Vertex fromVertex; + + /** The vertex the edge ends at. */ + private final Vertex toVertex; + + /** + * Instantiates a new edge. + * + * @param from + * the vertex the edge begins at + * @param to + * the vertex the edge ends at + */ + public Edge(final Vertex from, final Vertex to) { + this.fromVertex = from; + this.toVertex = to; + } + + /** + * Gets vertex the edge begins at. + * + * @return the vertex the edge begins at + */ + public Vertex getFromVertex() { + return fromVertex; + } + + /** + * Gets the vertex the edge ends at. + * + * @return the vertex the edge ends at + */ + public Vertex getToVertex() { + return toVertex; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "(" + fromVertex.toString() + " , " + toVertex.toString() + ")"; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Graph.java b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Graph.java new file mode 100644 index 0000000..7c44c41 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Graph.java @@ -0,0 +1,189 @@ +package edu.kit.informatik; + +/** + * The Class Graph. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Graph { + + /** The edges. */ + private Edge[] edges; + + /** The vertices. */ + private Vertex[] vertices; + + /** + * Instantiates a new graph. + */ + public Graph() { + this.edges = null; + this.vertices = null; + } + + /** + * Instantiates a new graph. (Adds all vertices of the edges to the vertices + * array) + * + * @param edges + * the edges of the graph + */ + public Graph(final Edge[] edges) { + this.edges = edges; + this.vertices = null; + if (this.edges != null) { + for (final Edge edge : this.edges) { + if (!this.contains(edge.getFromVertex())) + this.add(edge.getFromVertex()); + if (!this.contains(edge.getToVertex())) + this.add(edge.getToVertex()); + if (!this.contains(edge)) { + this.add(edge); + } + } + } + } + + /** + * Adds an edge to the graph and the vertices it contains. + * + * @param edge + * the edge + */ + public void add(final Edge edge) { + if (edge == null) + return; + + if (edges == null) + edges = new Edge[1]; + else { + final Edge[] tmpEdge = edges.clone(); + edges = new Edge[tmpEdge.length + 1]; + System.arraycopy(tmpEdge, 0, edges, 0, tmpEdge.length); + } + if (!this.contains(edge)) { + edges[edges.length - 1] = edge; + this.add(edge.getFromVertex()); + this.add(edge.getToVertex()); + } + } + + /** + * Adds a vertex to the graph. + * + * @param vertex + * the vertex + */ + public void add(final Vertex vertex) { + if (vertex == null) + return; + + if (vertices == null) { + vertices = new Vertex[1]; + vertices[0] = vertex; + } else { + if (!this.contains(vertex)) { + final Vertex[] tmpVertex = vertices.clone(); + vertices = new Vertex[tmpVertex.length + 1]; + System.arraycopy(tmpVertex, 0, vertices, 0, tmpVertex.length); + vertices[vertices.length - 1] = vertex; + } + } + + } + + /** + * Gets the number of connections. + * + * @param i + * the id of the vertex the route starts at + * @param j + * the id of the vertex the route ends at + * @param pathlength + * the path length of the route + * @return the number of connections + */ + public int getNumberOfConnections(final int i, final int j, final int pathlength) { + if (pathlength < 1 || vertices == null || i >= vertices.length || j >= vertices.length) + return 0; + Matrix resultMatrix = this.toMatrix(); + for (int k = 1; k < pathlength; k++) { + resultMatrix = Matrix.crossProduct(resultMatrix, resultMatrix); + } + return resultMatrix.getSingleElement(i, j); + } + + /** + * Checks if this graph contains the edge. + * + * @param edge + * the edge + * @return true, if contained + */ + public boolean contains(final Edge edge) { + if (edges != null) { + for (final Edge e : edges) { + if (e != null && e.equals(edge)) + return true; + } + } + return false; + } + + /** + * Checks if this graph contains the vertex. + * + * @param vertex + * the vertex + * @return true, if contained + */ + public boolean contains(final Vertex vertex) { + if (vertices != null) { + for (final Vertex v : vertices) { + if (v != null && v.equals(vertex)) + return true; + } + } + return false; + } + + /** + * Converts the graph to an adjacency matrix. + * + * @return the adjacency matrix + */ + public Matrix toMatrix() { + if (vertices == null || edges == null) + return null; + final Matrix result = new Matrix(vertices.length, vertices.length); + for (final Edge edge : edges) { + if (edge != null) + result.setSingleElement(edge.getFromVertex().getId(), edge.getToVertex().getId(), 1); + } + return result; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + String out = "E = { "; + if (edges != null) { + for (final Edge edge : this.edges) { + out += edge.toString() + " "; + } + } + out += "}\nV = { "; + if (vertices != null) { + for (final Vertex vertex : vertices) { + out += vertex.toString() + " "; + } + } + out += "}"; + return out; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..e901cea --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Main.java @@ -0,0 +1,84 @@ +package edu.kit.informatik; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; + +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + + /** The Constant FILENOTFOUND for fileNotFound exceptions. */ + private static final String FILENOTFOUND = "File not Found"; + + /** The Constant IO for IO exceptions. */ + private static final String IO = "IOException occured"; + + /** + * Instantiates a new main. + */ + private Main() { + } + + /** + * Checks if 4 arguments are handed over and calculates the number of + * connection between two nodes (args[1] and args[2]) at the pathlength + * (args[3]) and prints them to the console. + * + * @param args + * the arguments + */ + public static void main(final String[] args) { + if (args.length == 4) { + final String filePath = args[0]; + final int startVertexId = Integer.parseInt(args[1]); + final int endVertexId = Integer.parseInt(args[2]); + final int pathLength = Integer.parseInt(args[3]); + + final Graph graph = Main.readFile(filePath); + System.out.println(graph.getNumberOfConnections(startVertexId, endVertexId, pathLength)); + } + } + + /** + * Reads a file that contains the description for a graph. + * + * @param path + * the path of the file + * @return the graph + */ + private static Graph readFile(final String path) { + FileReader in = null; + + try { + in = new FileReader(path); + } catch (final FileNotFoundException e) { + System.out.println(FILENOTFOUND); + System.exit(1); + } + + final BufferedReader reader = new BufferedReader(in); + try { + final Graph graph = new Graph(); + String line = reader.readLine(); + while (line != null) { + final String[] nums = line.trim().split("\\s+"); + if (nums.length == 2) + graph.add(new Edge(new Vertex(Integer.parseInt(nums[0])), new Vertex(Integer.parseInt(nums[1])))); + line = reader.readLine(); + } + return graph; + } catch (final IOException e) { + System.out.println(IO); + System.exit(1); + } + + return null; + + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Matrix.java b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Matrix.java new file mode 100644 index 0000000..f22f760 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Matrix.java @@ -0,0 +1,204 @@ +package edu.kit.informatik; + +/** + * The Class Matrix. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Matrix { + + /** + * The matrix. (represents the data of the matrix ([row][column]) starting + * with (0,0)) + */ + private int[][] data; + + /** + * Instantiates a new matrix of which every element is 0 + * + * @param iElements + * the number of rows + * @param jElements + * the number of columns + */ + public Matrix(int iElements, int jElements) { + data = new int[iElements][jElements]; + for (int i = 0; i < iElements; i++) { + for (int j = 0; j < jElements; j++) { + data[i][j] = 0; + } + } + } + + /** + * Instantiates a new matrix from a data array + * + * @param data + * the data of the matrx + */ + public Matrix(int[][] data) { + this.data = data; + } + + /** + * Gets a single element of the matrix at the position (row,column). + * + * @param i + * the row + * @param j + * the column + * @return the element at (i,j) + */ + public int getSingleElement(int i, int j) { + if (i < data.length && j < data[i].length) + return data[i][j]; + else + return -1; + } + + /** + * Sets a single element of the matrix to a value + * + * @param i + * row of the element + * @param j + * column of the element + * @param val + * the value that should be set at (i,j) + */ + public void setSingleElement(int i, int j, int val) { + if (i < data.length && j < data[i].length) { + data[i][j] = val; + } + } + + /** + * Gets the number of columns. + * + * @return the number of columns + */ + public int getColumnCount() { + return data[0].length; + } + + /** + * Gets the number of rows. + * + * @return the number of rows + */ + public int getRowCount() { + return data.length; + } + + /** + * Gets a row as vector. + * + * @param row + * the row that should be returned as vector + * @return the row converted to a vector + */ + public VectorInt getRowVector(int row) { + int[] arr = new int[data[row].length]; + for (int i = 0; i < arr.length; i++) { + arr[i] = data[row][i]; + } + return new VectorInt(arr); + } + + /** + * Gets a column vector. + * + * @param column + * the column that should be returned as vector + * @return the column converted to a vector + */ + public VectorInt getColumnVector(int column) { + int[] arr = new int[data.length]; + for (int i = 0; i < arr.length; i++) { + arr[i] = data[i][column]; + } + return new VectorInt(arr); + } + + /** + * Addition of two matrices. + * + * @param m + * the first matrix + * @param n + * the second matrix + * @return the result + */ + public static Matrix addition(Matrix m, Matrix n) { + if (n.getColumnCount() != m.getColumnCount() && n.getRowCount() != m.getColumnCount()) + return null; + + int[][] result = new int[n.getRowCount()][n.getColumnCount()]; + for (int i = 0; i < result.length; i++) { + for (int j = 0; j < result[i].length; j++) { + result[i][j] = n.getSingleElement(i, j) + m.getSingleElement(i, j); + } + } + return new Matrix(result); + } + + /** + * Cross product of two matrices. (m will be multiplied by n [n x m]) + * + * @param n + * the second matrix + * @param m + * the first matrix + * @return the result + */ + public static Matrix crossProduct(Matrix n, Matrix m) { // n x m + if (n.getColumnCount() != m.getRowCount()) + return null; + int[][] result = new int[n.getRowCount()][m.getColumnCount()]; + for (int i = 0; i < result.length; i++) { + for (int j = 0; j < result[i].length; j++) { + // Skalarprodukt + result[i][j] = VectorInt.scalarProduct(n.getRowVector(i), m.getColumnVector(j)); + } + } + return new Matrix(result); + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (obj instanceof Matrix && ((Matrix) obj).getColumnCount() == this.getColumnCount() + && ((Matrix) obj).getRowCount() == this.getRowCount()) { + for (int i = 0; i < this.data.length; i++) { + for (int j = 0; j < this.data[i].length; j++) { + if (this.data[i][j] != ((Matrix) obj).getSingleElement(i, j)) + return false; + } + } + return true; + } + return false; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + String str = ""; + for (int i = 0; i < data.length; i++) { + for (int j = 0; j < data[i].length; j++) { + str += " " + String.format("% 4d", this.data[i][j]); + } + str += "\n"; + } + return str; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/VectorInt.java b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/VectorInt.java new file mode 100644 index 0000000..0bed8e9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/VectorInt.java @@ -0,0 +1,59 @@ +package edu.kit.informatik; + +/** + * The Class VectorInt. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class VectorInt { + + /** The data. */ + private int[] data; + + /** + * Instantiates a new vector int. + * + * @param vec + * the data of the vector + */ + public VectorInt(int[] vec) { + this.data = vec; + }; + + /** + * Scalar product of two vectors. + * + * @param vec1 + * the first vector + * @param vec2 + * the second vector + * @return the scalar product + */ + public static int scalarProduct(VectorInt vec1, VectorInt vec2) { + if (vec1.data.length != vec2.data.length) + return 0; + int sum = 0; + for (int i = 0; i < vec1.data.length; i++) { + sum += vec1.data[i] * vec2.data[i]; + } + return sum; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (obj instanceof VectorInt) { + for (int i = 0; i < data.length; i++) { + if (data[i] != ((VectorInt) obj).data[i]) + return false; + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Vertex.java b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Vertex.java new file mode 100644 index 0000000..f5f03cc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/Vertex.java @@ -0,0 +1,55 @@ +package edu.kit.informatik; + +/** + * The Class Vertex. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Vertex { + + /** The id. */ + private int id; + + /** + * Instantiates a new vertex. + * + * @param id + * the id of the vertex + */ + public Vertex(int id) { + this.id = id; + } + + /** + * Gets the id of the vertex + * + * @return the id + */ + public int getId() { + return id; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "" + id + ""; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if ((obj instanceof Vertex) && (((Vertex) obj).id == this.id)) + return true; + else + return false; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/input.txt b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/input.txt new file mode 100644 index 0000000..6538252 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment3C_Routing/src/edu/kit/informatik/input.txt @@ -0,0 +1,7 @@ +1 0 +1 2 +2 0 +0 2 +2 3 +3 2 +0 3 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.checkstyle b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.checkstyle new file mode 100644 index 0000000..6c7b8f0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.classpath b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.project b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.project new file mode 100644 index 0000000..4aa1e52 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.project @@ -0,0 +1,17 @@ + + + Assignment4A_LangtonAnt + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..b026e18 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/Assignment4A_LangtonAnt.iml b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/Assignment4A_LangtonAnt.iml new file mode 100644 index 0000000..1570ffe --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/Assignment4A_LangtonAnt.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/Terminal.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/Terminal.class new file mode 100644 index 0000000..7f12059 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/Terminal.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/exceptions/FileNotCompalitbleException.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/exceptions/FileNotCompalitbleException.class new file mode 100644 index 0000000..e7eb34f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/exceptions/FileNotCompalitbleException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/exceptions/GameHasEndedException.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/exceptions/GameHasEndedException.class new file mode 100644 index 0000000..01163ea Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/exceptions/GameHasEndedException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/exceptions/InvalidParameterException.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/exceptions/InvalidParameterException.class new file mode 100644 index 0000000..f058bdf Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/exceptions/InvalidParameterException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Ant.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Ant.class new file mode 100644 index 0000000..3a57cc1 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Ant.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Board.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Board.class new file mode 100644 index 0000000..e187728 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Board.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Field.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Field.class new file mode 100644 index 0000000..55a6823 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Field.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/FileInputHelper.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/FileInputHelper.class new file mode 100644 index 0000000..8612288 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/FileInputHelper.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/LangtonGame.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/LangtonGame.class new file mode 100644 index 0000000..cec97fb Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/LangtonGame.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Main.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Main.class new file mode 100644 index 0000000..e4208c0 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Torusboard.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Torusboard.class new file mode 100644 index 0000000..5a13d87 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/Torusboard.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/UserInputManager.class b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/UserInputManager.class new file mode 100644 index 0000000..ea4f744 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/UserInputManager.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/input.txt b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/input.txt new file mode 100644 index 0000000..968d8fa --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/bin/edu/kit/informatik/langton/input.txt @@ -0,0 +1,3 @@ +0000 +0000 +0N00 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/Terminal.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/Terminal.java new file mode 100644 index 0000000..5093f94 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/Terminal.java @@ -0,0 +1,63 @@ +package edu.kit.informatik; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * This class provides some simple methods for input/output from and to a terminal. + * + * Never modify this class, never upload it to Praktomat. This is only for your local use. If an assignment tells you to + * use this class for input and output never use System.out or System.in in the same assignment. + * + * @author ITI, VeriAlg Group + * @author IPD, SDQ Group + * @version 4 + */ +public final class Terminal { + + /** + * BufferedReader for reading from standard input line-by-line. + */ + private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + + /** + * Private constructor to avoid object generation. + */ + private Terminal() { + } + + /** + * Print a String to the standard output. + * + * The String out must not be null. + * + * @param out + * The string to be printed. + */ + public static void printLine(String out) { + System.out.println(out); + } + + /** + * Reads a line from standard input. + * + * Returns null at the end of the standard input. + * + * Use Ctrl+D to indicate the end of the standard input. + * + * @return The next line from the standard input or null. + */ + public static String readLine() { + try { + return in.readLine(); + } catch (IOException e) { + /* + * rethrow unchecked (!) exception to prevent students from being forced to use Exceptions before they have + * been introduced in the lecture. + */ + throw new RuntimeException(e); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/exceptions/FileNotCompalitbleException.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/exceptions/FileNotCompalitbleException.java new file mode 100644 index 0000000..577dbd8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/exceptions/FileNotCompalitbleException.java @@ -0,0 +1,20 @@ +package edu.kit.informatik.exceptions; + +/** + * The Class FileNotCompalitbleException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class FileNotCompalitbleException extends Exception { + + /** + * Instantiates a new file not compalitble exception. + * + * @param str + * the str + */ + public FileNotCompalitbleException(final String str) { + super(str); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/exceptions/GameHasEndedException.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/exceptions/GameHasEndedException.java new file mode 100644 index 0000000..6219362 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/exceptions/GameHasEndedException.java @@ -0,0 +1,20 @@ +package edu.kit.informatik.exceptions; + +/** + * The Class GameHasEndedException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class GameHasEndedException extends Exception { + + /** + * Instantiates a new game has ended exception. + * + * @param message + * the message + */ + public GameHasEndedException(final String message) { + super(message); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/exceptions/InvalidParameterException.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/exceptions/InvalidParameterException.java new file mode 100644 index 0000000..b382533 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/exceptions/InvalidParameterException.java @@ -0,0 +1,21 @@ +package edu.kit.informatik.exceptions; + +/** + * The Class InvalidParameterException. (Custom class because imports from + * java.security are not allowed) + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class InvalidParameterException extends Exception { + + /** + * Instantiates a new invalid parameter exception. + * + * @param message + * the message + */ + public InvalidParameterException(String message) { + super(message); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Ant.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Ant.java new file mode 100644 index 0000000..4dff451 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Ant.java @@ -0,0 +1,152 @@ +package edu.kit.informatik.langton; + +/** + * The Class Ant. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Ant { + + /** The x position. */ + private int xPos; + + /** The y position. */ + private int yPos; + + /** The direction in degrees (clockwise) starting north (0°) */ + private int direction; + + /** + * Instantiates a new ant. + * + * @param xPos + * the x-position + * @param yPos + * the y-position + * @param direction + * the direction + */ + public Ant(final int xPos, final int yPos, final int direction) { + if ((direction % 90) == 0) + this.direction = direction; + else + this.direction = 0; + + this.xPos = xPos; + this.yPos = yPos; + } + + /** + * Turns the ant by a multiple of 90°. + * + * @param degrees + * the degrees to turn + */ + public void turn(final int degrees) { + if (degrees % 90 != 0) + throw new IllegalArgumentException(); + + direction += degrees; + if (direction >= 360) + direction = direction - 360; + else if (direction <= -360) + direction = 0; + } + + /** + * Movees the Ant in the direction it is facing by one unit. + */ + public void move() { + /* + * cos(0°) is one therefore yPos will become smaller by one if the ant + * is facing north. + * cos(180°) is minus one therefore xPos will become smaller by one if + * the ant is facing south. + * cos(90°) and cos(270°) are zero therefore yPos will not increase if + * the ant is facing east or west + */ + yPos -= Math.round(Math.cos(Math.toRadians(direction))); + /* + * sin(90°) is one therefore xPos will become bigger by one if the ant + * is facing east. + * cos(270°) is minus one therefore xPos will become bigger by one if + * the ant is facing west. + * cos(0°) and cos(180°) are zero therefore xPos will not increase if + * the ant is facing south or north. + */ + xPos += Math.round(Math.sin(Math.toRadians(direction))); + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return yPos + "," + xPos; + } + + /** + * Gets the x pos. + * + * @return the x pos + */ + public int getXPos() { + return xPos; + } + + /** + * Gets the y pos. + * + * @return the y pos + */ + public int getYPos() { + return yPos; + } + + /** + * Sets the x pos. + * + * @param xPos + * the new x pos + */ + public void setXPos(final int xPos) { + this.xPos = xPos; + } + + /** + * Sets the y pos. + * + * @param yPos + * the new y pos + */ + public void setYPos(final int yPos) { + this.yPos = yPos; + } + + /** + * Gets the direction as string. Which converts 90 to O, 180 to S, 270 to W + * and everything else to N + * + * @return the direction as string + */ + public String getDirectionAsString() { + String ret = "N"; + switch (direction) { + case 90: + ret = "O"; + break; + case 180: + ret = "S"; + break; + case 270: + ret = "W"; + break; + default: + ret = "N"; + } + return ret; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Board.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Board.java new file mode 100644 index 0000000..a4c7bb7 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Board.java @@ -0,0 +1,146 @@ +package edu.kit.informatik.langton; + +import edu.kit.informatik.exceptions.GameHasEndedException; +import edu.kit.informatik.exceptions.InvalidParameterException; + +/** + * The Class Board. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Board { + + /** The data. */ + private Field[][] data; + + /** The ant. */ + private Ant ant; + + /** + * Instantiates a new board. + * + * @param data + * the data of the board + * @param ant + * the ant + * @throws IllegalArgumentException + * if arguments that are used to instanziate Board have an error + */ + public Board(final Field[][] data, final Ant ant) throws IllegalArgumentException { + if (ant == null) + throw new IllegalArgumentException("ant needs to be initialized"); + else if (data == null) + throw new IllegalArgumentException("data can't be null"); + + this.ant = ant; + this.data = data; + this.data[ant.getYPos()][ant.getXPos()] = Field.White; + } + + /** + * Make turn. + * + * @throws GameHasEndedException + * throws exception if a new turn is not possible + */ + public void makeTurn() throws GameHasEndedException { + ant.move(); + + if (ant.getXPos() < 0 || ant.getXPos() >= data[0].length || ant.getYPos() < 0 || ant.getYPos() >= data.length) + leftBoard(); + + // Turning and coloring + if (data[ant.getYPos()][ant.getXPos()].equals(Field.Black)) { + ant.turn(270); + data[ant.getYPos()][ant.getXPos()] = Field.White; + } else if (Field.White.equals(data[ant.getYPos()][ant.getXPos()])) { + ant.turn(90); + data[ant.getYPos()][ant.getXPos()] = Field.Black; + } + } + + /** + * Left board. + * + * @throws GameHasEndedException + * the exception is thrown if game needs to end + */ + protected void leftBoard() throws GameHasEndedException { + throw new GameHasEndedException("Game ended"); + } + + /** + * Gets the ant. + * + * @return the ant + */ + public Ant getAnt() { + return ant; + } + + /** + * Gets the field at position x,y as string. + * + * @param x + * the x position + * @param y + * the y position + * @return the field as string + * @throws InvalidParameterException + * thrown if x or y outside of bounds of data array invalid + * parameter exception + */ + public String getFieldAsString(final int x, final int y) throws InvalidParameterException { + if (x < 0 || x >= data[0].length || y < 0 || y >= data.length) + throw new InvalidParameterException("x or y is to large"); + + String ret = ""; + if (x == ant.getXPos() && y == ant.getYPos()) + ret += ant.getDirectionAsString(); + else + ret += data[y][x]; + return ret; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + String ret = ""; + for (int y = 0; y < data.length; y++) { + for (int x = 0; x < data[y].length; x++) { + try { + ret += getFieldAsString(x, y); + } catch (InvalidParameterException e) { + e.printStackTrace(); + } + } + ret += "\n"; + } + return ret.trim(); + } + + /** + * @return the width of the board + */ + public int getWidth() { + if (data == null || data.length == 0) + return 0; + else + return data[0].length; + } + + /** + * @return the height of the board + */ + public int getHeight() { + if (data == null) + return 0; + else + return data.length; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Field.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Field.java new file mode 100644 index 0000000..da33639 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Field.java @@ -0,0 +1,28 @@ +package edu.kit.informatik.langton; + +/** + * The Enum Field. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public enum Field { + + /** field is white. */ + White, + /** field is black. */ + Black; + + /* + * (non-Javadoc) + * + * @see java.lang.Enum#toString() + */ + @Override + public String toString() { + if (this.equals(Field.White)) + return "" + 0; + else + return "" + 1; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/FileInputHelper.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/FileInputHelper.java new file mode 100644 index 0000000..4f6aaa4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/FileInputHelper.java @@ -0,0 +1,70 @@ +package edu.kit.informatik.langton; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; + +import edu.kit.informatik.Terminal; + +/** + * Helper class for reading text files. + * + * @author IPD Reussner, KIT + * @author ITI Sinz, KIT + * @version 1.1 + */ +public final class FileInputHelper { + + /** + * Private constructor to avoid instantiation. + */ + private FileInputHelper() { + // intentionally left blank + } + + /** + * Reads the specified file and returns its content as a String array, where + * the first array field contains the + * file's first line, the second field contains the second line, and so on. + * + * @param file + * the file to be read + * @return the content of the file + */ + public static String[] read(final String file) { + final StringBuilder result = new StringBuilder(); + + FileReader in = null; + try { + in = new FileReader(file); + } catch (final FileNotFoundException e) { + Terminal.printLine("Error, " + e.getMessage()); + System.exit(1); + } + + final BufferedReader reader = new BufferedReader(in); + try { + String line = reader.readLine(); + while (line != null) { + result.append(line); + line = reader.readLine(); + if (line != null) { + result.append("\n"); + } + } + } catch (final IOException e) { + Terminal.printLine("Error, " + e.getMessage()); + System.exit(1); + } finally { + try { + reader.close(); + } catch (final IOException e) { + // no need for handling this exception + } + } + + return result.toString().split("\n"); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/LangtonGame.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/LangtonGame.java new file mode 100644 index 0000000..dbb573d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/LangtonGame.java @@ -0,0 +1,99 @@ +package edu.kit.informatik.langton; + +import edu.kit.informatik.Terminal; +import edu.kit.informatik.exceptions.FileNotCompalitbleException; + +/** + * The Class LangtonGame. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class LangtonGame { + + /** + * User input manager which manages input from the user and manipulates the + * game accordingly. + */ + private UserInputManager uInputMngr; + + /** + * Instantiates a new langton game. + * + * @param path + * the path + * @param gameType + * the game type + */ + public LangtonGame(final String path, final String gameType) { + try { + uInputMngr = new UserInputManager(readFile(path, gameType)); + } catch (IllegalArgumentException | FileNotCompalitbleException e) { + Terminal.printLine("Error: " + e.getMessage()); + } + } + + /** + * Runs the gameloop. + * + * @throws NullPointerException + * game has not been initilized correctly + */ + public void run() throws NullPointerException { + if (uInputMngr == null) + throw new NullPointerException("game cannot be run because UserInputManager has not bean set"); + while (!uInputMngr.isReadyToQuit()) { + uInputMngr.doCommand(Terminal.readLine()); + } + } + + private Board readFile(final String path, final String gameType) + throws FileNotCompalitbleException, IllegalArgumentException { + final String[] file = FileInputHelper.read(path); + Field[][] fieldArr; + final int width = file[0].length(); + final int height = file.length; + Ant ant = null; + + fieldArr = new Field[height][width]; + for (int i = 0; i < file.length; i++) { + final char[] c = file[i].toCharArray(); + if (c.length != width) + throw new FileNotCompalitbleException("file is not formatted correctly"); + for (int j = 0; j < c.length; j++) { + switch (c[j]) { + case 'N': + ant = new Ant(j, i, 0); + fieldArr[i][j] = Field.White; + break; + case 'E': + ant = new Ant(j, i, 90); + fieldArr[i][j] = Field.White; + break; + case 'S': + ant = new Ant(j, i, 180); + fieldArr[i][j] = Field.White; + break; + case 'W': + ant = new Ant(j, i, 270); + fieldArr[i][j] = Field.White; + break; + case '0': + fieldArr[i][j] = Field.White; + break; + case '1': + fieldArr[i][j] = Field.Black; + break; + default: + throw new FileNotCompalitbleException("file is not formatted correctly"); + } + } + } + if (gameType.equals("torus")) + return new Torusboard(fieldArr, ant); + else if (gameType.equals("standard")) + return new Board(fieldArr, ant); + else + throw new IllegalArgumentException("gameType has to be either 'torus' or 'standard'"); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Main.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Main.java new file mode 100644 index 0000000..a5f33ef --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Main.java @@ -0,0 +1,35 @@ +package edu.kit.informatik.langton; + +import edu.kit.informatik.Terminal; + +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + + private Main() { + } + + /** + * The main method. + * + * @param args + * the arguments + */ + public static void main(final String[] args) { + LangtonGame lg; + try { + lg = new LangtonGame(args[0], args[1]); + lg.run(); + } catch (ArrayIndexOutOfBoundsException e) { + Terminal.printLine("Error: please use 2 arguments to start the program ('path', 'torus' | 'standard')"); + } catch (NullPointerException e) { + Terminal.printLine("Error: " + e.getMessage()); + } + + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Torusboard.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Torusboard.java new file mode 100644 index 0000000..158ce75 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/Torusboard.java @@ -0,0 +1,46 @@ +package edu.kit.informatik.langton; + +import edu.kit.informatik.exceptions.GameHasEndedException; + +/** + * The Class Torusboard extends Board. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Torusboard extends Board { + + /** + * Instantiates a new torusboard. + * + * @param data + * the data of the board + * @param ant + * the ant + * @throws IllegalArgumentException + * if arguments that are used to instanziate Board have an error + */ + public Torusboard(final Field[][] data, final Ant ant) throws IllegalArgumentException { + super(data, ant); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.langton.Board#leftBoard() + */ + @Override + protected void leftBoard() throws GameHasEndedException, IllegalArgumentException { + if (this.getAnt().getXPos() >= this.getWidth()) { + this.getAnt().setXPos(this.getAnt().getXPos() - this.getWidth()); + } else if (this.getAnt().getYPos() >= this.getHeight()) { + this.getAnt().setYPos(this.getAnt().getYPos() - this.getHeight()); + } else if (this.getAnt().getXPos() < 0) { + this.getAnt().setXPos(getWidth() + this.getAnt().getXPos()); + } else if (this.getAnt().getYPos() < 0) { + this.getAnt().setYPos(getHeight() + this.getAnt().getYPos()); + } else { + throw new IllegalArgumentException("leftBoard() should not have been called"); + } + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/UserInputManager.java b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/UserInputManager.java new file mode 100644 index 0000000..29d3cb2 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/UserInputManager.java @@ -0,0 +1,115 @@ +package edu.kit.informatik.langton; + +import edu.kit.informatik.Terminal; +import edu.kit.informatik.exceptions.GameHasEndedException; +import edu.kit.informatik.exceptions.InvalidParameterException; + +/** + * The Class UserInputManager. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class UserInputManager { + + /** The board. */ + private final Board board; + + /** The boolean ready to quit used to store if game should end. */ + private boolean readyToQuit; + + /** + * Instantiates a new user input manager. + * + * @param board + * the board + */ + public UserInputManager(final Board board) { + this.board = board; + readyToQuit = false; + } + + /** + * Converts commands to actions that manipulates the Board. + * + * @param command + * the command as string + */ + public void doCommand(final String command) { + final String[] arr = command.split("[\\s,\\,]+"); + if (arr != null && arr[0] != null) { + try { + switch (arr[0]) { + case "move": + if (arr.length != 2) { + throw new InvalidParameterException("move expects 1 parameter"); + } + final int turnNumber = Integer.parseInt(arr[1]); + for (int i = 0; i < turnNumber; i++) { + board.makeTurn(); + } + break; + case "print": + if (arr.length != 1) { + throw new InvalidParameterException("print expects 0 parameter"); + } + Terminal.printLine(board.toString()); + break; + case "position": + if (arr.length != 1) { + throw new InvalidParameterException("position expects 0 parameters"); + } + Terminal.printLine(board.getAnt().toString()); + break; + case "field": + if (arr.length != 3) { + throw new InvalidParameterException("field expects 2 parameters"); + } + final int column = Integer.parseInt(arr[1]); + final int row = Integer.parseInt(arr[2]); + + try { + Terminal.printLine(board.getFieldAsString(row, column)); + } catch (final edu.kit.informatik.exceptions.InvalidParameterException e) { + throw new InvalidParameterException( + "coordinates are outside the board they have to be from 0 to " + + (board.getHeight() - 1) + " for the first parameter and from 0 to " + + (board.getWidth() - 1) + " for the second parameter"); + } + break; + case "direction": + if (arr.length != 1) { + throw new InvalidParameterException("print expects 0 parameters"); + } + Terminal.printLine(board.getAnt().getDirectionAsString()); + break; + case "quit": + if (arr.length != 1) { + throw new InvalidParameterException("quit expects 0 parameter"); + } + readyToQuit = true; + break; + default: + throw new InvalidParameterException( + "Invalid command. Commands are: 'quit', 'direction', 'field ', " + + "'position', 'print', 'move '"); + } + } catch (final InvalidParameterException e) { + Terminal.printLine("Error: " + e.getMessage()); + } catch (final GameHasEndedException e) { + readyToQuit = true; + } catch (final NumberFormatException e) { + Terminal.printLine("Error: Expected Number"); + } + } + } + + /** + * Checks if is program ready to quit. + * + * @return true, if is ready to quit + */ + public boolean isReadyToQuit() { + return readyToQuit; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/input.txt b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/input.txt new file mode 100644 index 0000000..968d8fa --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4A_LangtonAnt/src/edu/kit/informatik/langton/input.txt @@ -0,0 +1,3 @@ +0000 +0000 +0N00 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.checkstyle b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.checkstyle new file mode 100644 index 0000000..6c7b8f0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.classpath b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.project b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.project new file mode 100644 index 0000000..4edf762 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.project @@ -0,0 +1,17 @@ + + + Assignment4B_Bank + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..37ec6e7 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/Assignment4B_Bank.iml b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/Assignment4B_Bank.iml new file mode 100644 index 0000000..1570ffe --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/Assignment4B_Bank.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/Account.class b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/Account.class new file mode 100644 index 0000000..e7758f1 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/Account.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/Bank.class b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/Bank.class new file mode 100644 index 0000000..6657e47 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/Bank.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/Container.class b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/Container.class new file mode 100644 index 0000000..0b6b29d Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/Container.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/MinimaList.class b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/MinimaList.class new file mode 100644 index 0000000..3dc6832 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/bin/edu/kit/informatik/MinimaList.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/Account.java b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/Account.java new file mode 100644 index 0000000..fd596d9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/Account.java @@ -0,0 +1,124 @@ +package edu.kit.informatik; + +/** + * The Class Account. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Account implements Comparable { + + /** The account number. */ + private int accountNumber; + + /** The bank code. */ + private int bankCode; + + /** The balance. */ + private int balance; + + /** + * Instantiates a new account (balance is initialized with 0). + * + * @param bankCode + * the bank code + * @param accountNumber + * the account number + */ + public Account(int bankCode, int accountNumber) { + if (bankCode < 0 || accountNumber < 0) { + throw new IllegalArgumentException(); + } + this.bankCode = bankCode; + this.accountNumber = accountNumber; + balance = 0; + } + + /** + * Tries to withdraw money from the account (Fails if this would make + * balance negative). + * + * @param amount + * the amount that should be withdrawn + * @return true, if successful + */ + public boolean withdraw(int amount) { + if (balance - amount < 0 || amount < 0) { + return false; + } + + balance -= amount; + return true; + } + + /** + * Increases the balance of the account by 'amount'. + * + * @param amount + * the amount + */ + public void deposit(int amount) { + if (amount < 0) + throw new IllegalArgumentException("amount must be positive"); + balance += amount; + } + + /** + * Gets the account number. + * + * @return the account number + */ + public int getAccountNumber() { + return accountNumber; + } + + /** + * Gets the bank code. + * + * @return the bank code + */ + public int getBankCode() { + return bankCode; + } + + /** + * Gets the balance. + * + * @return the balance + */ + public int getBalance() { + return balance; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (obj instanceof Account && ((Account) obj).accountNumber == this.accountNumber) + return true; + return false; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ + @Override + public int compareTo(Account o) { + if (o.getAccountNumber() > this.getAccountNumber()) + return -1; + else if (o.getAccountNumber() < this.getAccountNumber()) + return 1; + + return 0; + } + + @Override + public String toString() { + return bankCode + "," + accountNumber + "," + balance; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/Bank.java b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/Bank.java new file mode 100644 index 0000000..a1a4933 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/Bank.java @@ -0,0 +1,135 @@ +package edu.kit.informatik; + +/** + * The Class Bank. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Bank { + + private MinimaList accounts; + private int bankCode; + + /** + * Instantiates a new bank. + * + * @param bankCode + * the bank code + */ + public Bank(int bankCode) { + accounts = new MinimaList(); + this.bankCode = bankCode; + } + + /** + * Creates an account. + * + * @param accountNumber + * the account number + * @return the index of the account + */ + public int createAccount(int accountNumber) { + Account acc = new Account(bankCode, accountNumber); + if (accounts.contains(acc)) { + throw new IllegalArgumentException("Account already exists."); + } else { + int index = 0; + for (int i = length() - 1; i >= 0; i--) { + // As soon as acc is bigger than current element + if (acc.compareTo(accounts.get(i)) > 0) { + index = i + 1; + break; + } + } + accounts.add(acc, index); + return index; + } + } + + /** + * Removes the account at the index. + * + * @param accountNumber + * the account number + * @return true, if successful + */ + public boolean removeAccount(int accountNumber) { + int index = accounts.getIndex(new Account(bankCode, accountNumber)); + if (index < 0) + return false; + return accounts.remove(index); + } + + /** + * Checks if account exists in this bank. + * + * @param accountNumber + * the account number + * @return true, if the account exists + */ + public boolean containsAccount(int accountNumber) { + if (accounts.contains(new Account(this.bankCode, accountNumber))) { + return true; + } + return false; + } + + /** + * Transfers money from one account to another. + * + * @param fromAccountNumber + * the account number of the account money is withdrawn from + * @param toAccountNumber + * the account number of the account money is deposited to + * @param amount + * the amount + * @return true, if successful + */ + public boolean transfer(int fromAccountNumber, int toAccountNumber, int amount) { + int fromIndex = accounts.getIndex(new Account(bankCode, fromAccountNumber)); + int toIndex = accounts.getIndex(new Account(bankCode, toAccountNumber)); + if (fromIndex < 0 || toIndex < 0) + return false; + + if (accounts.get(fromIndex).withdraw(amount)) { + accounts.get(toIndex).deposit(amount); + return true; + } + return false; + } + + /** + * Length. + * + * @return the int + */ + public int length() { + return accounts.size(); + } + + /** + * Gets the account at the index. + * + * @param index + * the index + * @return the account + */ + public Account getAccount(int index) { + return accounts.get(index); + } + + @Override + public String toString() { + return bankCode + "\n" + accounts; + } + + /** + * Gets the bank code. + * + * @return the bank code + */ + public int getBankCode() { + return bankCode; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/Container.java b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/Container.java new file mode 100644 index 0000000..73c2474 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/Container.java @@ -0,0 +1,55 @@ +package edu.kit.informatik; + +/** + * The Class Container. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Container { + + /** The account. */ + private Account account; + + /** The next element in the list. */ + private Container next; + + /** + * Instantiates a new container. + * + * @param account + * the account + */ + public Container(Account account) { + this.account = account; + this.next = null; + } + + /** + * Sets the next element. + * + * @param next + * the new next element + */ + public void setNext(Container next) { + this.next = next; + } + + /** + * Gets the next element. + * + * @return the next element + */ + public Container getNext() { + return next; + } + + /** + * Gets the account. + * + * @return the account + */ + public Account getAccount() { + return account; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/MinimaList.java b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/MinimaList.java new file mode 100644 index 0000000..806a787 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment4B_Bank/src/edu/kit/informatik/MinimaList.java @@ -0,0 +1,199 @@ +package edu.kit.informatik; + +/** + * The Class MinimaList. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class MinimaList { + + /** The first container that stores the first element of the list. */ + private Container firstContainer; + + /** The last container that stores the last element of the list. */ + private Container lastContainer; + /** The number of elements of the list. */ + private int size; + + /** + * Instantiates a new minima list. + */ + public MinimaList() { + size = 0; + firstContainer = null; + lastContainer = null; + } + + /** + * Adds an element at the end of the list. + * + * @param account + * the account + */ + public void add(Account account) { + if (firstContainer == null) { + this.firstContainer = new Container(account); + this.lastContainer = this.firstContainer; + } else { + Container tmp = new Container(account); + this.lastContainer.setNext(tmp); + this.lastContainer = tmp; + } + this.size++; + } + + /** + * Gets the index of an element. + * + * @param account + * the account + * @return the index + */ + public int getIndex(Account account) { + int pos = -1; + int i = 0; + Container pointer = firstContainer; + while (pointer != null) { + if (pointer.getAccount().equals(account)) { + return i; + } + pointer = pointer.getNext(); + i++; + } + return pos; + } + + /** + * Adds an element to the list at the given index + * + * @param account + * the account + * @param index + * the index + */ + public void add(Account account, int index) { + if (index >= size || index < 0) { + this.add(account); + } else if (index == 0) { + Container tmpContainer = new Container(account); + tmpContainer.setNext(firstContainer); + firstContainer = tmpContainer; + this.size++; + } else { + Container pointer = getContainer(index - 1); + Container tmpContainer = new Container(account); + tmpContainer.setNext(pointer.getNext()); + pointer.setNext(tmpContainer); + this.size++; + } + } + + /** + * Removes the element at the index from the list. + * + * @param index + * the index + * @return true, if successful + */ + public boolean remove(int index) { + if (index >= size || index < 0) { + return false; + } else if (index == 0) { + firstContainer = firstContainer.getNext(); + this.size--; + return true; + } else if (index == size - 1) { + lastContainer = getContainer(index - 1); + lastContainer.setNext(null); + this.size--; + return true; + } else { + + this.size--; + return true; + } + } + + /** + * Gets the first element of the list. + * + * @return the first + */ + public Account getFirst() { + return firstContainer.getAccount(); + } + + /** + * Gets the last element of the list. + * + * @return the last + */ + public Account getLast() { + return lastContainer.getAccount(); + } + + private Container getContainer(int index) { + if (index < 0 || index >= size) { + return null; + } + + Container pointer = firstContainer; + int i = 0; + while (i < index) { + pointer = pointer.getNext(); + i++; + } + return pointer; + } + + /** + * Gets the account at the index. + * + * @param index + * the index + * @return the account + */ + public Account get(int index) { + if (index < 0 || index >= size) { + return null; + } + return this.getContainer(index).getAccount(); + } + + /** + * Checks if element is part of the list. + * + * @param account + * the account + * @return true, if element is part of list + */ + public boolean contains(Account account) { + Container pointer = firstContainer; + while (pointer != null) { + if (pointer.getAccount().equals(account)) { + return true; + } + pointer = pointer.getNext(); + } + return false; + } + + /** + * @return the size of the list + */ + public int size() { + return size; + } + + @Override + public String toString() { + String ret = ""; + Container pointer = firstContainer; + while (pointer != null) { + ret += "\t" + pointer.getAccount() + "\n"; + pointer = pointer.getNext(); + } + return "\t" + ret.trim(); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.checkstyle b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.checkstyle new file mode 100644 index 0000000..b34102d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.classpath b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.project b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.project new file mode 100644 index 0000000..0344e71 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.project @@ -0,0 +1,17 @@ + + + Assignment5A_ConnectFour + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..170b611 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/Assignment5A_ConnectFour.iml b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/Assignment5A_ConnectFour.iml new file mode 100644 index 0000000..1570ffe --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/Assignment5A_ConnectFour.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/ConnectFourBoard.class b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/ConnectFourBoard.class new file mode 100644 index 0000000..ec2e419 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/ConnectFourBoard.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/ConnectFourGame.class b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/ConnectFourGame.class new file mode 100644 index 0000000..c040822 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/ConnectFourGame.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/InputManager.class b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/InputManager.class new file mode 100644 index 0000000..3367262 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/InputManager.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..05376f5 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/Terminal.class b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/Terminal.class new file mode 100644 index 0000000..b390b8b Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/Terminal.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/exceptions/IllegalMethodCallException.class b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/exceptions/IllegalMethodCallException.class new file mode 100644 index 0000000..5ba5f31 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/exceptions/IllegalMethodCallException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/exceptions/UserInputException.class b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/exceptions/UserInputException.class new file mode 100644 index 0000000..a7663b3 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/bin/edu/kit/informatik/exceptions/UserInputException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/ConnectFourBoard.java b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/ConnectFourBoard.java new file mode 100644 index 0000000..945e068 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/ConnectFourBoard.java @@ -0,0 +1,274 @@ +package edu.kit.informatik; + +import edu.kit.informatik.exceptions.IllegalMethodCallException; + +/** + * The Class ConnectFourBoard. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class ConnectFourBoard { + + private static final char FIRST_PLAYER = '0'; + private static final char SECOND_PLAYER = '1'; + private static final char EMPTY_BOARD = '-'; + private static final int HEIGHT = 7; + private static final int WIDTH = 7; + + /** + * The game data. Empty cells are represented as character that is stored in + * emptyBoard. Tokens are represented as characters that are stored in + * firstPlayer and secondPlayer. + */ + // data[row][column] + private final char[][] data; + + /** Stores who's turn it is. */ + private boolean isFirstPlayersTurn; + + /** Stores the player who has won if a player has won. */ + private char playerWon; + + /** + * Instantiates a new connect four board. + * + * default configuration: + * + * firstPlayer is instantiate with '0' + * secondPlayer is instantiated with '1' + * emptyBoard is instantiated with '-' + * width is instantiated with 7; + * height is instantiated with 7 + */ + public ConnectFourBoard() { + // initializing the board + playerWon = '-'; + data = new char[HEIGHT][WIDTH]; + isFirstPlayersTurn = true; + + for (int i = 0; i < data.length; i++) { + for (int j = 0; j < data[0].length; j++) { + data[i][j] = EMPTY_BOARD; + } + } + } + + /** + * Throws a token in the named column. The new token will be the character + * of the player who's turn it is and it will be placed one cell above the + * last thrown in token (row = height - existing tokens in column ). + * + * @param column + * the column the token should be thrown in + */ + public void throwIn(final int column) { + if (hasEnded()) { + throw new IllegalMethodCallException("Game has ended! Additional Turns are not allowed!"); + } else if (column < 0 || column >= data[0].length) { + throw new IllegalArgumentException( + "The column is outside of the board. It has to be a number from 0 to " + (WIDTH - 1)); + } + + final int row = (HEIGHT - 1) - getTokenInColumn(column); + + if (row < 0) { + throw new IllegalArgumentException("column is full"); + } + + char currentPlayer; + if (isFirstPlayersTurn) { + currentPlayer = FIRST_PLAYER; + } else { + currentPlayer = SECOND_PLAYER; + } + data[row][column] = currentPlayer; + + // Check if someone has won + + if (hasWonDiagonalTopLeft(row, column, currentPlayer) || haskWonVertically(row, column, currentPlayer) + || hasWonHorizontal(row, column, currentPlayer) || hasWonDiagonalTopRight(row, column, currentPlayer)) { + playerWon = currentPlayer; + return; + } + isFirstPlayersTurn = !isFirstPlayersTurn; + } + + private boolean haskWonVertically(final int row, final int column, final char currentPlayer) { + // Check below the token + int below = 0; + for (int i = 1; i <= 3; i++) { + if (isOnBoard(row + i, column) && data[row + i][column] == currentPlayer) { + below = i; + } else { + break; + } + } + // return true if more than four tokens are aligned vertically + return ((1 + below) >= 4); + } + + private boolean hasWonHorizontal(final int row, final int column, final char currentPlayer) { + // Check horizontal + int horizontalLeft = 0; + for (int i = 1; i <= 3; i++) { + if (isOnBoard(row, column - i) && data[row][column - i] == currentPlayer) { + horizontalLeft = i; + } else { + break; + } + } + int horizontalRight = 0; + for (int i = 1; i <= 3; i++) { + if (isOnBoard(row, column + i) && data[row][column + i] == currentPlayer) { + horizontalRight = i; + } else { + break; + } + } + // return true if more than four tokens are aligned horizontally + return ((horizontalLeft + 1 + horizontalRight) >= 4); + } + + private boolean hasWonDiagonalTopRight(final int row, final int column, final char currentPlayer) { + // Check diagonally topRight to bottomLeft + int topRight = 0; + for (int i = 1; i <= 3; i++) { + if (isOnBoard(row - i, column + i) && data[row - i][column + i] == currentPlayer) { + topRight = i; + } else { + break; + } + } + int bottomLeft = 0; + for (int i = 1; i <= 3; i++) { + if (isOnBoard(row + i, column - i) && data[row + i][column - i] == currentPlayer) { + bottomLeft = i; + } else { + break; + } + } + // return true if more than four tokens are aligned diagonally + return (topRight + 1 + bottomLeft >= 4); + } + + private boolean hasWonDiagonalTopLeft(final int row, final int column, final char currentPlayer) { + // Check diagonally topLeft to bottomRight + int topLeft = 0; + for (int i = 1; i <= 3; i++) { + if (isOnBoard(row - i, column - i) && data[row - i][column - i] == currentPlayer) { + topLeft = i; + } else { + break; + } + } + int bottomRight = 0; + for (int i = 1; i <= 3; i++) { + if (isOnBoard(row + i, column + i) && data[row + i][column + i] == currentPlayer) { + bottomRight = i; + } else { + break; + } + } + // return true if more than four tokens are aligned diagonally + return (bottomRight + 1 + topLeft >= 4); + } + + private int getTokenInColumn(final int column) { + for (int i = 0; i < data[column].length; i++) { + // Count elements starting from the bottom of the field + if (data[(HEIGHT - 1) - i][column] == '-') { + return i; + } + } + return HEIGHT; + } + + /** + * Checks for if game has ended. + * + * @return true, if has ended + */ + public boolean hasEnded() { + if (playerWon == FIRST_PLAYER || playerWon == SECOND_PLAYER) { + return true; + } else { + return isFull(); + } + } + + /** + * Checks if the board is filled completely. + * + * @return true, if is full + */ + private boolean isFull() { + for (int i = 0; i < WIDTH; i++) { + if (getTokenInColumn(i) < HEIGHT) { + return false; + } + } + return true; + } + + /** + * Checks if first player has won. + * + * @return true, if first player has won + */ + public boolean hasFirstPlayerWon() { + return (playerWon == FIRST_PLAYER); + } + + /** + * Checks if second player has won. + * + * @return true, if seceond player has won + */ + public boolean hasSecondPlayerWon() { + return (playerWon == SECOND_PLAYER); + } + + /** + * Gets one field/cell of the board. + * + * @param row + * the row or y-coordinate of the field + * @param column + * the column or x-coordinate of the field + * @return the field's value + */ + public char getField(final int row, final int column) { + if (!isOnBoard(row, column)) { + throw new IllegalArgumentException("Coordinates are not on the board."); + } + return data[row][column]; + } + + @Override + public String toString() { + String out = ""; + for (int y = 0; y < HEIGHT; y++) { + for (int x = 0; x < WIDTH; x++) { + out += Character.toString(data[y][x]); + } + out += "\n"; + } + + return out.trim(); + } + + /** + * Checks if coordinates are on board. + * + * @param row + * the row or y-coordinate + * @param column + * the column or x-coordinate + * @return true, if is on board + */ + public boolean isOnBoard(final int row, final int column) { + return !(row < 0 || row >= HEIGHT || column < 0 || column >= WIDTH); + + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/ConnectFourGame.java b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/ConnectFourGame.java new file mode 100644 index 0000000..b99b0ad --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/ConnectFourGame.java @@ -0,0 +1,29 @@ +package edu.kit.informatik; + +/** + * The Class ConnectFourGame. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class ConnectFourGame { + + /** The input manager. */ + private final InputManager inputManager; + + /** + * Instantiates a new connect four game. + */ + public ConnectFourGame() { + inputManager = new InputManager(); + } + + /** + * Runs the game. + */ + public void run() { + while (!inputManager.isReadyToQuit()) { + inputManager.runCommand(Terminal.readLine()); + } + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/InputManager.java b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/InputManager.java new file mode 100644 index 0000000..63d944e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/InputManager.java @@ -0,0 +1,112 @@ +package edu.kit.informatik; + +import edu.kit.informatik.exceptions.IllegalMethodCallException; +import edu.kit.informatik.exceptions.UserInputException; + +/** + * The Class InputManager. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class InputManager { + private final String invalidCommand; + private final ConnectFourBoard board; + /** The boolean ready to quit used to store if game should end. */ + private boolean readyToQuit; + + /** + * Instantiates a new input manager. + */ + public InputManager() { + invalidCommand = "Error: Invalid command. Commands are: 'quit', " + + "'field ,', 'print', 'throwin '"; + board = new ConnectFourBoard(); + readyToQuit = false; + } + + /** + * Converts commands to actions that manipulates the Board. + * + * @param command + * the command as string + */ + public void runCommand(final String command) { + if (command == null) { + Terminal.printLine(invalidCommand); + return; + } + final String[] arr = command.split("[\\s]"); + + String[] parameters; + try { + parameters = arr[1].split("[\\,]"); + } catch (final ArrayIndexOutOfBoundsException e) { + parameters = new String[0]; + } + + if (arr != null && arr[0] != null) { + try { + switch (arr[0]) { + case "quit": + if (parameters.length != 0) { + throw new UserInputException("quit expects zero parameters"); + } + readyToQuit = true; + break; + case "field": + if (parameters.length != 2) { + throw new UserInputException("field expects two parameters: field ,"); + } + Terminal.printLine(Character.toString( + board.getField(Integer.parseInt(parameters[0]), Integer.parseInt(parameters[1])))); + break; + case "print": + if (parameters.length != 0) { + throw new UserInputException("print expects zero parameters"); + } + Terminal.printLine(board.toString()); + break; + case "throwin": + if (parameters.length != 1) { + throw new UserInputException("throwin expects one parameter: throwin "); + } + + board.throwIn(Integer.parseInt(parameters[0])); + + if (board.hasEnded()) { + if (board.hasFirstPlayerWon()) { + Terminal.printLine("P0 wins"); + } else if (board.hasSecondPlayerWon()) { + Terminal.printLine("P1 wins"); + } else { + Terminal.printLine("draw"); + } + } else { + Terminal.printLine("success"); + } + break; + default: + throw new UserInputException(invalidCommand); + } + } catch (final UserInputException e) { + Terminal.printLine("Error: " + e.getMessage()); + } catch (final NumberFormatException e) { + Terminal.printLine("Error: expected number(s) as parameter(s)"); + } catch (final IllegalArgumentException e) { + Terminal.printLine("Error: " + e.getMessage()); + } catch (final IllegalMethodCallException e) { + Terminal.printLine("Error: " + e.getMessage()); + } + } + } + + /** + * Checks if is program ready to quit. + * + * @return true, if is ready to quit + */ + public boolean isReadyToQuit() { + return readyToQuit; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..35f3fa8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/Main.java @@ -0,0 +1,25 @@ +package edu.kit.informatik; + +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + + private Main() { + } + + /** + * The main method. + * + * @param args + * the arguments + */ + public static void main(final String[] args) { + final ConnectFourGame game = new ConnectFourGame(); + game.run(); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/Terminal.java b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/Terminal.java new file mode 100644 index 0000000..947998d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/Terminal.java @@ -0,0 +1,64 @@ +package edu.kit.informatik; + + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * This class provides some simple methods for input/output from and to a terminal. + * + * Never modify this class, never upload it to Praktomat. This is only for your local use. If an assignment tells you to + * use this class for input and output never use System.out or System.in in the same assignment. + * + * @author ITI, VeriAlg Group + * @author IPD, SDQ Group + * @version 4 + */ +public final class Terminal { + + /** + * BufferedReader for reading from standard input line-by-line. + */ + private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + + /** + * Private constructor to avoid object generation. + */ + private Terminal() { + } + + /** + * Print a String to the standard output. + * + * The String out must not be null. + * + * @param out + * The string to be printed. + */ + public static void printLine(String out) { + System.out.println(out); + } + + /** + * Reads a line from standard input. + * + * Returns null at the end of the standard input. + * + * Use Ctrl+D to indicate the end of the standard input. + * + * @return The next line from the standard input or null. + */ + public static String readLine() { + try { + return in.readLine(); + } catch (IOException e) { + /* + * rethrow unchecked (!) exception to prevent students from being forced to use Exceptions before they have + * been introduced in the lecture. + */ + throw new RuntimeException(e); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/exceptions/IllegalMethodCallException.java b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/exceptions/IllegalMethodCallException.java new file mode 100644 index 0000000..0a249c0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/exceptions/IllegalMethodCallException.java @@ -0,0 +1,21 @@ +package edu.kit.informatik.exceptions; + +/** + * The Class IllegalMethodCallException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class IllegalMethodCallException extends RuntimeException { + + /** + * Instantiates a new illegal method call exception. + * + * @param string + * the string + */ + public IllegalMethodCallException(final String string) { + super(string); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/exceptions/UserInputException.java b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/exceptions/UserInputException.java new file mode 100644 index 0000000..06b1ca3 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5A_ConnectFour/src/edu/kit/informatik/exceptions/UserInputException.java @@ -0,0 +1,21 @@ +package edu.kit.informatik.exceptions; + +/** + * The Class UserInputException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class UserInputException extends Exception { + + /** + * Instantiates a new user input exception. + * + * @param string + * the string + */ + public UserInputException(final String string) { + super(string); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.checkstyle b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.checkstyle new file mode 100644 index 0000000..b34102d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.classpath b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.project b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.project new file mode 100644 index 0000000..279d085 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.project @@ -0,0 +1,17 @@ + + + Assignment5B_Bank + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..4727f3e Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/Assignment5B_Bank.iml b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/Assignment5B_Bank.iml new file mode 100644 index 0000000..1570ffe --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/Assignment5B_Bank.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Account.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Account.class new file mode 100644 index 0000000..831765c Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Account.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/AccountHolder.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/AccountHolder.class new file mode 100644 index 0000000..986ea64 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/AccountHolder.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Bank.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Bank.class new file mode 100644 index 0000000..a0d2d90 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Bank.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/BankRegistry.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/BankRegistry.class new file mode 100644 index 0000000..3c38264 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/BankRegistry.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..c218410 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Terminal.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Terminal.class new file mode 100644 index 0000000..05e9edd Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/Terminal.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/exceptions/InvalidCommandException.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/exceptions/InvalidCommandException.class new file mode 100644 index 0000000..1be63f5 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/exceptions/InvalidCommandException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/list/Container.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/list/Container.class new file mode 100644 index 0000000..52d72e6 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/list/Container.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/list/MinimaList.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/list/MinimaList.class new file mode 100644 index 0000000..3a7f2c8 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/list/MinimaList.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/list/Pair.class b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/list/Pair.class new file mode 100644 index 0000000..7051262 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/bin/edu/kit/informatik/list/Pair.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Account.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Account.java new file mode 100644 index 0000000..ea037a0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Account.java @@ -0,0 +1,108 @@ +package edu.kit.informatik; +/** + * The Class Account. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Account { + + /** The account number. */ + private final int accountNumber; + + /** The bank code. */ + private final int bankCode; + + /** The balance. */ + private int balance; + + /** + * Instantiates a new account (balance is initialized with 0). + * + * @param bankCode + * the bank code + * @param accountNumber + * the account number + */ + public Account(final int bankCode, final int accountNumber) { + if (bankCode < 0 || accountNumber < 0) { + throw new IllegalArgumentException("Account number and bankCode have to be positive integers."); + } + this.bankCode = bankCode; + this.accountNumber = accountNumber; + balance = 0; + } + + /** + * Tries to withdraw money from the account (Fails if this would make + * balance negative). + * + * @param amount + * the amount that should be withdrawn + * @return true, if successful + */ + public boolean withdraw(final int amount) { + if (balance - amount < 0 || amount < 0) { + return false; + } + + balance -= amount; + return true; + } + + /** + * Increases the balance of the account by 'amount'. + * + * @param amount + * the amount + * @throws OverflowException + */ + public void deposit(final int amount) { + if (amount < 0) { + throw new IllegalArgumentException("amount must be positive"); + } + balance += amount; + } + + /** + * Gets the account number. + * + * @return the account number + */ + public int getAccountNumber() { + return accountNumber; + } + + /** + * Gets the bank code. + * + * @return the bank code + */ + public int getBankCode() { + return bankCode; + } + + /** + * Gets the balance. + * + * @return the balance + */ + public int getBalance() { + return balance; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(final Object obj) { + return (obj instanceof Account && ((Account) obj).accountNumber == this.accountNumber); + } + + @Override + public String toString() { + return bankCode + "," + accountNumber + "," + balance; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/AccountHolder.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/AccountHolder.java new file mode 100644 index 0000000..8fbd675 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/AccountHolder.java @@ -0,0 +1,62 @@ +package edu.kit.informatik; +/** + * The Class AccountHolder. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class AccountHolder { + + /** The first name. */ + private final String firstName; + + /** The last name. */ + private final String lastName; + + /** The personnel number. */ + private final int personnelNumber; + + /** + * Instantiates a new account holder. + * + * @param firstName + * the first name + * @param lastName + * the last name + * @param personnelNumber + * the personnel number + */ + public AccountHolder(final String firstName, final String lastName, final int personnelNumber) { + this.firstName = firstName; + this.lastName = lastName; + this.personnelNumber = personnelNumber; + } + + /** + * Gets the first name. + * + * @return the first name + */ + public String getFirstName() { + return firstName; + } + + /** + * Gets the last name. + * + * @return the last name + */ + public String getLastName() { + return lastName; + } + + /** + * Gets the personnel number. + * + * @return the personnel number + */ + public int getPersonnelNumber() { + return personnelNumber; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Bank.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Bank.java new file mode 100644 index 0000000..f7c2ef4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Bank.java @@ -0,0 +1,246 @@ +package edu.kit.informatik; + +import edu.kit.informatik.exceptions.InvalidCommandException; +import edu.kit.informatik.list.Container; +import edu.kit.informatik.list.MinimaList; +import edu.kit.informatik.list.Pair; + +/** + * The Class Bank. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Bank { + + /** The bank code. */ + private final int bankCode; + + /** The data. */ + private final MinimaList>> data; + + /** + * Instantiates a new bank. + * + * @param bankCode + * the bank code + */ + public Bank(final int bankCode) { + this.bankCode = bankCode; + data = new MinimaList>>(); + } + + /** + * Adds a user. + * + * @param firstName + * the first name + * @param lastName + * the last name + * @param personnelNumber + * the personnel number + */ + public void addUser(final String firstName, final String lastName, final int personnelNumber) { + final AccountHolder accHolder = new AccountHolder(firstName, lastName, personnelNumber); + data.add(new Pair>(accHolder, new MinimaList())); + } + + /** + * Adds an account. + * + * @param accountNumber + * the account number + * @param personnelNumber + * the personnel number + * @return true, if successful + * @throws InvalidCommandException + * the invalid command exception + */ + public boolean addAccount(final int accountNumber, final int personnelNumber) throws InvalidCommandException { + Container>> container = data.getFirstContainer(); + while (container != null) { + if (container.getData().getFirst().getPersonnelNumber() == personnelNumber) { + container.getData().getSecond().add(new Account(bankCode, accountNumber)); + return true; + } + + container = container.getNext(); + } + throw new InvalidCommandException( + "the person with this personnel number(" + personnelNumber + ") is not at this bank."); + } + + /** + * Removes an account. + * + * @param accountNumber + * the account number + * @return true, if successful + */ + public boolean removeAccount(final int accountNumber) { + if (containsAccount(accountNumber)) { + Container>> container = data.getFirstContainer(); + while (container != null) { + final Pair> pair = container.getData(); + final int index = pair.getSecond().getIndex(new Account(bankCode, accountNumber)); + + if (pair.getSecond().remove(index)) { + return true; + } + container = container.getNext(); + } + } + return false; + } + + /** + * Deposits money. + * + * @param accountNumber + * the account number + * @param amount + * the amount + */ + public void deposit(final int accountNumber, final int amount) { + final Account acc = getAccount(accountNumber); + acc.deposit(amount); + } + + /** + * Withdraws money. + * + * @param accountNumber + * the account number + * @param amount + * the amount + * @return true, if successful + */ + public boolean withdraw(final int accountNumber, final int amount) { + final Account acc = getAccount(accountNumber); + return acc.withdraw(amount); + } + + /** + * Internal bank transfer. + * + * @param fromAccountNumber + * the from account number + * @param toAccountNumber + * the to account number + * @param amount + * the amount + * @throws InvalidCommandException + * the invalid parameter exception + */ + public void internalBankTransfer(final int fromAccountNumber, final int toAccountNumber, final int amount) + throws InvalidCommandException { + + final Account from = getAccount(fromAccountNumber); + final Account to = getAccount(toAccountNumber); + if (to == null || from == null) { + throw new InvalidCommandException("either the account (" + fromAccountNumber + + ") the money shouled be transfered from or the account (" + toAccountNumber + + ") the money should be transefered to does not exist."); + } + if (!from.withdraw(amount)) { + throw new InvalidCommandException("amount could not be withdrawn from account (" + fromAccountNumber + ")"); + } + to.deposit(amount); + } + + /** + * Gets the account count of an account holder. + * + * @param personnelNumber + * the personnel number + * @return the account count + */ + public int getAccountCount(final int personnelNumber) { + Container>> container = data.getFirstContainer(); + while (container != null) { + final Pair> pair = container.getData(); + if (pair.getFirst().getPersonnelNumber() == personnelNumber) { + return pair.getSecond().size(); + } + container = container.getNext(); + } + return 0; + } + + /** + * Checks if account is contained. + * + * @param accountNumber + * the account number + * @return true, if contained + */ + public boolean containsAccount(final int accountNumber) { + Container>> container = data.getFirstContainer(); + while (container != null) { + final Pair> pair = container.getData(); + if (pair.getSecond().contains(new Account(bankCode, accountNumber))) { + return true; + } + container = container.getNext(); + } + return false; + } + + /** + * Gets the account. + * + * @param accountNumber + * the account number + * @return the account + */ + public Account getAccount(final int accountNumber) { + Container>> container = data.getFirstContainer(); + while (container != null) { + final Pair> pair = container.getData(); + final int index = pair.getSecond().getIndex(new Account(bankCode, accountNumber)); + if (index >= 0) { + return pair.getSecond().get(index); + } + container = container.getNext(); + } + return null; + } + + /** + * Balance. + * + * @param accountNumber + * the account number + * @return the int + * @throws InvalidCommandException + * the invalid parameter exception + */ + public int balance(final int accountNumber) throws InvalidCommandException { + final Account acc = getAccount(accountNumber); + if (acc == null) { + throw new InvalidCommandException( + "the bank (" + this.bankCode + ") does not contain the account (" + accountNumber + ")"); + } else { + return acc.getBalance(); + } + } + + /** + * Gets the bank code. + * + * @return the bank code + */ + public int getBankCode() { + return bankCode; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(final Object obj) { + return (obj instanceof Bank || ((Bank) obj).bankCode == this.bankCode); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/BankRegistry.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/BankRegistry.java new file mode 100644 index 0000000..0ea3645 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/BankRegistry.java @@ -0,0 +1,335 @@ +package edu.kit.informatik; + +import edu.kit.informatik.exceptions.InvalidCommandException; +import edu.kit.informatik.list.Container; +import edu.kit.informatik.list.MinimaList; + +/** + * The Class BankRegistry. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class BankRegistry { + private boolean readyToQuit; + private final MinimaList banks; + + /** + * Instantiates a new bank registry. + */ + public BankRegistry() { + readyToQuit = false; + banks = new MinimaList(); + } + + /** + * Run the bank registry + */ + public void run() { + while (!readyToQuit) { + try { + processCommand(Terminal.readLine()); + } catch (final InvalidCommandException e) { + Terminal.printLine("Error: " + e.getMessage()); + } + } + } + + private boolean processBankActions(final String action, final String[] parameters) throws InvalidCommandException { + switch (action) { + case "addbank": { + if (parameters.length != 1) { + throw new InvalidCommandException("addbank expects one parameter: addbank "); + } + final int bankCode = Integer.parseInt(parameters[0]); + addBank(bankCode); + Terminal.printLine("OK"); + return true; + } + case "adduser": { + if (parameters.length != 4) { + throw new InvalidCommandException("adduser expects four parameters: " + + "addbank ;;;"); + } + final String firstName = parameters[0]; + final String lastName = parameters[1]; + final int personnelNumber = Integer.parseInt(parameters[2]); + final int bankCode = Integer.parseInt(parameters[3]); + + addUser(firstName, lastName, personnelNumber, bankCode); + Terminal.printLine("OK"); + return true; + } + case "addaccount": { + if (parameters.length != 3) { + throw new InvalidCommandException("addaccount expects three parameters: " + + "addaccount ;;"); + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int personnelNumber = Integer.parseInt(parameters[1]); + final int bankCode = Integer.parseInt(parameters[2]); + + addAccount(accountNumber, personnelNumber, bankCode); + Terminal.printLine("OK"); + return true; + } + case "removeaccount": { + if (parameters.length != 2) { + throw new InvalidCommandException( + "removeaccount expects two parameters: removeaccount ;;"); + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + + removeAccount(accountNumber, bankCode); + Terminal.printLine("OK"); + return true; + } + case "containsaccount": { + if (parameters.length != 2) { + throw new InvalidCommandException( + "containsaccount expects two parameters: containsaccount ;"); + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + + Terminal.printLine(new Boolean(containsAccount(accountNumber, bankCode)).toString()); + return true; + } + case "getaccountnumber": { + if (parameters.length != 1) { + throw new InvalidCommandException( + "getaccountnumber expects one parameter: getaccountnumber "); + } + final int personnelNumber = Integer.parseInt(parameters[0]); + + Terminal.printLine(new Integer(getAccountCount(personnelNumber)).toString()); + return true; + } + default: + return false; + } + } + + private void processCommand(final String command) throws InvalidCommandException { + final String action = command.split(" ")[0]; + String[] parameters = new String[0]; + if (command.split(" ").length >= 2) { + parameters = (command.split(" ")[1]).split(";"); + } + + switch (action) { + case "deposit": { + if (parameters.length != 3) { + throw new InvalidCommandException( + "deposit expects three parameters: deposit ;;"); + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + final int amount = Integer.parseInt(parameters[2]); + + deposit(accountNumber, bankCode, amount); + Terminal.printLine("OK"); + break; + } + case "withdraw": { + if (parameters.length != 3) { + throw new InvalidCommandException( + "withdraw expects three parameters: withdraw ;;"); + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + final int amount = Integer.parseInt(parameters[2]); + + withdraw(accountNumber, bankCode, amount); + Terminal.printLine("OK"); + break; + } + case "transfer": { + if (parameters.length != 5) { + throw new InvalidCommandException("transfer expects five xparameters: " + + "transfer ;;;;"); + } + final int fromAccountNumber = Integer.parseInt(parameters[0]); + final int fromBankCode = Integer.parseInt(parameters[1]); + final int toAccountNumber = Integer.parseInt(parameters[2]); + final int toBankCode = Integer.parseInt(parameters[3]); + final int amount = Integer.parseInt(parameters[4]); + + transfer(fromAccountNumber, fromBankCode, toAccountNumber, toBankCode, amount); + Terminal.printLine("OK"); + break; + } + case "balance": { + if (parameters.length != 2) { + throw new InvalidCommandException( + "balance expects two parameters: balance ;"); + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + + Terminal.printLine(new Integer(balance(accountNumber, bankCode)).toString()); + break; + } + case "quit": + if (parameters.length != 0) { + throw new InvalidCommandException("quit expects zero parameters: quit"); + } + readyToQuit = true; + break; + default: + if (!processBankActions(action, parameters)) { + throw new InvalidCommandException( + "command not found, supported commands: 'quit', 'balance ;', " + + "'containsaccount ;', 'getaccountnumber " + + "', 'transfer ;;" + + ";;', 'withdraw ;" + + ";', 'deposit ;;', 'removeaccount " + + ";;', 'addaccount ;;" + + "', 'addbank '"); + } + } + } + + private void addBank(final int bankCode) throws InvalidCommandException { + final Bank b = new Bank(bankCode); + if (bankCode <= 0) { + throw new InvalidCommandException("bank code has to be a positive integer"); + } + if (banks.contains(b)) { + throw new InvalidCommandException("bank with this bank code already exists"); + } + banks.add(b); + } + + private void addUser(final String firstName, final String lastName, final int personnelNumber, final int bankCode) + throws InvalidCommandException { + + if (!(isValidName(firstName) && isValidName(lastName))) { + throw new InvalidCommandException("names have to be in lowercase and can only contain characters a-z"); + } + if (!(isNaturalNumber(personnelNumber) && isNaturalNumber(bankCode))) { + throw new InvalidCommandException("numbers have to be natural numbers"); + } + final int index = banks.getIndex(new Bank(bankCode)); + if (index < 0) { + throw new InvalidCommandException("bank (" + bankCode + ") does not exist"); + } + banks.get(index).addUser(firstName, lastName, personnelNumber); + } + + private boolean isNaturalNumber(final int number) { + return (number > 0); + } + + private boolean isValidName(final String name) { + if (name == "") { + return false; + } + + final char[] chars = name.toCharArray(); + for (final char c : chars) { + // If char is not a lower-case letter + if (!(Character.isLowerCase(c) && Character.isLetter(c))) { + return false; + } + } + return true; + } + + private void addAccount(final int accountNumber, final int personnelNumber, final int bankCode) + throws InvalidCommandException { + if (!(isNaturalNumber(personnelNumber) && isNaturalNumber(bankCode) && isNaturalNumber(accountNumber))) { + throw new InvalidCommandException("numbers have to be natural numbers"); + } + final int index = banks.getIndex(new Bank(bankCode)); + if (index < 0) { + throw new InvalidCommandException("bank (" + bankCode + ") does not exist"); + } + banks.get(index).addAccount(accountNumber, personnelNumber); + } + + private void removeAccount(final int accountNumber, final int bankCode) throws InvalidCommandException { + if (!(isNaturalNumber(accountNumber) && isNaturalNumber(bankCode))) { + throw new InvalidCommandException("numbers have to be natural numbers"); + } + final int index = banks.getIndex(new Bank(bankCode)); + if (index < 0) { + throw new InvalidCommandException("bank (" + bankCode + ") does not exist"); + } + banks.get(index).removeAccount(accountNumber); + } + + private void deposit(final int accountNumber, final int bankCode, final int amount) throws InvalidCommandException { + if (!isNaturalNumber(accountNumber) || !isNaturalNumber(bankCode) || !isNaturalNumber(amount)) { + throw new InvalidCommandException("numbers have to be natural numbers"); + } + final int index = banks.getIndex(new Bank(bankCode)); + if (index < 0) { + throw new InvalidCommandException("bank (" + bankCode + ") does not exist"); + } + banks.get(index).deposit(accountNumber, amount); + } + + private void withdraw(final int accountNumber, final int bankCode, final int amount) + throws InvalidCommandException { + if (!isNaturalNumber(accountNumber) || !isNaturalNumber(bankCode) || !isNaturalNumber(amount)) { + throw new InvalidCommandException("numbers have to be natural numbers"); + } + final int index = banks.getIndex(new Bank(bankCode)); + if (index < 0) { + throw new InvalidCommandException("bank (" + bankCode + ") does not exist"); + } + banks.get(index).withdraw(accountNumber, amount); + } + + private void transfer(final int fromAccountNumber, final int fromBankCode, final int toAccountNumber, + final int toBankCode, final int amount) throws InvalidCommandException { + if (!isNaturalNumber(fromAccountNumber) || !isNaturalNumber(fromBankCode) || !isNaturalNumber(toAccountNumber) + || !isNaturalNumber(toBankCode) || !isNaturalNumber(amount)) { + throw new InvalidCommandException("numbers have to be natural numbers"); + } + + if (fromBankCode == toBankCode) { + // Internal bank transfer + final int index = banks.getIndex(new Bank(fromBankCode)); + if (index < 0) { + throw new InvalidCommandException("bank (" + fromBankCode + ") does not exist"); + } + banks.get(index).internalBankTransfer(fromAccountNumber, toAccountNumber, amount); + } else { + // external bank transfer + withdraw(fromAccountNumber, fromBankCode, amount); + deposit(toAccountNumber, toBankCode, amount); + } + } + + private int getAccountCount(final int personnelNumber) { + Container container = banks.getFirstContainer(); + while (container != null) { + final Bank bank = container.getData(); + if (bank.getAccountCount(personnelNumber) > 0) { + return bank.getAccountCount(personnelNumber); + } + container = container.getNext(); + } + return 0; + } + + private boolean containsAccount(final int accountNumber, final int bankCode) throws InvalidCommandException { + final int index = banks.getIndex(new Bank(bankCode)); + if (index == -1) { + throw new InvalidCommandException("bank with this bankcode does not exist"); + } + return banks.get(index).containsAccount(accountNumber); + } + + private int balance(final int accountNumber, final int bankCode) throws InvalidCommandException { + final int index = banks.getIndex(new Bank(bankCode)); + if (index == -1) { + throw new InvalidCommandException("bank with this bankcode does not exist"); + } + return banks.get(index).balance(accountNumber); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..d3e05c6 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Main.java @@ -0,0 +1,22 @@ +package edu.kit.informatik; +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + private Main() { + } + + /** + * The main method. + * + * @param args + * the arguments + */ + public static void main(final String[] args) { + final BankRegistry bankRegistry = new BankRegistry(); + bankRegistry.run(); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Terminal.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Terminal.java new file mode 100644 index 0000000..d7a1ee3 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/Terminal.java @@ -0,0 +1,67 @@ +package edu.kit.informatik; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * This class provides some simple methods for input/output from and to a + * terminal. + * + * Never modify this class, never upload it to Praktomat. This is only for your + * local use. If an assignment tells you to + * use this class for input and output never use System.out or System.in in the + * same assignment. + * + * @author ITI, VeriAlg Group + * @author IPD, SDQ Group + * @version 4 + */ +public final class Terminal { + + /** + * BufferedReader for reading from standard input line-by-line. + */ + private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + + /** + * Private constructor to avoid object generation. + */ + private Terminal() { + } + + /** + * Print a String to the standard output. + * + * The String out must not be null. + * + * @param out + * The string to be printed. + */ + public static void printLine(final String out) { + System.out.println(out); + } + + /** + * Reads a line from standard input. + * + * Returns null at the end of the standard input. + * + * Use Ctrl+D to indicate the end of the standard input. + * + * @return The next line from the standard input or null. + */ + public static String readLine() { + try { + return in.readLine(); + } catch (final IOException e) { + /* + * rethrow unchecked (!) exception to prevent students from being + * forced to use Exceptions before they have + * been introduced in the lecture. + */ + throw new RuntimeException(e); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/exceptions/InvalidCommandException.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/exceptions/InvalidCommandException.java new file mode 100644 index 0000000..b65cd62 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/exceptions/InvalidCommandException.java @@ -0,0 +1,20 @@ +package edu.kit.informatik.exceptions; + +/** + * The Class InvalidCommandException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class InvalidCommandException extends Exception { + + /** + * Instantiates a new invalid command exception. + * + * @param message + * the message + */ + public InvalidCommandException(final String message) { + super(message); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/list/Container.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/list/Container.java new file mode 100644 index 0000000..04c00ad --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/list/Container.java @@ -0,0 +1,58 @@ +package edu.kit.informatik.list; + +/** + * The Class Container. + * + * @author Hannes Kuchelmeister + * @version 1.0 + * @param + * the generic type + */ +public class Container { + + /** The data. */ + private final T data; + + /** The next. */ + private Container next; + + /** + * Instantiates a new container. + * + * @param data + * the data + */ + public Container(final T data) { + this.data = data; + this.next = null; + } + + /** + * Sets the next. + * + * @param next + * the new next + */ + public void setNext(final Container next) { + this.next = next; + } + + /** + * Gets the next. + * + * @return the next + */ + public Container getNext() { + return next; + } + + /** + * Gets the data. + * + * @return the data + */ + public T getData() { + return data; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/list/MinimaList.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/list/MinimaList.java new file mode 100644 index 0000000..ded3f2b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/list/MinimaList.java @@ -0,0 +1,224 @@ +package edu.kit.informatik.list; + +/** + * The Class MinimaList. + * + * @author Hannes Kuchelmeister + * @version 1.0 + * @param + * the generic type + */ +public class MinimaList { + + /** The first container that stores the first element of the list. */ + private Container firstContainer; + + /** The last container that stores the last element of the list. */ + private Container lastContainer; + /** The number of elements of the list. */ + private int size; + + /** + * Instantiates a new minima list. + */ + public MinimaList() { + size = 0; + firstContainer = null; + lastContainer = null; + } + + /** + * Adds an element at the end of the list. + * + * @param element + * the account + */ + public void add(final T element) { + if (firstContainer == null) { + this.firstContainer = new Container(element); + this.lastContainer = this.firstContainer; + } else { + final Container tmp = new Container(element); + this.lastContainer.setNext(tmp); + this.lastContainer = tmp; + } + this.size++; + } + + /** + * Gets the index of an element. + * + * @param element + * the account + * @return the index + */ + public int getIndex(final T element) { + final int pos = -1; + int i = 0; + Container pointer = firstContainer; + while (pointer != null) { + if (pointer.getData().equals(element)) { + return i; + } + pointer = pointer.getNext(); + i++; + } + return pos; + } + + /** + * Adds an element to the list at the given index. + * + * @param element + * the element + * @param index + * the index + */ + public void add(final T element, final int index) { + if (index >= size || index < 0) { + this.add(element); + } else if (index == 0) { + final Container tmpContainer = new Container(element); + tmpContainer.setNext(firstContainer); + firstContainer = tmpContainer; + this.size++; + } else { + final Container pointer = getContainer(index - 1); + final Container tmpContainer = new Container(element); + tmpContainer.setNext(pointer.getNext()); + pointer.setNext(tmpContainer); + this.size++; + } + } + + /** + * Removes the element at the index from the list. + * + * @param index + * the index + * @return true, if successful + */ + public boolean remove(final int index) { + if (index >= size || index < 0) { + return false; + } else if (index == 0) { + firstContainer = firstContainer.getNext(); + this.size--; + return true; + } else if (index == size - 1) { + lastContainer = getContainer(index - 1); + lastContainer.setNext(null); + this.size--; + return true; + } else { + + this.size--; + return true; + } + } + + /** + * Gets the first element of the list. + * + * @return the first + */ + public T getFirst() { + return firstContainer.getData(); + } + + /** + * Gets the last element of the list. + * + * @return the last + */ + public T getLast() { + return lastContainer.getData(); + } + + /** + * Gets the container. + * + * @param index + * the index + * @return the container + */ + private Container getContainer(final int index) { + if (index < 0 || index >= size) { + return null; + } + + Container pointer = firstContainer; + int i = 0; + while (i < index) { + pointer = pointer.getNext(); + i++; + } + return pointer; + } + + /** + * Gets the element at given index. + * + * @param index + * the index + * @return the element + */ + public T get(final int index) { + if (index < 0 || index >= size) { + return null; + } + return this.getContainer(index).getData(); + } + + /** + * Checks if element is part of the list. + * + * @param element + * the element + * @return true, if element is part of list + */ + public boolean contains(final T element) { + Container pointer = firstContainer; + while (pointer != null) { + if (pointer.getData().equals(element)) { + return true; + } + pointer = pointer.getNext(); + } + return false; + } + + /** + * Size. + * + * @return the size of the list + */ + public int size() { + return size; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + String ret = ""; + Container pointer = firstContainer; + while (pointer != null) { + ret += "\t" + pointer.getData().toString() + "\n"; + pointer = pointer.getNext(); + } + return "\t" + ret.trim(); + } + + /** + * Gets the first container. + * + * @return the first container + */ + public Container getFirstContainer() { + return firstContainer; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/list/Pair.java b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/list/Pair.java new file mode 100644 index 0000000..559e348 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment5B_Bank/src/edu/kit/informatik/list/Pair.java @@ -0,0 +1,50 @@ +package edu.kit.informatik.list; + +/** + * The Class Pair. + * + * @author Hannes Kuchelmeister + * @version 1.0 + * + * @param + * the generic type + * @param + * the generic type + */ +public class Pair { + + private final T first; + private final U second; + + /** + * Instantiates a new pair. + * + * @param first + * the first + * @param second + * the second + */ + public Pair(final T first, final U second) { + this.first = first; + this.second = second; + } + + /** + * Gets the first element of the pair. + * + * @return the first + */ + public T getFirst() { + return first; + } + + /** + * Gets the second element of the pair. + * + * @return the second + */ + public U getSecond() { + return second; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.checkstyle b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.checkstyle new file mode 100644 index 0000000..c9f8d32 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.classpath b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.project b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.project new file mode 100644 index 0000000..b34b47b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.project @@ -0,0 +1,17 @@ + + + Assignment6A_EulerApproximation + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..b318d7f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/Assignment6A_EulerApproximation.iml b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/Assignment6A_EulerApproximation.iml new file mode 100644 index 0000000..1570ffe --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/Assignment6A_EulerApproximation.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Command.class b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Command.class new file mode 100644 index 0000000..3c9f1c7 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Command.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/CommandLineParser.class b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/CommandLineParser.class new file mode 100644 index 0000000..7e49d02 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/CommandLineParser.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Eulerapproximator.class b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Eulerapproximator.class new file mode 100644 index 0000000..8b605e6 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Eulerapproximator.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/IllegalNumberException.class b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/IllegalNumberException.class new file mode 100644 index 0000000..8c1c76f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/IllegalNumberException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..2ca9e67 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Terminal.class b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Terminal.class new file mode 100644 index 0000000..05e9edd Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/bin/edu/kit/informatik/Terminal.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Command.java b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Command.java new file mode 100644 index 0000000..8f1d717 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Command.java @@ -0,0 +1,72 @@ +package edu.kit.informatik; + +/** + * The Enum Command. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public enum Command { + + /** set command. */ + SET("set", 1), + + /** quit command. */ + QUIT("quit", 0), + + /** invalid command. */ + INVALID("", -1); + + /** The command. */ + private final String command; + + /** The param count. */ + private final int paramCount; + + /** + * Instantiates a new command. + * + * @param command + * the command + * @param paramCount + * the param count + */ + private Command(final String command, final int paramCount) { + this.paramCount = paramCount; + this.command = command; + } + + /** + * Gets the command. + * + * @return the command + */ + public String getCommand() { + return command; + } + + /** + * Gets the param count. + * + * @return the param count + */ + public int getParamCount() { + return paramCount; + } + + /** + * converts string to command. + * + * @param str + * the str + * @return the command + */ + public static Command convertToCommand(final String str) { + for (final Command command : Command.values()) { + if (command.getCommand().equals(str)) { + return command; + } + } + return INVALID; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/CommandLineParser.java b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/CommandLineParser.java new file mode 100644 index 0000000..6defcb4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/CommandLineParser.java @@ -0,0 +1,80 @@ +package edu.kit.informatik; + +/** + * The Class CommandLineParser. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class CommandLineParser { + private static final String COMMAND_NOT_FOUND = "not valid command. Use: 'set ', 'quit'"; + private static final String WRONG_PARAMETER_COUNT = "the command expects %d parameter"; + private boolean readyToQuit; + + /** + * Instantiates a new command line parser. + */ + public CommandLineParser() { + readyToQuit = false; + } + + /** + * Runs the command line parser + */ + public void run() { + while (!readyToQuit) { + runCommand(Terminal.readLine()); + } + } + + private void runCommand(final String command) { + if (command == null) { + error(COMMAND_NOT_FOUND); + return; + } + final String[] arr = command.split("[\\s]"); + String[] parameters; + if (arr.length > 1) { + parameters = arr[1].split("[\\,]"); + } else { + parameters = new String[0]; + } + + switch (Command.convertToCommand(arr[0])) { + case QUIT: + if (parameters.length != Command.QUIT.getParamCount()) { + error(String.format(WRONG_PARAMETER_COUNT, Command.QUIT.getParamCount())); + } else { + readyToQuit = true; + } + break; + case SET: + if (parameters.length != Command.SET.getParamCount()) { + error(String.format(WRONG_PARAMETER_COUNT, Command.QUIT.getParamCount())); + } else { + set(parameters); + } + break; + default: + error(COMMAND_NOT_FOUND); + break; + + } + } + + private void set(final String[] param) { + try { + final int n = Integer.parseInt(param[0]); + final double rounded = Math.ceil(Eulerapproximator.calcEuler(n) * 1000.0) / 1000.0; + Terminal.printLine(Double.toString(rounded)); + } catch (final NumberFormatException e) { + error("set expects where n is a number as parameter"); + } catch (final IllegalNumberException e) { + error(e.getMessage()); + } + } + + private void error(final String str) { + Terminal.printLine("Error, " + str); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Eulerapproximator.java b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Eulerapproximator.java new file mode 100644 index 0000000..2e999f1 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Eulerapproximator.java @@ -0,0 +1,47 @@ +package edu.kit.informatik; + +/** + * The Class Eulerapproximator. + * + * @author Hannes Kuchelmesiter + * @version 1.0 + */ +public final class Eulerapproximator { + private static final String NOT_NATURAL = "the number is not a natural number"; + + private Eulerapproximator() { + } + + /** + * Calculates eulers number. + * + * @param n + * the n + * @return the double + * @throws IllegalNumberException + * the illegal number exception + */ + public static double calcEuler(final int n) throws IllegalNumberException { + // Check if n is natural number + if (n < 0) { + throw new IllegalNumberException(NOT_NATURAL); + } + + final double tmp = 1.0 / faculty(n); + if (n == 0) { + return tmp; + } else { + return calcEuler(n - 1) + tmp; + } + + } + + private static double faculty(final int n) { + assert n >= 0; + if (n == 0) { + return 1; + } else { + return faculty(n - 1) * n; + } + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/IllegalNumberException.java b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/IllegalNumberException.java new file mode 100644 index 0000000..2d55726 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/IllegalNumberException.java @@ -0,0 +1,27 @@ +package edu.kit.informatik; + +/** + * The Class IllegalNumberException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class IllegalNumberException extends Exception { + + /** + * Instantiates a new illegal number exception. + */ + public IllegalNumberException() { + super(); + } + + /** + * Instantiates a new illegal number exception. + * + * @param message + * the message + */ + public IllegalNumberException(final String message) { + super(message); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..eaa33f0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Main.java @@ -0,0 +1,28 @@ +package edu.kit.informatik; + +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + + /** + * Instantiates a new main. + */ + private Main() { + } + + /** + * The main method. + * + * @param args + * the arguments + */ + public static void main(final String[] args) { + final CommandLineParser cParser = new CommandLineParser(); + cParser.run(); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Terminal.java b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Terminal.java new file mode 100644 index 0000000..95ea53a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6A_EulerApproximation/src/edu/kit/informatik/Terminal.java @@ -0,0 +1,67 @@ +package edu.kit.informatik; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * This class provides some simple methods for input/output from and to a + * terminal. + * + * Never modify this class, never upload it to Praktomat. This is only for your + * local use. If an assignment tells you to + * use this class for input and output never use System.out or System.in in the + * same assignment. + * + * @author ITI, VeriAlg Group + * @author IPD, SDQ Group + * @version 4 + */ +public final class Terminal { + + /** + * BufferedReader for reading from standard input line-by-line. + */ + private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + + /** + * Private constructor to avoid object generation. + */ + private Terminal() { + } + + /** + * Print a String to the standard output. + * + * The String out must not be null. + * + * @param out + * The string to be printed. + */ + public static void printLine(final String out) { + System.out.println(out); + } + + /** + * Reads a line from standard input. + * + * Returns null at the end of the standard input. + * + * Use Ctrl+D to indicate the end of the standard input. + * + * @return The next line from the standard input or null. + */ + public static String readLine() { + try { + return in.readLine(); + } catch (final IOException e) { + /* + * rethrow unchecked (!) exception to prevent students from being + * forced to use Exceptions before they have + * been introduced in the lecture. + */ + throw new RuntimeException(e); + } + } + +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.checkstyle b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.checkstyle new file mode 100644 index 0000000..c9f8d32 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.classpath b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.classpath new file mode 100644 index 0000000..373dce4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.project b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.project new file mode 100644 index 0000000..00286b4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.project @@ -0,0 +1,17 @@ + + + Assignment6B_Bank + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..8cf5f30 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/Assignment6B_Bank.iml b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/Assignment6B_Bank.iml new file mode 100644 index 0000000..b084146 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/Assignment6B_Bank.iml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Account.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Account.class new file mode 100644 index 0000000..da49e9b Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Account.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/AccountHolder.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/AccountHolder.class new file mode 100644 index 0000000..8d326b5 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/AccountHolder.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Bank.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Bank.class new file mode 100644 index 0000000..2b9a546 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Bank.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/BankRegistry.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/BankRegistry.class new file mode 100644 index 0000000..9b6be0f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/BankRegistry.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..165bc63 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Pair.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Pair.class new file mode 100644 index 0000000..469fc48 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Pair.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Terminal.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Terminal.class new file mode 100644 index 0000000..62a580d Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/Terminal.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/commandline/Command.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/commandline/Command.class new file mode 100644 index 0000000..4f560a0 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/commandline/Command.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/commandline/CommandLineParser.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/commandline/CommandLineParser.class new file mode 100644 index 0000000..38047aa Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/commandline/CommandLineParser.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/exceptions/AccountDoesNotExistException.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/exceptions/AccountDoesNotExistException.class new file mode 100644 index 0000000..cc67ce3 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/exceptions/AccountDoesNotExistException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/exceptions/AccountHolderDoesNotExistException.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/exceptions/AccountHolderDoesNotExistException.class new file mode 100644 index 0000000..71d2cf8 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/exceptions/AccountHolderDoesNotExistException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/exceptions/BankDoesNotExistException.class b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/exceptions/BankDoesNotExistException.class new file mode 100644 index 0000000..0533ffa Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/bin/edu/kit/informatik/exceptions/BankDoesNotExistException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Account.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Account.java new file mode 100644 index 0000000..46e57fd --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Account.java @@ -0,0 +1,95 @@ +/* + * + */ +package edu.kit.informatik; + +/** + * The Class Account. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Account { + private final int accountNumber; + private final int bankCode; + private int balance; + + /** + * Instantiates a new account. + * + * @param accountNumber + * the account number + * @param bankCode + * the bank code + */ + public Account(final int accountNumber, final int bankCode) { + if (accountNumber < 0 || bankCode < 0) { + throw new IllegalArgumentException("Numbers must be > 0!"); + } + this.accountNumber = accountNumber; + this.bankCode = bankCode; + } + + /** + * Adds money to the account + * + * @param amount + * the amount + */ + public void deposit(final int amount) { + if (amount <= 0) { + return; + } + + balance += amount; + } + + /** + * Withdraws money from the account + * + * @param amount + * the amount + * @return true, if successful + */ + public boolean withdraw(final int amount) { + if (amount < 0 || balance - amount < 0) { + return false; + } else { + balance -= amount; + return true; + } + } + + /** + * Gets the balance. + * + * @return the balance + */ + public int getBalance() { + return balance; + } + + /** + * Gets the account number. + * + * @return the account number + */ + public int getAccountNumber() { + return accountNumber; + } + + /** + * Gets the bank code. + * + * @return the bank code + */ + public int getBankCode() { + return bankCode; + } + + @Override + public boolean equals(final Object obj) { + return (obj.getClass() == Account.class && ((Account) obj).accountNumber == this.accountNumber + && ((Account) obj).bankCode == this.bankCode); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/AccountHolder.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/AccountHolder.java new file mode 100644 index 0000000..2da8c7b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/AccountHolder.java @@ -0,0 +1,56 @@ +package edu.kit.informatik; + +/** + * The Class AccountHolder. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class AccountHolder { + private final String firstName; + private final String lastName; + private final int personnelNumber; + + /** + * Instantiates a new account holder. + * + * @param firstName + * the first name + * @param lastName + * the last name + * @param personnelNumber + * the personnel number + */ + public AccountHolder(final String firstName, final String lastName, final int personnelNumber) { + this.firstName = firstName; + this.lastName = lastName; + this.personnelNumber = personnelNumber; + } + + /** + * Gets the first name. + * + * @return the first name + */ + public String getFirstName() { + return firstName; + } + + /** + * Gets the last name. + * + * @return the last name + */ + public String getLastName() { + return lastName; + } + + /** + * Gets the personnel number. + * + * @return the personnel number + */ + public int getPersonnelNumber() { + return personnelNumber; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Bank.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Bank.java new file mode 100644 index 0000000..70102ca --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Bank.java @@ -0,0 +1,221 @@ +package edu.kit.informatik; + +import java.util.ArrayList; + +import edu.kit.informatik.exceptions.AccountDoesNotExistException; +import edu.kit.informatik.exceptions.AccountHolderDoesNotExistException; + +/** + * The Class Bank. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Bank { + + /** The bank code. */ + private final int bankCode; + + /** The data. */ + private final ArrayList>> data; + + /** + * Instantiates a new bank. + * + * @param bankCode + * the bank code + */ + public Bank(final int bankCode) { + this.bankCode = bankCode; + this.data = new ArrayList>>(); + } + + /** + * Adds the user. + * + * @param firstName + * the first name + * @param lastName + * the last name + * @param personnelNumber + * the personnel number + */ + public void addUser(final String firstName, final String lastName, final int personnelNumber) { + final AccountHolder accHolder = new AccountHolder(firstName, lastName, personnelNumber); + data.add(new Pair>(accHolder, new ArrayList())); + } + + /** + * Adds the account. + * + * @param accountNumber + * the account number + * @param personnelNumber + * the personnel number + * @return true, if successful + * @throws AccountHolderDoesNotExistException + * the account holder does not exist exception + */ + public boolean addAccount(final int accountNumber, final int personnelNumber) + throws AccountHolderDoesNotExistException { + for (final Pair> pair : data) { + if (pair.getFirst().getPersonnelNumber() == personnelNumber) { + pair.getSecond().add(new Account(accountNumber, bankCode)); + return true; + } + } + throw new AccountHolderDoesNotExistException(); + } + + /** + * Removes the account. + * + * @param accountNumber + * the account + * @throws AccountDoesNotExistException + * the account does not exist exception + */ + public void removeAccount(final int accountNumber) throws AccountDoesNotExistException { + for (final Pair> pair : data) { + if (pair.getSecond().remove(new Account(accountNumber, bankCode))) { + return; + } + } + throw new AccountDoesNotExistException(); + } + + /** + * Withdraws money from an account. + * + * @param accountNumber + * the account number + * @param amount + * the amount + * @return true, if successful + * @throws AccountDoesNotExistException + * the account does not exist exception + */ + public boolean withdraw(final int accountNumber, final int amount) throws AccountDoesNotExistException { + final Account acc = getAccount(accountNumber); + if (acc == null) { + return false; + } + return acc.withdraw(amount); + } + + /** + * Adds money to an account. + * + * @param accountNumber + * the account number + * @param amount + * the amount + * @throws AccountDoesNotExistException + * the account does not exist exception + */ + public void deposit(final int accountNumber, final int amount) throws AccountDoesNotExistException { + final Account acc = getAccount(accountNumber); + if (acc == null) { + throw new AccountDoesNotExistException(); + } + acc.deposit(amount); + } + + /** + * Transfers money from one account to another. + * + * @param fromAccountNumber + * the from account number + * @param toAccountnumber + * the to accountnumber + * @param amount + * the amount + * @return true, if successful + * @throws AccountDoesNotExistException + * the account does not exist exception + */ + public boolean transfer(final int fromAccountNumber, final int toAccountnumber, final int amount) + throws AccountDoesNotExistException { + final Account fromAcc = getAccount(fromAccountNumber); + final Account toAccount = getAccount(toAccountnumber); + if (!fromAcc.withdraw(amount)) { + return false; + } + + toAccount.deposit(amount); + return true; + + } + + /** + * Gets the number of accounts. Returns 0 if personnelNumber is not known in + * this bank. + * + * @param personnelNumber + * the personnel number + * @return the number of accounts + */ + public int getNumberOfAccounts(final int personnelNumber) { + for (final Pair> pair : data) { + if (pair.getFirst().getPersonnelNumber() == personnelNumber) { + return pair.getSecond().size(); + } + } + return 0; + } + + /** + * Checks if account is contained. + * + * @param account + * the account + * @return true, if successful + */ + public boolean containsAccount(final Account account) { + try { + final Account comp = getAccount(account.getAccountNumber()); + return account.equals(comp); + } catch (final AccountDoesNotExistException e) { + return false; + } + } + + /** + * Returns the balance of the account with the corresponding bank code. If + * there is no account with that bankCode -1 is returned. + * + * @param accountNumber + * the account number + * @return the balance, if unsuccessful -1 + * @throws AccountDoesNotExistException + * the account does not exist exception + */ + public int balance(final int accountNumber) throws AccountDoesNotExistException { + final Account acc = getAccount(accountNumber); + return acc.getBalance(); + } + + private Account getAccount(final int accountNumber) throws AccountDoesNotExistException { + final Account comp = new Account(accountNumber, bankCode); + for (final Pair> pair : data) { + if (pair.getSecond().contains(comp)) { + return pair.getSecond().get(pair.getSecond().indexOf(comp)); + } + } + throw new AccountDoesNotExistException(); + } + + /** + * Gets the bank code. + * + * @return the bank code + */ + public int getBankCode() { + return bankCode; + } + + @Override + public boolean equals(final Object obj) { + return (obj.getClass() == Bank.class && ((Bank) obj).getBankCode() == this.bankCode); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/BankRegistry.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/BankRegistry.java new file mode 100644 index 0000000..616f339 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/BankRegistry.java @@ -0,0 +1,233 @@ +package edu.kit.informatik; + +import java.util.ArrayList; + +import edu.kit.informatik.exceptions.AccountDoesNotExistException; +import edu.kit.informatik.exceptions.AccountHolderDoesNotExistException; +import edu.kit.informatik.exceptions.BankDoesNotExistException; + +/** + * The Class BankRegistry. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class BankRegistry { + + /** The banks. */ + private final ArrayList banks; + + /** + * Instantiates a new bank registry. + */ + public BankRegistry() { + banks = new ArrayList(); + } + + /** + * Adds the bank. + * + * @param bankCode + * the bank code + */ + public void addBank(final int bankCode) { + banks.add(new Bank(bankCode)); + } + + /** + * Gets the account number. + * + * @param personnelNumber + * the personnel number + * @return the account number + */ + public int getAccountNumber(final int personnelNumber) { + int counter = 0; + for (final Bank bank : banks) { + counter += bank.getNumberOfAccounts(personnelNumber); + } + return counter; + } + + /** + * Adds the user to the bank. + * + * @param firstName + * the first name + * @param lastName + * the last name + * @param personnelNumber + * the personnel number + * @param bankCode + * the bank code + * @throws BankDoesNotExistException + * the bank does not exist exception + */ + public void addUser(final String firstName, final String lastName, final int personnelNumber, final int bankCode) + throws BankDoesNotExistException { + final Bank bank = getBank(bankCode); + bank.addUser(firstName, lastName, personnelNumber); + } + + /** + * Removes the account. + * + * @param accountNumber + * the account number + * @param bankCode + * the bank code + * @throws BankDoesNotExistException + * the bank does not exist exception + * @throws AccountDoesNotExistException + * the account does not exist exception + */ + public void removeAccount(final int accountNumber, final int bankCode) + throws BankDoesNotExistException, AccountDoesNotExistException { + final Bank bank = getBank(bankCode); + bank.removeAccount(accountNumber); + } + + /** + * Deposit. + * + * @param accountNumber + * the account number + * @param bankCode + * the bank code + * @param amount + * the amount + * @throws AccountDoesNotExistException + * the account does not exist exception + * @throws BankDoesNotExistException + * the bank does not exist exception + */ + public void deposit(final int accountNumber, final int bankCode, final int amount) + throws AccountDoesNotExistException, BankDoesNotExistException { + final Bank bank = getBank(bankCode); + bank.deposit(accountNumber, amount); + } + + /** + * Withdraw. + * + * @param accountNumber + * the account number + * @param bankCode + * the bank code + * @param amount + * the amount + * @return true, if successful + * @throws AccountDoesNotExistException + * the account does not exist exception + * @throws BankDoesNotExistException + * the bank does not exist exception + */ + public boolean withdraw(final int accountNumber, final int bankCode, final int amount) + throws AccountDoesNotExistException, BankDoesNotExistException { + final Bank bank = getBank(bankCode); + return bank.withdraw(accountNumber, amount); + } + + /** + * Transfer. + * + * @param fromAccountNumber + * the from account number + * @param fromBankCode + * the from bank code + * @param toAccountNumber + * the to account number + * @param toBankCode + * the to bank code + * @param amount + * the amount + * @return true, if successful + * @throws AccountDoesNotExistException + * the account does not exist exception + * @throws BankDoesNotExistException + * the bank does not exist exception + */ + public boolean transfer(final int fromAccountNumber, final int fromBankCode, final int toAccountNumber, + final int toBankCode, final int amount) throws AccountDoesNotExistException, BankDoesNotExistException { + final Bank fromBank = getBank(fromBankCode); + // internal bank transfer + if (fromBankCode == toBankCode) { + return fromBank.transfer(fromAccountNumber, toAccountNumber, amount); + } + final Bank toBank = getBank(toBankCode); + // transfer between two different banks + if (fromBank.containsAccount(new Account(fromAccountNumber, fromBankCode)) + && toBank.containsAccount(new Account(toAccountNumber, toBankCode))) { + if (fromBank.withdraw(fromAccountNumber, amount)) { + fromBank.deposit(toAccountNumber, amount); + return true; + } else { + return false; + } + } else { + throw new AccountDoesNotExistException(); + } + + } + + /** + * Contains account. + * + * @param accountNumber + * the account number + * @param bankCode + * the bank code + * @return true, if successful + * @throws BankDoesNotExistException + * the bank does not exist exception + */ + public boolean containsAccount(final int accountNumber, final int bankCode) throws BankDoesNotExistException { + final Bank bank = getBank(bankCode); + return bank.containsAccount(new Account(accountNumber, bankCode)); + } + + /** + * Balance. + * + * @param accountNumber + * the account number + * @param bankCode + * the bank code + * @return the int + * @throws AccountDoesNotExistException + * the account does not exist exception + * @throws BankDoesNotExistException + * the bank does not exist exception + */ + public int balance(final int accountNumber, final int bankCode) + throws AccountDoesNotExistException, BankDoesNotExistException { + return getBank(bankCode).balance(accountNumber); + } + + /** + * Adds the account. + * + * @param accountNumber + * the account number + * @param personnelNumber + * the personnel number + * @param bankCode + * the bank code + * @throws BankDoesNotExistException + * the bank does not exist exception + * @throws AccountHolderDoesNotExistException + * the account holder does not exist exception + */ + public void addAccount(final int accountNumber, final int personnelNumber, final int bankCode) + throws BankDoesNotExistException, AccountHolderDoesNotExistException { + final Bank bank = getBank(bankCode); + bank.addAccount(accountNumber, personnelNumber); + } + + private Bank getBank(final int bankCode) throws BankDoesNotExistException { + if (!banks.contains(new Bank(bankCode))) { + throw new BankDoesNotExistException(); + } + return banks.get(banks.indexOf(new Bank(bankCode))); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..825c518 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Main.java @@ -0,0 +1,29 @@ +package edu.kit.informatik; + +import edu.kit.informatik.commandline.CommandLineParser; + +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + + /** + * Instantiates a new main. + */ + private Main() { + } + + /** + * The main method. + * + * @param args + * the arguments + */ + public static void main(final String[] args) { + final CommandLineParser cParser = new CommandLineParser(); + cParser.run(); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Pair.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Pair.java new file mode 100644 index 0000000..c68d444 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Pair.java @@ -0,0 +1,50 @@ +package edu.kit.informatik; + +/** + * The Class Pair. + * + * @author Hannes Kuchelmeister + * @version 1.0 + * + * @param + * the generic type + * @param + * the generic type + */ +public class Pair { + + private final T first; + private final U second; + + /** + * Instantiates a new pair. + * + * @param first + * the first + * @param second + * the second + */ + public Pair(final T first, final U second) { + this.first = first; + this.second = second; + } + + /** + * Gets the first element of the pair. + * + * @return the first + */ + public T getFirst() { + return first; + } + + /** + * Gets the second element of the pair. + * + * @return the second + */ + public U getSecond() { + return second; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Terminal.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Terminal.java new file mode 100644 index 0000000..af6c4c5 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/Terminal.java @@ -0,0 +1,68 @@ +package edu.kit.informatik; + + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * This class provides some simple methods for input/output from and to a + * terminal. + * + * Never modify this class, never upload it to Praktomat. This is only for your + * local use. If an assignment tells you to + * use this class for input and output never use System.out or System.in in the + * same assignment. + * + * @author ITI, VeriAlg Group + * @author IPD, SDQ Group + * @version 4 + */ +public final class Terminal { + + /** + * BufferedReader for reading from standard input line-by-line. + */ + private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + + /** + * Private constructor to avoid object generation. + */ + private Terminal() { + } + + /** + * Print a String to the standard output. + * + * The String out must not be null. + * + * @param out + * The string to be printed. + */ + public static void printLine(final String out) { + System.out.println(out); + } + + /** + * Reads a line from standard input. + * + * Returns null at the end of the standard input. + * + * Use Ctrl+D to indicate the end of the standard input. + * + * @return The next line from the standard input or null. + */ + public static String readLine() { + try { + return in.readLine(); + } catch (final IOException e) { + /* + * rethrow unchecked (!) exception to prevent students from being + * forced to use Exceptions before they have + * been introduced in the lecture. + */ + throw new RuntimeException(e); + } + } + +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/commandline/Command.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/commandline/Command.java new file mode 100644 index 0000000..6f3fcb4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/commandline/Command.java @@ -0,0 +1,87 @@ +package edu.kit.informatik.commandline; + +/** + * The Enum Command. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public enum Command { + + /** The addbank. */ + ADDBANK("addbank", 1), + /** The adduser. */ + ADDUSER("adduser", 4), + /** The addaccount. */ + ADDACCOUNT("addaccount", 3), + /** The removeaccount. */ + REMOVEACCOUNT("removeaccount", 2), + /** The deposit. */ + DEPOSIT("deposit", 3), + /** The withdraw. */ + WITHDRAW("withdraw", 3), + /** The transfer. */ + TRANSFER("transfer", 5), + /** The getaccountnumber. */ + GETACCOUNTNUMBER("getaccountnumber", 1), + /** The containsaccount. */ + CONTAINSACCOUNT("containsaccount", 2), + /** The balance. */ + BALANCE("balance", 2), + /** The quit. */ + QUIT("quit", 0), + /** The invalid. */ + INVALID("", -1); + + private final String command; + + /** The param count. */ + private final int paramCount; + + /** + * Instantiates a new command. + * + * @param command + * the command + * @param paramCount + * the param count + */ + private Command(final String command, final int paramCount) { + this.paramCount = paramCount; + this.command = command; + } + + /** + * Gets the command. + * + * @return the command + */ + public String getCommand() { + return command; + } + + /** + * Gets the param count. + * + * @return the param count + */ + public int getParamCount() { + return paramCount; + } + + /** + * converts string to command. + * + * @param str + * the str + * @return the command + */ + public static Command convertToCommand(final String str) { + for (final Command command : Command.values()) { + if (command.getCommand().equals(str)) { + return command; + } + } + return Command.INVALID; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/commandline/CommandLineParser.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/commandline/CommandLineParser.java new file mode 100644 index 0000000..e1e1034 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/commandline/CommandLineParser.java @@ -0,0 +1,289 @@ +package edu.kit.informatik.commandline; + +import edu.kit.informatik.BankRegistry; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.exceptions.AccountDoesNotExistException; +import edu.kit.informatik.exceptions.AccountHolderDoesNotExistException; +import edu.kit.informatik.exceptions.BankDoesNotExistException; + +/** + * The Class CommandLineParser. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class CommandLineParser { + private static final String SUCCESSFULL = "OK"; + private static final String NOT_NATURAL = "parameters have to be natural numbers"; + private static final String ACCOUNDHODLER_DOES_NOT_EXIST = "the accountholder does not exists within the bank"; + private static final String BANK_DOES_NOT_EXIST = "the bank does not exist"; + private static final String ACCOUNT_DOES_NOT_EXIST = "account does not exist in this bank"; + private static final String COMMAND_NOT_FOUND = "not valid command.'"; + private static final String WRONG_PARAMETER_COUNT = "the command expects %d parameter"; + private static final String WRONG_STRING_FORMAT = "strings have to be lowercase"; + private static final String UNEXPECTED_ERROR = "something unexpected went wront :("; + + private boolean readyToQuit; + + private final BankRegistry bankRegistry; + + /** + * Instantiates a new command line parser. + */ + public CommandLineParser() { + bankRegistry = new BankRegistry(); + readyToQuit = false; + } + + /** + * Runs the command line parser + */ + public void run() { + while (!readyToQuit) { + runCommand(Terminal.readLine()); + } + } + + private void runCommand(final String command) { + if (command == null) { + error(COMMAND_NOT_FOUND); + return; + } + final String[] arr = command.split("[\\s]"); + String[] parameters; + if (arr.length > 1) { + parameters = arr[1].split(";"); + } else { + parameters = new String[0]; + } + + final Command c = Command.convertToCommand(arr[0]); + // If parameter count does not match command + if (parameters.length != c.getParamCount() && !c.equals(Command.INVALID)) { + error(String.format(WRONG_PARAMETER_COUNT, c.getParamCount())); + return; + } + + switch (c) { + case WITHDRAW: + withdraw(parameters); + break; + case TRANSFER: + transfer(parameters); + break; + case REMOVEACCOUNT: + removeAccount(parameters); + break; + case GETACCOUNTNUMBER: + getAccountNumber(parameters); + break; + case DEPOSIT: + deposit(parameters); + break; + case CONTAINSACCOUNT: + containsAccount(parameters); + break; + case BALANCE: + balance(parameters); + break; + case ADDUSER: + addUser(parameters); + break; + case ADDBANK: + addBank(parameters); + break; + case ADDACCOUNT: + addAccount(parameters); + break; + case QUIT: + readyToQuit = true; + break; + default: + error(COMMAND_NOT_FOUND); + break; + } + } + + private void addUser(final String[] parameters) { + if (!isNaturalNumberString(parameters[2]) || !isNaturalNumberString(parameters[3])) { + error(NOT_NATURAL); + return; + } + if (!parameters[0].matches("[a-z]+") || !parameters[1].matches("[a-z]+")) { + error(WRONG_STRING_FORMAT); + return; + } + final String firstName = parameters[0]; + final String lastName = parameters[1]; + final int personnelNumber = Integer.parseInt(parameters[2]); + final int bankCode = Integer.parseInt(parameters[3]); + try { + bankRegistry.addUser(firstName, lastName, personnelNumber, bankCode); + Terminal.printLine(SUCCESSFULL); + } catch (final BankDoesNotExistException e) { + error(BANK_DOES_NOT_EXIST); + } + } + + private void addBank(final String[] parameters) { + if (!isNaturalNumberString(parameters[0])) { + error(NOT_NATURAL); + return; + } + final int bankCode = Integer.parseInt(parameters[0]); + bankRegistry.addBank(bankCode); + Terminal.printLine(SUCCESSFULL); + } + + private void addAccount(final String[] parameters) { + if (!isNaturalNumberString(parameters[0]) || !isNaturalNumberString(parameters[1]) + || !isNaturalNumberString(parameters[2])) { + error(NOT_NATURAL); + return; + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int personnelNumber = Integer.parseInt(parameters[1]); + final int bankCode = Integer.parseInt(parameters[2]); + + try { + bankRegistry.addAccount(accountNumber, personnelNumber, bankCode); + Terminal.printLine(SUCCESSFULL); + } catch (final BankDoesNotExistException e) { + error(BANK_DOES_NOT_EXIST); + } catch (final AccountHolderDoesNotExistException e) { + error(ACCOUNDHODLER_DOES_NOT_EXIST); + } + } + + private void balance(final String[] parameters) { + if (!isNaturalNumberString(parameters[0]) || !isNaturalNumberString(parameters[1])) { + error(NOT_NATURAL); + return; + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + + try { + Terminal.printLine(Integer.toString(bankRegistry.balance(accountNumber, bankCode))); + } catch (final AccountDoesNotExistException e) { + error(ACCOUNT_DOES_NOT_EXIST); + } catch (final BankDoesNotExistException e) { + error(BANK_DOES_NOT_EXIST); + } + } + + private void containsAccount(final String[] parameters) { + if (!isNaturalNumberString(parameters[0]) || !isNaturalNumberString(parameters[1])) { + error(NOT_NATURAL); + return; + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + try { + Terminal.printLine(Boolean.toString(bankRegistry.containsAccount(accountNumber, bankCode))); + } catch (final BankDoesNotExistException e) { + error(BANK_DOES_NOT_EXIST); + } + } + + private void deposit(final String[] parameters) { + if (!isNaturalNumberString(parameters[0]) || !isNaturalNumberString(parameters[1]) + || !isNaturalNumberString(parameters[2])) { + error(NOT_NATURAL); + return; + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + final int amount = Integer.parseInt(parameters[2]); + + try { + bankRegistry.deposit(accountNumber, bankCode, amount); + Terminal.printLine(SUCCESSFULL); + } catch (final AccountDoesNotExistException e) { + error(ACCOUNT_DOES_NOT_EXIST); + } catch (final BankDoesNotExistException e) { + error(BANK_DOES_NOT_EXIST); + } + } + + private void getAccountNumber(final String[] parameters) { + if (!isNaturalNumberString(parameters[0])) { + error(NOT_NATURAL); + return; + } + final int personnelNumber = Integer.parseInt(parameters[0]); + Terminal.printLine(Integer.toString(bankRegistry.getAccountNumber(personnelNumber))); + } + + private void removeAccount(final String[] parameters) { + if (!isNaturalNumberString(parameters[0]) || !isNaturalNumberString(parameters[1])) { + error(NOT_NATURAL); + return; + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + try { + bankRegistry.removeAccount(accountNumber, bankCode); + Terminal.printLine(SUCCESSFULL); + } catch (final AccountDoesNotExistException e) { + error(ACCOUNT_DOES_NOT_EXIST); + } catch (final BankDoesNotExistException e) { + error(BANK_DOES_NOT_EXIST); + } + + } + + private void transfer(final String[] parameters) { + if (!isNaturalNumberString(parameters[0]) || !isNaturalNumberString(parameters[1]) + || !isNaturalNumberString(parameters[2]) || !isNaturalNumberString(parameters[3]) + || !isNaturalNumberString(parameters[4])) { + error(NOT_NATURAL); + return; + } + final int fromAccountNumber = Integer.parseInt(parameters[0]); + final int fromBankCode = Integer.parseInt(parameters[1]); + final int toAccountNumber = Integer.parseInt(parameters[2]); + final int toBankCode = Integer.parseInt(parameters[3]); + final int amount = Integer.parseInt(parameters[4]); + + try { + bankRegistry.transfer(fromAccountNumber, fromBankCode, toAccountNumber, toBankCode, amount); + Terminal.printLine(SUCCESSFULL); + } catch (final AccountDoesNotExistException e) { + error(ACCOUNT_DOES_NOT_EXIST); + } catch (final BankDoesNotExistException e) { + error(BANK_DOES_NOT_EXIST); + } + } + + private void withdraw(final String[] parameters) { + if (!isNaturalNumberString(parameters[0]) || !isNaturalNumberString(parameters[1]) + || !isNaturalNumberString(parameters[2])) { + error(NOT_NATURAL); + return; + } + final int accountNumber = Integer.parseInt(parameters[0]); + final int bankCode = Integer.parseInt(parameters[1]); + final int amount = Integer.parseInt(parameters[2]); + + try { + if (bankRegistry.withdraw(accountNumber, bankCode, amount)) { + Terminal.printLine(SUCCESSFULL); + } else { + error(UNEXPECTED_ERROR); + } + } catch (final AccountDoesNotExistException e) { + error(ACCOUNT_DOES_NOT_EXIST); + } catch (final BankDoesNotExistException e) { + error(BANK_DOES_NOT_EXIST); + } + } + + private boolean isNaturalNumberString(final String str) { + return str.matches("[0-9]+"); + } + + private void error(final String str) { + Terminal.printLine("Error, " + str); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/exceptions/AccountDoesNotExistException.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/exceptions/AccountDoesNotExistException.java new file mode 100644 index 0000000..a455f46 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/exceptions/AccountDoesNotExistException.java @@ -0,0 +1,17 @@ +package edu.kit.informatik.exceptions; + +/** + * The Class AccountDoesNotExistException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class AccountDoesNotExistException extends Exception { + + /** + * Instantiates a new account does not exist exception. + */ + public AccountDoesNotExistException() { + super(); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/exceptions/AccountHolderDoesNotExistException.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/exceptions/AccountHolderDoesNotExistException.java new file mode 100644 index 0000000..3c746e5 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/exceptions/AccountHolderDoesNotExistException.java @@ -0,0 +1,17 @@ +package edu.kit.informatik.exceptions; + +/** + * The Class AccountHolderDoesNotExistException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class AccountHolderDoesNotExistException extends Exception { + + /** + * Instantiates a new account holder does not exist exception. + */ + public AccountHolderDoesNotExistException() { + super(); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/exceptions/BankDoesNotExistException.java b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/exceptions/BankDoesNotExistException.java new file mode 100644 index 0000000..0899d2e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6B_Bank/src/edu/kit/informatik/exceptions/BankDoesNotExistException.java @@ -0,0 +1,17 @@ +package edu.kit.informatik.exceptions; + +/** + * The Class BankDoesNotExistException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class BankDoesNotExistException extends Exception { + + /** + * Instantiates a new bank does not exist exception. + */ + public BankDoesNotExistException() { + super(); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.checkstyle b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.checkstyle new file mode 100644 index 0000000..c9f8d32 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.classpath b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.project b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.project new file mode 100644 index 0000000..3456931 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.project @@ -0,0 +1,17 @@ + + + Assignment6C_HtmlParser + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..33b671a Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/Assignment6C_HtmlParser.iml b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/Assignment6C_HtmlParser.iml new file mode 100644 index 0000000..1570ffe --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/Assignment6C_HtmlParser.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Command.class b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Command.class new file mode 100644 index 0000000..6d42c2c Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Command.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/CommandLineParser.class b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/CommandLineParser.class new file mode 100644 index 0000000..c8630c1 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/CommandLineParser.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/FileInputHelper.class b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/FileInputHelper.class new file mode 100644 index 0000000..d285b17 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/FileInputHelper.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..67b98d7 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Pair.class b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Pair.class new file mode 100644 index 0000000..469fc48 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Pair.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Tag.class b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Tag.class new file mode 100644 index 0000000..27bffef Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Tag.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Terminal.class b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Terminal.class new file mode 100644 index 0000000..7f12059 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/Terminal.class differ diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/html.txt b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/html.txt new file mode 100644 index 0000000..940d61c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/bin/edu/kit/informatik/html.txt @@ -0,0 +1,11 @@ + +head + +Titel + +Inhalt des HTML-Dokumentes Zeile1 +Inhalt des +HTML-Dokumentes +Zeile2 + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Command.java b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Command.java new file mode 100644 index 0000000..dc84ed0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Command.java @@ -0,0 +1,75 @@ +package edu.kit.informatik; + +/** + * The Enum Command. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public enum Command { + + /** set command. */ + SEARCH("search", 1), + + /** tag coommand */ + TAG("tag", 1), + + /** quit command. */ + QUIT("quit", 0), + + /** invalid command. */ + INVALID("", -1); + + /** The command. */ + private final String command; + + /** The param count. */ + private final int paramCount; + + /** + * Instantiates a new command. + * + * @param command + * the command + * @param paramCount + * the param count + */ + private Command(final String command, final int paramCount) { + this.paramCount = paramCount; + this.command = command; + } + + /** + * Gets the command. + * + * @return the command + */ + public String getCommand() { + return command; + } + + /** + * Gets the param count. + * + * @return the param count + */ + public int getParamCount() { + return paramCount; + } + + /** + * converts string to command. + * + * @param str + * the str + * @return the command + */ + public static Command convertToCommand(final String str) { + for (final Command command : Command.values()) { + if (command.getCommand().equals(str)) { + return command; + } + } + return INVALID; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/CommandLineParser.java b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/CommandLineParser.java new file mode 100644 index 0000000..dc44eeb --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/CommandLineParser.java @@ -0,0 +1,101 @@ +package edu.kit.informatik; + +/** + * The Class CommandLineParser. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class CommandLineParser { + private static final String COMMAND_NOT_FOUND = "not valid command. Use: 'search ', 'tag ', 'quit'"; + private static final String WRONG_PARAMETER_COUNT = "the command expects %d parameter"; + private boolean readyToQuit; + private final Tag tag; + + /** + * Instantiates a new command line parser. + * + * @param fileContent + * the file content + */ + public CommandLineParser(final String fileContent) { + readyToQuit = false; + tag = new Tag(fileContent); + } + + /** + * Runs the command line parser + */ + public void run() { + while (!readyToQuit) { + runCommand(Terminal.readLine()); + } + } + + private void runCommand(final String command) { + if (command == null) { + error(COMMAND_NOT_FOUND); + return; + } + final String[] arr = command.split("[\\s]"); + String[] parameters; + if (arr.length > 1) { + parameters = arr[1].split("[\\,]"); + } else { + parameters = new String[0]; + } + + final Command c = Command.convertToCommand(arr[0]); + // If parameter count does not match command + if (parameters.length != c.getParamCount() && !c.equals(Command.INVALID)) { + error(String.format(WRONG_PARAMETER_COUNT, c.getParamCount())); + return; + } + + switch (c) { + case QUIT: + readyToQuit = true; + break; + case SEARCH: + search(parameters); + break; + case TAG: + tag(parameters); + break; + default: + error(COMMAND_NOT_FOUND); + break; + + } + } + + private void search(final String[] parameters) { + if (!parameters[0].matches("[a-zA-Z0-9_-]+")) { + error("the parameters of search have to consist of letters, numbers, '_' and '-'"); + return; + } + final String str = tag.toString(); + + int count = str.split(" " + parameters[0].toLowerCase() + " ").length - 1; + if (str.startsWith(parameters[0].toLowerCase())) { + count++; + } + if (str.endsWith(parameters[0].toLowerCase())) { + count++; + } + Terminal.printLine(Integer.toString(count)); + } + + private void tag(final String[] parameters) { + if (!parameters[0].matches("[a-z0-9]+") || parameters[0].equals("head")) { + error("the parameters of 'tag' have to consist of lower case letters and/or numbers " + + "and searches for 'head' are forbidden"); + return; + } + Terminal.printLine(tag.getTagText(parameters[0]).trim().toLowerCase()); + } + + private void error(final String str) { + Terminal.printLine("Error, " + str); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/FileInputHelper.java b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/FileInputHelper.java new file mode 100644 index 0000000..b2fc880 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/FileInputHelper.java @@ -0,0 +1,67 @@ +package edu.kit.informatik; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; + +/** + * Helper class for reading text files. + * + * @author IPD Reussner, KIT + * @author ITI Sinz, KIT + * @version 1.1 + */ +public final class FileInputHelper { + + /** + * Private constructor to avoid instantiation. + */ + private FileInputHelper() { + // intentionally left blank + } + + /** + * Reads the specified file and returns its content as a String array, where + * the first array field contains the + * file's first line, the second field contains the second line, and so on. + * + * @param file + * the file to be read + * @return the content of the file + */ + public static String read(final String file) { + final StringBuilder result = new StringBuilder(); + + FileReader in = null; + try { + in = new FileReader(file); + } catch (final FileNotFoundException e) { + Terminal.printLine("Error, " + e.getMessage()); + System.exit(1); + } + + final BufferedReader reader = new BufferedReader(in); + try { + String line = reader.readLine(); + while (line != null) { + result.append(line); + line = reader.readLine(); + if (line != null) { + result.append("\n"); + } + } + } catch (final IOException e) { + Terminal.printLine("Error, " + e.getMessage()); + System.exit(1); + } finally { + try { + reader.close(); + } catch (final IOException e) { + // no need for handling this exception + } + } + return result.toString(); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..f153c4f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Main.java @@ -0,0 +1,32 @@ +package edu.kit.informatik; + +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + + /** + * Instantiates a new main. + */ + private Main() { + } + + /** + * The main method. + * + * @param args + * the arguments + */ + public static void main(final String[] args) { + if (args.length != 1) { + Terminal.printLine("Error, wrong number of parameters"); + } + final String path = args[0]; + final CommandLineParser cParser = new CommandLineParser(FileInputHelper.read(path)); + cParser.run(); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Pair.java b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Pair.java new file mode 100644 index 0000000..c68d444 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Pair.java @@ -0,0 +1,50 @@ +package edu.kit.informatik; + +/** + * The Class Pair. + * + * @author Hannes Kuchelmeister + * @version 1.0 + * + * @param + * the generic type + * @param + * the generic type + */ +public class Pair { + + private final T first; + private final U second; + + /** + * Instantiates a new pair. + * + * @param first + * the first + * @param second + * the second + */ + public Pair(final T first, final U second) { + this.first = first; + this.second = second; + } + + /** + * Gets the first element of the pair. + * + * @return the first + */ + public T getFirst() { + return first; + } + + /** + * Gets the second element of the pair. + * + * @return the second + */ + public U getSecond() { + return second; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Tag.java b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Tag.java new file mode 100644 index 0000000..a931a92 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Tag.java @@ -0,0 +1,115 @@ +package edu.kit.informatik; + +import java.util.ArrayList; + +/** + * The Class Tag. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Tag { + private final String name; + private final ArrayList> text; + private final ArrayList subTags; + + /** + * Instantiates a new tag. + * + * @param str + * the string which starts with the tag and ends with the tag + */ + public Tag(final String str) { + final String noEnter = str.replace("\n", " "); + text = new ArrayList>(); + + subTags = new ArrayList(); + final String[] splitted = noEnter.split("(?<=" + ">)|(?=(]") && openTag >= 0) { + if (getTagName(splitted[i].trim()).equals(subTagName)) { + String sub = ""; + for (int j = openTag; j <= i; j++) { + sub += splitted[j]; + } + subTags.add(new Tag(sub)); + openTag = -1; + } + } + // opening tag + if (splitted[i].trim().matches("[]") && openTag == -1) { + openTag = i; + subTagName = getTagName(splitted[i].trim()); + } + // text + if (splitted[i].trim().matches("([a-zA-Z0-9_-](\\s[a-zA-Z0-9_-])?)+") && openTag == -1) { + final String[] tmpStrArr = splitted[i].split(" "); + for (final String string : tmpStrArr) { + this.text.add(new Pair(new Integer(subTags.size()), string.toLowerCase())); + } + } + } + } + + /** + * Searches f. + * + * @param tagName + * the tag name + * @return the string + */ + public String getTagText(final String tagName) { + if (this.name.equals(tagName)) { + return this.toString(); + } + + String ret = ""; + for (final Tag tag : subTags) { + if (!tag.getTagText(tagName).equals("")) { + ret += tag.getTagText(tagName) + "\n"; + } + } + return ret.trim(); + } + + private String getTagName(final String tag) { + String tmp = ""; + for (final char c : tag.toCharArray()) { + if (c != '<' && c != '>' && c != '/') { + tmp += Character.toString(c); + } + } + return tmp; + } + + /** + * Finds the corresponding text to a tag + */ + private String intToText(final int i) { + String ret = ""; + for (final Pair pair : text) { + if (pair.getFirst() == i) { + ret += pair.getSecond() + " "; + } + } + return ret.trim(); + } + + @Override + public String toString() { + String str = ""; + for (int i = 0; i < subTags.size() || i < text.size(); i++) { + str += intToText(i); + if (i < subTags.size()) { + str += subTags.get(i).toString() + " "; + } + } + return str.trim(); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Terminal.java b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Terminal.java new file mode 100644 index 0000000..5093f94 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/Terminal.java @@ -0,0 +1,63 @@ +package edu.kit.informatik; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * This class provides some simple methods for input/output from and to a terminal. + * + * Never modify this class, never upload it to Praktomat. This is only for your local use. If an assignment tells you to + * use this class for input and output never use System.out or System.in in the same assignment. + * + * @author ITI, VeriAlg Group + * @author IPD, SDQ Group + * @version 4 + */ +public final class Terminal { + + /** + * BufferedReader for reading from standard input line-by-line. + */ + private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + + /** + * Private constructor to avoid object generation. + */ + private Terminal() { + } + + /** + * Print a String to the standard output. + * + * The String out must not be null. + * + * @param out + * The string to be printed. + */ + public static void printLine(String out) { + System.out.println(out); + } + + /** + * Reads a line from standard input. + * + * Returns null at the end of the standard input. + * + * Use Ctrl+D to indicate the end of the standard input. + * + * @return The next line from the standard input or null. + */ + public static String readLine() { + try { + return in.readLine(); + } catch (IOException e) { + /* + * rethrow unchecked (!) exception to prevent students from being forced to use Exceptions before they have + * been introduced in the lecture. + */ + throw new RuntimeException(e); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/html.txt b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/html.txt new file mode 100644 index 0000000..940d61c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Assignment6C_HtmlParser/src/edu/kit/informatik/html.txt @@ -0,0 +1,11 @@ + +head + +Titel + +Inhalt des HTML-Dokumentes Zeile1 +Inhalt des +HTML-Dokumentes +Zeile2 + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/.checkstyle b/Uni/Java/WS1516/Programmieren/Final01/.checkstyle new file mode 100644 index 0000000..4d50a66 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Final01/.classpath b/Uni/Java/WS1516/Programmieren/Final01/.classpath new file mode 100644 index 0000000..0a757b9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Final01/.project b/Uni/Java/WS1516/Programmieren/Final01/.project new file mode 100644 index 0000000..84bd6fc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/.project @@ -0,0 +1,17 @@ + + + Final01 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Uni/Java/WS1516/Programmieren/Final01/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Final01/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Final01/2016-03-19_12-17-51.zip b/Uni/Java/WS1516/Programmieren/Final01/2016-03-19_12-17-51.zip new file mode 100644 index 0000000..1eab5b7 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/2016-03-19_12-17-51.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/Final01.iml b/Uni/Java/WS1516/Programmieren/Final01/Final01.iml new file mode 100644 index 0000000..da0f254 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/Final01.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/TestSuite.config b/Uni/Java/WS1516/Programmieren/Final01/TestSuite.config new file mode 100644 index 0000000..e9ff8ee --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/TestSuite.config @@ -0,0 +1,4 @@ +#TestSuite runtime config +#Thu Feb 25 14:17:49 CET 2016 +TestSources=tests +TestClass=Main diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/README.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/README.txt new file mode 100644 index 0000000..d46b7d1 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/README.txt @@ -0,0 +1,35 @@ +1. Die Klassen "TestSuite", "ExpectionInputStream", "ExpectionOutputStream" in das Projekt kopieren. + +2. Beim Start der TestSuite-Klasse wird nach dem Ordner der Testfälle gefragt, + berücksichtige dabei dass der Projekt Ordner als Start-Verzeichnis gilt. + +3. Danach wird nach der zu testenden Klasse gefragt, gebe hier einfach den Namen der Klasse im Package + "edu.kit.informatik" an, die als Main-Klasse gehandelt wird. + +4. Die test-Dateien müssen so benannt sein: "*.test" und forlgender formatierung folgen: + - Ein Testfall wird dargestellt als: : "" + - Wobei 'expected' eine Zeichenkette über mehrere Zeilen sein kann, die dem + regulären Ausdruck [a-zA-Z0-9\\s]+ entspricht. 'expected' stellt dabei die erwartete Ausgabe dar. + 'expected' muss entweder "true", "false", einer Zahl oder einer Zeichenkette + gekennzeichnet durch " entsprechen. + 'expected' kann nur als Zeichenkette mehrzeilig sein, solange der Zeilenumsprung + in den " ist. + + - und 'actual' eine Zeichenkette über eine Zeile sein kann, die dem regulären Ausdruck + [a-zA-Z0-9\\s-;]+ entspricht. 'actual' stellt dabei die Eingabe eines Befehls dar. + - Die Kommandozeilenargumente werden dargestellt als: + <"cmd1";"cmd2";...> + Wobei cmd1 ein Kommandozeilenargument darstellt. + Die Kommandozeilenargumente müssen in der ersten Zeile der .test-Datei stehen. + +5. Ein Beispiel für den Test-Fall auf dem Aufgabenblatt: + +<"src\edu\kit\informatik\tests\test.graph"> +6 : "search bB;d;route" +"bB Aa C d" : "route bB;d;route" +"bB Aa C d +bB Aa d +bB C Aa d +bB C d" : "route bB;d;all" +"Aa +C" : "nodes bB" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/docs.log b/Uni/Java/WS1516/Programmieren/Final01/bin/docs.log new file mode 100644 index 0000000..370a81b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/docs.log @@ -0,0 +1,3602 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2016.5.13) 28 DEC 2016 15:41 +entering extended mode +**docs.tex +(docs.tex +LaTeX2e <2014/05/01> +Babel <3.9l> and hyphenation patterns for 68 languages loaded. + +! LaTeX Error: Environment texdocpackage undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.1 \begin{texdocpackage} + {edu.kit.informatik} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.1 \begin{texdocpackage}{e + du.kit.informatik} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no k in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no k in font nullfont! + +Overfull \hbox (20.0pt too wide) in paragraph at lines 1--3 +[] + [] + + +! LaTeX Error: Environment texdocclass undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.4 \begin{texdocclass} + {class}{Constant} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.4 \begin{texdocclass}{c + lass}{Constant} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! + +! LaTeX Error: Environment texdocclassintro undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.6 \begin{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no A in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no m in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassintro}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.7 ...s used in the program\end{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocclassfields undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.8 \begin{texdocclassfields} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.9 \texdocfield + {public static final}{String}{CODE\_NOT\_ACCESSIBLE}{The Con... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.10 \texdocfield + {public static final}{String}{COMMAND\_NOT\_FOUND}{The Cons... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.11 \texdocfield + {public static final}{String}{COMMAND\_SUCCESSFUL}{The Cons... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.12 \texdocfield + {public static final}{String}{EDGE\_CANNOT\_REMOVE}{The Con... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.13 \texdocfield + {public static final}{String}{EDGE\_CONTAINED\_ALLREADY}{Th... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no Y in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no Y in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.14 \texdocfield + {public static final}{String}{EDGE\_VERTEX\_NOT\_FOUND}{The... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.15 \texdocfield + {public static final}{String}{FILE\_WRONG\_FORMAT}{The Cons... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no W in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no W in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.16 \texdocfield + {public static final}{String}{GRAPH\_EDGE\_LESS\_THAN\_ONE}... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.17 \texdocfield + {public static final}{String}{GRAPH\_NOT\_CONTINOUS}{The Co... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.18 \texdocfield + {public static final}{String}{GRAPH\_VERTEX\_LESS\_THAN\_TW... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no W in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no W in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.19 \texdocfield + {public static final}{String}{NUMBER\_FORMAT\_ILLEGAL}{The ... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.20 \texdocfield + {public static final}{String}{PREFIX\_ERROR}{The Constant P... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.21 \texdocfield + {public static final}{String}{REGEX\_CITY\_NAME}{The regex ... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no Y in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.22 \texdocfield + {public static final}{String}{REGEX\_CRITERION\_ALL}{The Co... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.23 \texdocfield + {public static final}{String}{REGEX\_CRITERION\_BOTH}{The C... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.24 \texdocfield + {public static final}{String}{REGEX\_CRITERION\_DISTANCE}{T... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.25 \texdocfield + {public static final}{String}{REGEX\_CRITERION\_TIME}{The C... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.26 \texdocfield + {public static final}{String}{REGEX\_EDGE}{The regex for an... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.27 \texdocfield + {public static final}{String}{REGEX\_GRAPH\_FILE}{The regex... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.28 \texdocfield + {public static final}{String}{REGEX\_POSITIVE\_INTEGER}{The... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.29 \texdocfield + {public static final}{String}{REGEX\_ROUTE}{The Constant RE... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.30 \texdocfield + {public static final}{String}{REGEX\_SEARCH}{The Constant R... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.31 \texdocfield + {public static final}{String}{SEPARATOR}{The regex for the ... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no w in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.32 \texdocfield + {public static final}{String}{VERTEX\_DUPLICATE}{The Consta... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.33 \texdocfield + {public static final}{String}{VERTEX\_NOT\_FOUND}{The Const... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassfields}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.34 \end{texdocclassfields} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclass}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.35 \end{texdocclass} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +Overfull \hbox (20.0pt too wide) in paragraph at lines 4--36 +[] + [] + + +! LaTeX Error: Environment texdocclass undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.38 \begin{texdocclass} + {class}{FileInputHelper} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.38 \begin{texdocclass}{c + lass}{FileInputHelper} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! + +! LaTeX Error: Environment texdocclassintro undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.40 \begin{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no H in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassintro}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.41 ... reading text files.\end{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocclassmethods undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.42 \begin{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.43 \texdocmethod + {public static}{String}{read}{(String file)}{Reads the spe... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no ( in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no ) in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no , in font nullfont! +Missing character: There is no w in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no ' in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no , in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no , in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocparameters undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.45 ...line, and so on.}{\begin{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.46 \texdocparameter + {file}{the file to be read} +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocparameters}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.47 \end{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.48 \texdocreturn + {the content of the file} +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassmethods}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.50 \end{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclass}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.51 \end{texdocclass} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +Overfull \hbox (20.0pt too wide) in paragraph at lines 38--52 +[] + [] + + +! LaTeX Error: Environment texdocclass undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.54 \begin{texdocclass} + {class}{Main} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.54 \begin{texdocclass}{c + lass}{Main} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! + +! LaTeX Error: Environment texdocclassintro undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.56 \begin{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassintro}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.57 The Class Main.\end{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocclassmethods undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.58 \begin{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.59 \texdocmethod + {public static}{void}{main}{(String args)}{The main method... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no ( in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no ) in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocparameters undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.59 ...The main method.}{\begin{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.60 \texdocparameter + {args}{the arguments} +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no s in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocparameters}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.61 \end{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclassmethods}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.63 \end{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclass}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.64 \end{texdocclass} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +Overfull \hbox (20.0pt too wide) in paragraph at lines 54--65 +[] + [] + + +! LaTeX Error: Environment texdocclass undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.67 \begin{texdocclass} + {class}{Terminal} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.67 \begin{texdocclass}{c + lass}{Terminal} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! + +! LaTeX Error: Environment texdocclassintro undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.69 \begin{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 70. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 70. +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocp undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.72 \begin{texdocp} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no N in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no , in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no k in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocp}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.75 ...em.in in the same assignment.\end{texdocp} + \end{texdocclassintro} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclassintro}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.75 ...gnment.\end{texdocp}\end{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocclassmethods undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.76 \begin{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.77 \texdocmethod + {public static}{void}{printLine}{(String out)}{Print a Str... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no ( in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no ) in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocp undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.78 \begin{texdocp} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocp}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.79 ... String out must not be null.\end{texdocp} + }{\begin{texdocparameters} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocparameters undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.79 ...ll.\end{texdocp}}{\begin{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.80 \texdocparameter + {out}{The string to be printed.} +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocparameters}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.81 \end{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.83 \texdocmethod + {public static}{String}{readLine}{()}{Reads a line from st... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no ( in font nullfont! +Missing character: There is no ) in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocp undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.84 \begin{texdocp} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no R in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocp undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.86 \begin{texdocp} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no U in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no + in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocp}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.87 ...he end of the standard input.\end{texdocp} + \end{texdocp}}{\texdocretu... + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocp}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.87 ... standard input.\end{texdocp}\end{texdocp} + }{\texdocreturn{The next l... + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.87 ....\end{texdocp}\end{texdocp}}{\texdocreturn + {The next line from the st... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassmethods}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.89 \end{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclass}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.90 \end{texdocclass} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +Overfull \hbox (20.0pt too wide) in paragraph at lines 67--91 +[] + [] + + +Overfull \hbox (5.00002pt too wide) in paragraph at lines 67--91 +$\OML/cmm/m/it/10 =$ + [] + + +! LaTeX Error: \begin{document} ended by \end{texdocpackage}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.93 \end{texdocpackage} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +) +! Emergency stop. +<*> docs.tex + +*** (job aborted, no legal \end found) + + +Here is how much of TeX's memory you used: + 23 strings out of 493698 + 332 string characters out of 3144409 + 55149 words of memory out of 3000000 + 3449 multiletter control sequences out of 15000+200000 + 3640 words of font info for 14 fonts, out of 3000000 for 9000 + 1025 hyphenation exceptions out of 8191 + 18i,1n,12p,165b,70s stack positions out of 5000i,500n,10000p,200000b,50000s +! ==> Fatal error occurred, no output PDF file produced! diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/docs.tex b/Uni/Java/WS1516/Programmieren/Final01/bin/docs.tex new file mode 100644 index 0000000..18717f8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/docs.tex @@ -0,0 +1,96 @@ +\begin{texdocpackage}{edu.kit.informatik} +\label{texdoclet:edu.kit.informatik} + +\begin{texdocclass}{class}{Constant} +\label{texdoclet:edu.kit.informatik.Constant} +\begin{texdocclassintro} +All constants used in the program\end{texdocclassintro} +\begin{texdocclassfields} +\texdocfield{public static final}{String}{CODE\_NOT\_ACCESSIBLE}{The Constant CODE\_NOT\_ACCESSIBLE.} +\texdocfield{public static final}{String}{COMMAND\_NOT\_FOUND}{The Constant COMMAND\_NOT\_FOUND.} +\texdocfield{public static final}{String}{COMMAND\_SUCCESSFUL}{The Constant COMMAND\_SUCCESSFUL.} +\texdocfield{public static final}{String}{EDGE\_CANNOT\_REMOVE}{The Constant EDGE\_CANNOT\_REMOVE.} +\texdocfield{public static final}{String}{EDGE\_CONTAINED\_ALLREADY}{The Constant EDGE\_CONTAINED\_ALLREADY.} +\texdocfield{public static final}{String}{EDGE\_VERTEX\_NOT\_FOUND}{The Constant EDGE\_VERTEX\_NOT\_FOUND.} +\texdocfield{public static final}{String}{FILE\_WRONG\_FORMAT}{The Constant FILE\_WRONG\_FORMAT.} +\texdocfield{public static final}{String}{GRAPH\_EDGE\_LESS\_THAN\_ONE}{The Constant GRAPH\_EDGE\_LESS\_THAN\_ONE.} +\texdocfield{public static final}{String}{GRAPH\_NOT\_CONTINOUS}{The Constant GRAPH\_NOT\_CONTINOUS.} +\texdocfield{public static final}{String}{GRAPH\_VERTEX\_LESS\_THAN\_TWO}{The Constant GRAPH\_VERTEX\_LESS\_THAN\_TWO.} +\texdocfield{public static final}{String}{NUMBER\_FORMAT\_ILLEGAL}{The Constant NUMBER\_FORMAT\_ILLEGAL.} +\texdocfield{public static final}{String}{PREFIX\_ERROR}{The Constant PREFIX\_ERROR.} +\texdocfield{public static final}{String}{REGEX\_CITY\_NAME}{The regex for a city name.} +\texdocfield{public static final}{String}{REGEX\_CRITERION\_ALL}{The Constant REGEX\_CRITERION\_ALL.} +\texdocfield{public static final}{String}{REGEX\_CRITERION\_BOTH}{The Constant REGEX\_CRITERION\_BOTH.} +\texdocfield{public static final}{String}{REGEX\_CRITERION\_DISTANCE}{The Constant REGEX\_CRITERION\_DISTANCE.} +\texdocfield{public static final}{String}{REGEX\_CRITERION\_TIME}{The Constant REGEX\_CRITERION\_TIME.} +\texdocfield{public static final}{String}{REGEX\_EDGE}{The regex for an edge.} +\texdocfield{public static final}{String}{REGEX\_GRAPH\_FILE}{The regex for a file that contains a graph.} +\texdocfield{public static final}{String}{REGEX\_POSITIVE\_INTEGER}{The regex for a positive integer.} +\texdocfield{public static final}{String}{REGEX\_ROUTE}{The Constant REGEX\_ROUTE.} +\texdocfield{public static final}{String}{REGEX\_SEARCH}{The Constant REGEX\_SEARCH.} +\texdocfield{public static final}{String}{SEPARATOR}{The regex for the SEPARATOR of the two parts in the file.} +\texdocfield{public static final}{String}{VERTEX\_DUPLICATE}{The Constant VERTEX\_DUPLICATE.} +\texdocfield{public static final}{String}{VERTEX\_NOT\_FOUND}{The Constant VERTEX\_NOT\_FOUND.} +\end{texdocclassfields} +\end{texdocclass} + + +\begin{texdocclass}{class}{FileInputHelper} +\label{texdoclet:edu.kit.informatik.FileInputHelper} +\begin{texdocclassintro} +Helper class for reading text files.\end{texdocclassintro} +\begin{texdocclassmethods} +\texdocmethod{public static}{String}{read}{(String file)}{Reads the specified file and returns its content as a String array, where + the first array field contains the file's first line, the second field + contains the second line, and so on.}{\begin{texdocparameters} +\texdocparameter{file}{the file to be read} +\end{texdocparameters} +\texdocreturn{the content of the file} +} +\end{texdocclassmethods} +\end{texdocclass} + + +\begin{texdocclass}{class}{Main} +\label{texdoclet:edu.kit.informatik.Main} +\begin{texdocclassintro} +The Class Main.\end{texdocclassintro} +\begin{texdocclassmethods} +\texdocmethod{public static}{void}{main}{(String args)}{The main method.}{\begin{texdocparameters} +\texdocparameter{args}{the arguments} +\end{texdocparameters} +} +\end{texdocclassmethods} +\end{texdocclass} + + +\begin{texdocclass}{class}{Terminal} +\label{texdoclet:edu.kit.informatik.Terminal} +\begin{texdocclassintro} +This class provides some simple methods for input$/$output from and to a + terminal. + \begin{texdocp} + Never modify this class, never upload it to Praktomat. This is only for your + local use. If an assignment tells you to use this class for input and output + never use System.out or System.in in the same assignment.\end{texdocp}\end{texdocclassintro} +\begin{texdocclassmethods} +\texdocmethod{public static}{void}{printLine}{(String out)}{Print a String to the standard output. + \begin{texdocp} + The String out must not be null.\end{texdocp}}{\begin{texdocparameters} +\texdocparameter{out}{The string to be printed.} +\end{texdocparameters} +} +\texdocmethod{public static}{String}{readLine}{()}{Reads a line from standard input. + \begin{texdocp} + Returns null at the end of the standard input. + \begin{texdocp} + Use Ctrl+D to indicate the end of the standard input.\end{texdocp}\end{texdocp}}{\texdocreturn{The next line from the standard input or null.} +} +\end{texdocclassmethods} +\end{texdocclass} + + +\end{texdocpackage} + + + diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/Constant.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/Constant.class new file mode 100644 index 0000000..849526d Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/Constant.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/ExitException.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/ExitException.class new file mode 100644 index 0000000..72d4e96 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/ExitException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/FileInputHelper.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/FileInputHelper.class new file mode 100644 index 0000000..b60a3c5 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/FileInputHelper.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..e9bbe29 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/MainTest.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/MainTest.class new file mode 100644 index 0000000..f069e70 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/MainTest.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/NoExitSecurityManager.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/NoExitSecurityManager.class new file mode 100644 index 0000000..b0e321f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/NoExitSecurityManager.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/Terminal.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/Terminal.class new file mode 100644 index 0000000..1faddb9 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/Terminal.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/exception/IllegalObjectException.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/exception/IllegalObjectException.class new file mode 100644 index 0000000..aeae4c4 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/exception/IllegalObjectException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/exception/InvalidFileFormatException.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/exception/InvalidFileFormatException.class new file mode 100644 index 0000000..e3a7cca Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/exception/InvalidFileFormatException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/Edge.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/Edge.class new file mode 100644 index 0000000..c116686 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/Edge.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/Graph.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/Graph.class new file mode 100644 index 0000000..29cee69 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/Graph.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/Vertex.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/Vertex.class new file mode 100644 index 0000000..55417f2 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/Vertex.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/fileinput/GraphBuilder.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/fileinput/GraphBuilder.class new file mode 100644 index 0000000..7fcfa44 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/fileinput/GraphBuilder.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/GraphPathFinder.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/GraphPathFinder.class new file mode 100644 index 0000000..bd8b9fa Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/GraphPathFinder.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertex.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertex.class new file mode 100644 index 0000000..560a602 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertex.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertexComparator.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertexComparator.class new file mode 100644 index 0000000..1907df2 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertexComparator.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertexDistanceComparator.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertexDistanceComparator.class new file mode 100644 index 0000000..d9183ab Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertexDistanceComparator.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertexTimeComparator.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertexTimeComparator.class new file mode 100644 index 0000000..07afdc0 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/graph/pathfinding/PathVertexTimeComparator.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/Command.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/Command.class new file mode 100644 index 0000000..9dc1b71 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/Command.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/InfoCommand.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/InfoCommand.class new file mode 100644 index 0000000..cb9ac3a Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/InfoCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/InputManager.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/InputManager.class new file mode 100644 index 0000000..412e7a8 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/InputManager.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/InsertCommand.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/InsertCommand.class new file mode 100644 index 0000000..7803640 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/InsertCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/NodesCommand.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/NodesCommand.class new file mode 100644 index 0000000..4ca7b91 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/NodesCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/QuitCommand.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/QuitCommand.class new file mode 100644 index 0000000..0738b30 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/QuitCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/RemoveCommand.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/RemoveCommand.class new file mode 100644 index 0000000..9d88b7c Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/RemoveCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/RouteCommand.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/RouteCommand.class new file mode 100644 index 0000000..20c318d Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/RouteCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/SearchCommand.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/SearchCommand.class new file mode 100644 index 0000000..ba00b0f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/SearchCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/VerticesCommand.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/VerticesCommand.class new file mode 100644 index 0000000..f8aa4ed Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/terminalinput/VerticesCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/test.graph b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/test.graph new file mode 100644 index 0000000..ebdc5cc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/test.graph @@ -0,0 +1,10 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/testsuite/ExpectionInputStream.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/testsuite/ExpectionInputStream.class new file mode 100644 index 0000000..d9d1acc Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/testsuite/ExpectionInputStream.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.class new file mode 100644 index 0000000..8fad49d Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/testsuite/TestSuite.class b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/testsuite/TestSuite.class new file mode 100644 index 0000000..b5ac514 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/edu/kit/informatik/tests/testsuite/TestSuite.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/duplicateEdge.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/duplicateEdge.txt new file mode 100644 index 0000000..a2e06e6 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/duplicateEdge.txt @@ -0,0 +1,7 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;bB;2;4 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/duplicateVertex.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/duplicateVertex.txt new file mode 100644 index 0000000..782a3bf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/duplicateVertex.txt @@ -0,0 +1,11 @@ +Aa +aA +AA +aa +bB +-- +aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/edgeWithoutVertex.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/edgeWithoutVertex.txt new file mode 100644 index 0000000..eff11e9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/edgeWithoutVertex.txt @@ -0,0 +1,5 @@ +bB +C +d +-- +Aa;bB;1;3 diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/emptyFile.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/emptyFile.txt new file mode 100644 index 0000000..e69de29 diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/negativeNumber.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/negativeNumber.txt new file mode 100644 index 0000000..18f3bd5 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/negativeNumber.txt @@ -0,0 +1,4 @@ +Aa +bB +-- +Aa;bB;1;-3 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/noDivider.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/noDivider.txt new file mode 100644 index 0000000..fc8d307 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/noDivider.txt @@ -0,0 +1,9 @@ +Aa +bB +C +d +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/noFirstPart.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/noFirstPart.txt new file mode 100644 index 0000000..db1350f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/noFirstPart.txt @@ -0,0 +1,6 @@ +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/noSecondPart.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/noSecondPart.txt new file mode 100644 index 0000000..a0601cf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/noSecondPart.txt @@ -0,0 +1,5 @@ +Aa +bB +C +d +-- \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/notContinous.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/notContinous.txt new file mode 100644 index 0000000..532c89f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/notContinous.txt @@ -0,0 +1,6 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/numberOverflow.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/numberOverflow.txt new file mode 100644 index 0000000..c41d589 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/numberOverflow.txt @@ -0,0 +1,10 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;30000000000 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/numberZero.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/numberZero.txt new file mode 100644 index 0000000..87f5380 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/graphs/numberZero.txt @@ -0,0 +1,5 @@ +C +d +-- +bB;C;5;2 +C;d;0;0 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/inputFile.txt b/Uni/Java/WS1516/Programmieren/Final01/bin/inputFile.txt new file mode 100644 index 0000000..75a1c70 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/inputFile.txt @@ -0,0 +1,15 @@ +Aa +bB +C +d +e +f +-- +Aa;bB;1;+003 +Aa;C;2;4 +Aa;d;11;20 +bb;D;1;1 +bB;C;5;2 +C;d;1;1 +d;e;1;1 +f;e;1;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/insert.test b/Uni/Java/WS1516/Programmieren/Final01/bin/insert.test new file mode 100644 index 0000000..bb6845b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/insert.test @@ -0,0 +1,20 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#Errors +00err : "insert " +00err : "insert null" +00err : "insert null;null;;" +00err : "insert null;null;null;null" +00err : "insert null;null;null;null;null;null" +00err : "insert Aa;EE;Cee;1" +00err : "insert Aa;EE;1;dee" +00err : "insert Aa;Aa;5;4" +00err : "insert Aa;bb;10;5" +00err : "insert bB;d;50000000000;5" +#00err : "insert Aa;Aa;-5;4" +00err : "insert bB;d;1;0" +00err : "insert bB;d;0;0" + +#Works +"OK" : "insert Aa;ee;1;10" +"OK" : "insert bB;d;2;5" +#"OK" : "insert --;d;2;5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/insertTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/insertTest.log new file mode 100644 index 0000000..e69de29 diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/nodesInsertTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/nodesInsertTest.log new file mode 100644 index 0000000..b87d962 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/nodesInsertTest.log @@ -0,0 +1,10 @@ +Error, vertex not found +Aa +bB +d +OK +C +Aa +bB +d +ee diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/nodesRemoveTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/nodesRemoveTest.log new file mode 100644 index 0000000..23be1be --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/nodesRemoveTest.log @@ -0,0 +1,6 @@ +OK +C +C +d +Error, edge can't be removed +OK diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/nodesTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/nodesTest.log new file mode 100644 index 0000000..04acdba --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/nodesTest.log @@ -0,0 +1,18 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, vertex not found +bB +C +d +bB +C +d +Aa +bB +d +Aa +C +Aa +C diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/publicTestTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/publicTestTest.log new file mode 100644 index 0000000..16024af --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/publicTestTest.log @@ -0,0 +1,8 @@ +6 +bB Aa C d +bB Aa C d +bB Aa d +bB C Aa d +bB C d +Aa +C diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/removeTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/removeTest.log new file mode 100644 index 0000000..fcec023 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/removeTest.log @@ -0,0 +1,10 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +OK +OK +OK +OK +OK + diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/removeTillEmptyTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/removeTillEmptyTest.log new file mode 100644 index 0000000..e22e2cd --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/removeTillEmptyTest.log @@ -0,0 +1,6 @@ +OK +OK +OK +OK +OK + diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/removeTillNotCoherentTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/removeTillNotCoherentTest.log new file mode 100644 index 0000000..042c57e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/removeTillNotCoherentTest.log @@ -0,0 +1,7 @@ +OK +OK +OK +OK +OK +Error, vertex not found +Error, edge contains vertices that have not been initilized diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/routeTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/routeTest.log new file mode 100644 index 0000000..692b9de --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/routeTest.log @@ -0,0 +1,97 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, vertex not found +Error, vertex not found +Error, vertex not found +Aa +Aa +Aa +Aa +Aa bB +Aa bB +Aa bB +Aa bB +Aa C bB +Aa d C bB +Aa C +Aa C +Aa C +Aa bB C +Aa C +Aa d C +Aa C d +Aa C d +Aa C d +Aa bB C d +Aa C d +Aa d +bB +bB +bB +bB +bB Aa +bB Aa +bB Aa +bB Aa +bB C Aa +bB C d Aa +bB C +bB Aa C +bB C +bB Aa C +bB Aa d C +bB C +bB C d +bB Aa C d +bB C d +bB Aa C d +bB Aa d +bB C Aa d +bB C d +C +C +C +C +C Aa +C Aa +C Aa +C Aa +C bB Aa +C d Aa +C bB +C Aa bB +C bB +C Aa bB +C bB +C d Aa bB +C d +C d +C d +C Aa d +C bB Aa d +C d +d +d +d +d +d C Aa +d C Aa +d C Aa +d Aa +d C Aa +d C bB Aa +d C bB +d C Aa bB +d C bB +d Aa bB +d Aa C bB +d C Aa bB +d C bB +d C +d C +d C +d Aa bB C +d Aa C +d C diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/searchTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/searchTest.log new file mode 100644 index 0000000..193f551 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/searchTest.log @@ -0,0 +1,55 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, vertex not found +Error, vertex not found +Error, vertex not found +0 +0 +0 +3 +1 +10 +4 +2 +20 +5 +5 +50 +0 +0 +0 +3 +1 +10 +2 +3 +29 +3 +6 +73 +0 +0 +0 +4 +2 +20 +2 +3 +29 +1 +3 +10 +0 +0 +0 +5 +5 +50 +3 +6 +73 +1 +3 +10 diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/test1Test.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/test1Test.log new file mode 100644 index 0000000..a23c7c9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/test1Test.log @@ -0,0 +1 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/test2Test.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/test2Test.log new file mode 100644 index 0000000..a23c7c9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/test2Test.log @@ -0,0 +1 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/treeGraphTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/treeGraphTest.log new file mode 100644 index 0000000..8986d12 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/treeGraphTest.log @@ -0,0 +1,68 @@ +A +B +C +D +E +F +G +-- +A;B;2;5 +A;C;100;2 +B;D;100;60 +B;E;300;20 +C;F;4;4 +C;G;20;6 +B +C +A +D +E +A +F +G +B +B +C +C +A B +A B +A B +A B +5 +2 +29 +A C +A C +A C +A C +2 +100 +10004 +A B D +A B D +A B D +A B D +65 +102 +14629 +A B E +A B E +A B E +A B E +25 +302 +91829 +A C F +A C F +A C F +A C F +6 +104 +10852 +A C G +A C G +A C G +A C G +8 +120 +14464 diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/logs/verticesTest.log b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/verticesTest.log new file mode 100644 index 0000000..17427b0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/logs/verticesTest.log @@ -0,0 +1,12 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Aa +bB +C +d +OK +OK +OK +OK +OK + diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/nodes.test b/Uni/Java/WS1516/Programmieren/Final01/bin/nodes.test new file mode 100644 index 0000000..8ba3e32 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/nodes.test @@ -0,0 +1,22 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#Errors +00err : "nodes " +00err : "nodes null" +00err : "nodes ;;" +00err : "nodes e" +00err : "nodes cc" + +#Nodes of all +"bB +C +d" : "nodes Aa" +"bB +C +d" : "nodes aa" +"Aa +bB +d" : "nodes C" +"Aa +C" : "nodes d" +"Aa +C" : "nodes bB" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/nodesInsert.test b/Uni/Java/WS1516/Programmieren/Final01/bin/nodesInsert.test new file mode 100644 index 0000000..0a8bd24 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/nodesInsert.test @@ -0,0 +1,11 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +00err : "nodes ee" +"Aa +bB +d" : "nodes C" +"OK" : "insert C;ee;2;13" +"C" : "nodes ee" +"Aa +bB +d +ee" : "nodes C" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/nodesRemove.test b/Uni/Java/WS1516/Programmieren/Final01/bin/nodesRemove.test new file mode 100644 index 0000000..cbe1bcb --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/nodesRemove.test @@ -0,0 +1,7 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +"OK" : "remove bB;Aa" +"C" : "nodes bB" +"C +d" : "nodes Aa" +00err : "remove Aa;bB" +"OK" : "remove C;Aa" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/publicTest.test b/Uni/Java/WS1516/Programmieren/Final01/bin/publicTest.test new file mode 100644 index 0000000..f0622de --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/publicTest.test @@ -0,0 +1,9 @@ +<"C:\Eclipse\workspace\Final01\src\edu\kit\informatik\tests\test.graph"> +6 : "search bB;d;route" +"bB Aa C d" : "route bB;d;route" +"bB Aa C d +bB Aa d +bB C Aa d +bB C d" : "route bB;d;all" +"Aa +C" : "nodes bB" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/remove.test b/Uni/Java/WS1516/Programmieren/Final01/bin/remove.test new file mode 100644 index 0000000..d5dcc3b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/remove.test @@ -0,0 +1,16 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#init +#Errors +00err : "remove " +00err : "remove null;" +00err : "remove null;null;null" +00err : "remove ;" + +"OK" : "remove C;d" +"OK" : "remove bB;C" +"OK" : "remove d;aa" +"OK" : "remove aa;c" +"OK" : "remove aa;bb" + +" +" : "info" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/removeTillEmpty.test b/Uni/Java/WS1516/Programmieren/Final01/bin/removeTillEmpty.test new file mode 100644 index 0000000..980746f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/removeTillEmpty.test @@ -0,0 +1,9 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +"OK" : "remove C;bB" +"OK" : "remove C;d" +"OK" : "remove Aa;d" +"OK" : "remove Aa;bB" +"OK" : "remove Aa;C" + +" +" : "info" diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/removeTillNotCoherent.test b/Uni/Java/WS1516/Programmieren/Final01/bin/removeTillNotCoherent.test new file mode 100644 index 0000000..3a50bf1 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/removeTillNotCoherent.test @@ -0,0 +1,8 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +"OK" : "remove bB;C" +"!Cok" : "remove C;d" +"OK" : "remove Aa;d" +"OK" : "remove Aa;C" +"OK" : "remove Aa;bB" +00err : "nodes Aa" +00err : "insert Aa;ee;10;5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/route.test b/Uni/Java/WS1516/Programmieren/Final01/bin/route.test new file mode 100644 index 0000000..8cdba66 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/route.test @@ -0,0 +1,120 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#72 Testcases +#Errors +00err : "route " +00err : "route null;null;null" +00err : "route null;null;null;null" +00err : "route null;null;time" +00err : "route null;null;route" +00err : "route null;null;optimal" +00err : "route ceee;deeee;optimal;" + +#Aa to all others +"Aa" : "route Aa;Aa;time" +"Aa" : "route Aa;Aa;route" +"Aa" : "route Aa;Aa;optimal" +"Aa" : "route Aa;Aa;all" + +"Aa bB" : "route Aa;bB;time" +"Aa bB" : "route Aa;bB;route" +"Aa bB" : "route Aa;bB;optimal" +"Aa bB +Aa C bB +Aa d C bB" : "route Aa;bB;all" + +"Aa C" : "route Aa;C;time" +"Aa C" : "route Aa;C;route" +"Aa C" : "route Aa;C;optimal" +"Aa bB C +Aa C +Aa d C" : "route Aa;C;all" + +"Aa C d" : "route Aa;d;time" +"Aa C d" : "route Aa;d;route" +"Aa C d" : "route Aa;d;optimal" +"Aa bB C d +Aa C d +Aa d" : "route Aa;d;all" + +#bB to all others +"bB" : "route bB;bB;time" +"bB" : "route bB;bB;route" +"bB" : "route bB;bB;optimal" +"bB" : "route bB;bB;all" + +"bB Aa" : "route bB;Aa;time" +"bB Aa" : "route bB;Aa;route" +"bB Aa" : "route bB;Aa;optimal" +"bB Aa +bB C Aa +bB C d Aa" : "route bB;Aa;all" + +"bB C" : "route bB;C;time" +"bB Aa C" : "route bB;C;route" +"bB C" : "route bB;C;optimal" +"bB Aa C +bB Aa d C +bB C" : "route bB;C;all" + +"bB C d" : "route bB;d;time" +"bB Aa C d" : "route bB;d;route" +"bB C d" : "route bB;d;optimal" +"bB Aa C d +bB Aa d +bB C Aa d +bB C d" : "route bB;d;all" + +#C to all others +"C" : "route C;C;time" +"C" : "route C;C;route" +"C" : "route C;C;optimal" +"C" : "route C;C;all" + +"C Aa" : "route C;Aa;time" +"C Aa" : "route C;Aa;route" +"C Aa" : "route C;Aa;optimal" +"C Aa +C bB Aa +C d Aa" : "route C;Aa;all" + +"C bB" : "route C;bB;time" +"C Aa bB" : "route C;bB;route" +"C bB" : "route C;bB;optimal" +"C Aa bB +C bB +C d Aa bB" : "route C;bB;all" + +"C d" : "route C;d;time" +"C d" : "route C;d;route" +"C d" : "route C;d;optimal" +"C Aa d +C bB Aa d +C d" : "route C;d;all" + +#d to all others +"d" : "route d;d;time" +"d" : "route d;d;route" +"d" : "route d;d;optimal" +"d" : "route d;d;all" + +"d C Aa" : "route d;Aa;time" +"d C Aa" : "route d;Aa;route" +"d C Aa" : "route d;Aa;optimal" +"d Aa +d C Aa +d C bB Aa" : "route d;Aa;all" + +"d C bB" : "route d;bB;time" +"d C Aa bB" : "route d;bB;route" +"d C bB" : "route d;bB;optimal" +"d Aa bB +d Aa C bB +d C Aa bB +d C bB" : "route d;bB;all" + +"d C" : "route d;C;time" +"d C" : "route d;C;route" +"d C" : "route d;C;optimal" +"d Aa bB C +d Aa C +d C" : "route d;C;all" diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/search.test b/Uni/Java/WS1516/Programmieren/Final01/bin/search.test new file mode 100644 index 0000000..6b13d14 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/search.test @@ -0,0 +1,78 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#55 Testcases +#Errors +00err : "search " +00err : "search null;null;null" +00err : "search null;null;null;null" +00err : "search null;null;time" +00err : "search null;null;route" +00err : "search null;null;optimal" +00err : "search ceee;deeee;optimal;" + +#Aa to all others +0 : "search Aa;Aa;time" +0 : "search Aa;Aa;route" +0 : "search Aa;Aa;optimal" + +3 : "search Aa;bB;time" +1 : "search Aa;bB;route" +10 : "search Aa;bB;optimal" + +4 : "search Aa;C;time" +2 : "search Aa;C;route" +20 : "search Aa;C;optimal" + +5 : "search Aa;d;time" +5 : "search Aa;d;route" +50 : "search Aa;d;optimal" + +#bB to all others +0 : "search bB;bB;time" +0 : "search bB;bB;route" +0 : "search bB;bB;optimal" + +3 : "search bB;Aa;time" +1 : "search bB;Aa;route" +10 : "search bB;Aa;optimal" + +2 : "search bB;C;time" +3 : "search bB;C;route" +29 : "search bB;C;optimal" + +3 : "search bB;d;time" +6 : "search bB;d;route" +73 : "search bB;d;optimal" + +#C to all others +0 : "search C;C;time" +0 : "search C;C;route" +0 : "search C;C;optimal" + +4 : "search C;Aa;time" +2 : "search C;Aa;route" +20 : "search C;Aa;optimal" + +2 : "search C;bB;time" +3 : "search C;bB;route" +29 : "search C;bB;optimal" + +1 : "search C;d;time" +3 : "search C;d;route" +10 : "search C;d;optimal" + +#d to all others +0 : "search d;d;time" +0 : "search d;d;route" +0 : "search d;d;optimal" + +5 : "search d;Aa;time" +5 : "search d;Aa;route" +50 : "search d;Aa;optimal" + +3 : "search d;bB;time" +6 : "search d;bB;route" +73 : "search d;bB;optimal" + +1 : "search d;C;time" +3 : "search d;C;route" +10 : "search d;C;optimal" diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/test.graph b/Uni/Java/WS1516/Programmieren/Final01/bin/test.graph new file mode 100644 index 0000000..ebdc5cc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/test.graph @@ -0,0 +1,10 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/texdoclet.jar b/Uni/Java/WS1516/Programmieren/Final01/bin/texdoclet.jar new file mode 100644 index 0000000..28844aa Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/bin/texdoclet.jar differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/treeGraph.graph b/Uni/Java/WS1516/Programmieren/Final01/bin/treeGraph.graph new file mode 100644 index 0000000..773b01b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/treeGraph.graph @@ -0,0 +1,14 @@ +A +B +C +D +E +F +G +-- +A;B;2;5 +A;C;100;2 +B;D;100;60 +B;E;300;20 +C;F;4;4 +C;G;20;6 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/treeGraph.test b/Uni/Java/WS1516/Programmieren/Final01/bin/treeGraph.test new file mode 100644 index 0000000..69d5c7c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/treeGraph.test @@ -0,0 +1,80 @@ +<"C:\Eclipse\workspace\Final01\tests\treeGraph.graph"> +#Init test +"A +B +C +D +E +F +G +-- +A;B;2;5 +A;C;100;2 +B;D;100;60 +B;E;300;20 +C;F;4;4 +C;G;20;6" : "info" + +#Nodes +"B +C" : "nodes A" +"A +D +E" : "nodes B" +"A +F +G" : "nodes C" +"B" : "nodes D" +"B" : "nodes E" +"C" : "nodes F" +"C" : "nodes G" + +#Routes +#From root +"A B" : "route A;B;time" +"A B" : "route A;B;route" +"A B" : "route A;B;optimal" +"A B" : "route A;B;all" +5 : "search A;B;time" +2 : "search A;B;route" +29 : "search A;B;optimal" + +"A C" : "route A;C;time" +"A C" : "route A;C;route" +"A C" : "route A;C;optimal" +"A C" : "route A;C;all" +2 : "search A;C;time" +100 : "search A;C;route" +10004 : "search A;C;optimal" + +"A B D" : "route A;D;time" +"A B D" : "route A;D;route" +"A B D" : "route A;D;optimal" +"A B D" : "route A;D;all" +65 : "search A;D;time" +102 : "search A;D;route" +14629 : "search A;D;optimal" + +"A B E" : "route A;E;time" +"A B E" : "route A;E;route" +"A B E" : "route A;E;optimal" +"A B E" : "route A;E;all" +25 : "search A;E;time" +302 : "search A;E;route" +91829 : "search A;E;optimal" + +"A C F" : "route A;F;time" +"A C F" : "route A;F;route" +"A C F" : "route A;F;optimal" +"A C F" : "route A;F;all" +6 : "search A;F;time" +104 : "search A;F;route" +10852 : "search A;F;optimal" + +"A C G" : "route A;G;time" +"A C G" : "route A;G;route" +"A C G" : "route A;G;optimal" +"A C G" : "route A;G;all" +8 : "search A;G;time" +120 : "search A;G;route" +14464 : "search A;G;optimal" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/bin/vertices.test b/Uni/Java/WS1516/Programmieren/Final01/bin/vertices.test new file mode 100644 index 0000000..e5f19dc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/bin/vertices.test @@ -0,0 +1,21 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#Errors +00err : "vertices null" +00err : "vertices 10" + +#Standard +"Aa +bB +C +d" : "vertices" + +#Remove till empty +"OK" : "remove C;bB" +"OK" : "remove C;d" +"OK" : "remove Aa;d" +"OK" : "remove Aa;bB" +"OK" : "remove Aa;C" + +#Empty output +" +" : "vertices" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/edu/kit/informatik/ExitException.java b/Uni/Java/WS1516/Programmieren/Final01/junit/edu/kit/informatik/ExitException.java new file mode 100644 index 0000000..c78e470 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/edu/kit/informatik/ExitException.java @@ -0,0 +1,24 @@ +package edu.kit.informatik; + +/** + * The Class ExitException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class ExitException extends SecurityException { + + /** The status. */ + private final int code; + + /** + * Instantiates a new exit exception. + * + * @param code + * the status + */ + public ExitException(final int code) { + super("JVM exit is forbidden!"); + this.code = code; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/edu/kit/informatik/MainTest.java b/Uni/Java/WS1516/Programmieren/Final01/junit/edu/kit/informatik/MainTest.java new file mode 100644 index 0000000..a4a6eba --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/edu/kit/informatik/MainTest.java @@ -0,0 +1,125 @@ +package edu.kit.informatik; + +import org.junit.Test; + +public class MainTest { + + @Test + public void testMainWrongFile() { + System.setSecurityManager(new NoExitSecurityManager()); + + // File not existent + try { + final String[] args = new String[1]; + args[0] = "Z:\\"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + + // duplicated Edge + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\duplicateEdge.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + // edgeWithoutVertex + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\edgeWithoutVertex.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + // emptyFile + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\emptyFile.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + // negativeNumber + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\negativeNumber.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + // noDivider + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\noDivider.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + // noFirstPart + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\noFirstPart.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + // noFirstPart + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\noSecondPart.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + // notContinous + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\notContinous.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + // numberOverflow + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\numberOverflow.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + // numberZero + try { + final String[] args = new String[1]; + args[0] = "C:\\Eclipse\\workspace\\Final01\\junit\\graphs\\numberZero.txt"; + // this should throw an exception + Main.main(args); + assert false; + } catch (final ExitException e) { + // if no exception is thrown something went wrong + } + System.setSecurityManager(null); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/edu/kit/informatik/NoExitSecurityManager.java b/Uni/Java/WS1516/Programmieren/Final01/junit/edu/kit/informatik/NoExitSecurityManager.java new file mode 100644 index 0000000..6b825a9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/edu/kit/informatik/NoExitSecurityManager.java @@ -0,0 +1,33 @@ +package edu.kit.informatik; + +import java.security.Permission; + +/** + * The Class NoExitSecurityManager. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class NoExitSecurityManager extends SecurityManager { + + /** + * Instantiates a new no exit security manager. + */ + public NoExitSecurityManager() { + super(); + } + + @Override + public void checkPermission(final Permission perm) { + } + + @Override + public void checkPermission(final Permission perm, final Object context) { + } + + @Override + public void checkExit(final int status) { + super.checkExit(status); + throw new ExitException(status); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/duplicateEdge.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/duplicateEdge.txt new file mode 100644 index 0000000..a2e06e6 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/duplicateEdge.txt @@ -0,0 +1,7 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;bB;2;4 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/duplicateVertex.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/duplicateVertex.txt new file mode 100644 index 0000000..782a3bf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/duplicateVertex.txt @@ -0,0 +1,11 @@ +Aa +aA +AA +aa +bB +-- +aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/edgeWithoutVertex.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/edgeWithoutVertex.txt new file mode 100644 index 0000000..eff11e9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/edgeWithoutVertex.txt @@ -0,0 +1,5 @@ +bB +C +d +-- +Aa;bB;1;3 diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/emptyFile.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/emptyFile.txt new file mode 100644 index 0000000..e69de29 diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/negativeNumber.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/negativeNumber.txt new file mode 100644 index 0000000..18f3bd5 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/negativeNumber.txt @@ -0,0 +1,4 @@ +Aa +bB +-- +Aa;bB;1;-3 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/noDivider.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/noDivider.txt new file mode 100644 index 0000000..fc8d307 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/noDivider.txt @@ -0,0 +1,9 @@ +Aa +bB +C +d +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/noFirstPart.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/noFirstPart.txt new file mode 100644 index 0000000..db1350f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/noFirstPart.txt @@ -0,0 +1,6 @@ +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/noSecondPart.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/noSecondPart.txt new file mode 100644 index 0000000..a0601cf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/noSecondPart.txt @@ -0,0 +1,5 @@ +Aa +bB +C +d +-- \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/notContinous.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/notContinous.txt new file mode 100644 index 0000000..532c89f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/notContinous.txt @@ -0,0 +1,6 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/numberOverflow.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/numberOverflow.txt new file mode 100644 index 0000000..c41d589 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/numberOverflow.txt @@ -0,0 +1,10 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;30000000000 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/numberZero.txt b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/numberZero.txt new file mode 100644 index 0000000..87f5380 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/junit/graphs/numberZero.txt @@ -0,0 +1,5 @@ +C +d +-- +bB;C;5;2 +C;d;0;0 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/docs.log b/Uni/Java/WS1516/Programmieren/Final01/src/docs.log new file mode 100644 index 0000000..370a81b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/docs.log @@ -0,0 +1,3602 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2016.5.13) 28 DEC 2016 15:41 +entering extended mode +**docs.tex +(docs.tex +LaTeX2e <2014/05/01> +Babel <3.9l> and hyphenation patterns for 68 languages loaded. + +! LaTeX Error: Environment texdocpackage undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.1 \begin{texdocpackage} + {edu.kit.informatik} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.1 \begin{texdocpackage}{e + du.kit.informatik} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no k in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no k in font nullfont! + +Overfull \hbox (20.0pt too wide) in paragraph at lines 1--3 +[] + [] + + +! LaTeX Error: Environment texdocclass undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.4 \begin{texdocclass} + {class}{Constant} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.4 \begin{texdocclass}{c + lass}{Constant} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! + +! LaTeX Error: Environment texdocclassintro undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.6 \begin{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no A in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no m in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassintro}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.7 ...s used in the program\end{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocclassfields undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.8 \begin{texdocclassfields} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.9 \texdocfield + {public static final}{String}{CODE\_NOT\_ACCESSIBLE}{The Con... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.10 \texdocfield + {public static final}{String}{COMMAND\_NOT\_FOUND}{The Cons... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.11 \texdocfield + {public static final}{String}{COMMAND\_SUCCESSFUL}{The Cons... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.12 \texdocfield + {public static final}{String}{EDGE\_CANNOT\_REMOVE}{The Con... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.13 \texdocfield + {public static final}{String}{EDGE\_CONTAINED\_ALLREADY}{Th... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no Y in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no Y in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.14 \texdocfield + {public static final}{String}{EDGE\_VERTEX\_NOT\_FOUND}{The... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.15 \texdocfield + {public static final}{String}{FILE\_WRONG\_FORMAT}{The Cons... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no W in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no W in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.16 \texdocfield + {public static final}{String}{GRAPH\_EDGE\_LESS\_THAN\_ONE}... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.17 \texdocfield + {public static final}{String}{GRAPH\_NOT\_CONTINOUS}{The Co... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.18 \texdocfield + {public static final}{String}{GRAPH\_VERTEX\_LESS\_THAN\_TW... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no W in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no W in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.19 \texdocfield + {public static final}{String}{NUMBER\_FORMAT\_ILLEGAL}{The ... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.20 \texdocfield + {public static final}{String}{PREFIX\_ERROR}{The Constant P... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.21 \texdocfield + {public static final}{String}{REGEX\_CITY\_NAME}{The regex ... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no Y in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.22 \texdocfield + {public static final}{String}{REGEX\_CRITERION\_ALL}{The Co... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.23 \texdocfield + {public static final}{String}{REGEX\_CRITERION\_BOTH}{The C... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no B in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.24 \texdocfield + {public static final}{String}{REGEX\_CRITERION\_DISTANCE}{T... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.25 \texdocfield + {public static final}{String}{REGEX\_CRITERION\_TIME}{The C... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.26 \texdocfield + {public static final}{String}{REGEX\_EDGE}{The regex for an... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.27 \texdocfield + {public static final}{String}{REGEX\_GRAPH\_FILE}{The regex... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.28 \texdocfield + {public static final}{String}{REGEX\_POSITIVE\_INTEGER}{The... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.29 \texdocfield + {public static final}{String}{REGEX\_ROUTE}{The Constant RE... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.30 \texdocfield + {public static final}{String}{REGEX\_SEARCH}{The Constant R... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no G in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.31 \texdocfield + {public static final}{String}{SEPARATOR}{The regex for the ... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no w in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.32 \texdocfield + {public static final}{String}{VERTEX\_DUPLICATE}{The Consta... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no A in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no . in font nullfont! +! Undefined control sequence. +l.33 \texdocfield + {public static final}{String}{VERTEX\_NOT\_FOUND}{The Const... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no V in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no E in font nullfont! +Missing character: There is no X in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no O in font nullfont! +Missing character: There is no U in font nullfont! +Missing character: There is no N in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassfields}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.34 \end{texdocclassfields} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclass}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.35 \end{texdocclass} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +Overfull \hbox (20.0pt too wide) in paragraph at lines 4--36 +[] + [] + + +! LaTeX Error: Environment texdocclass undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.38 \begin{texdocclass} + {class}{FileInputHelper} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.38 \begin{texdocclass}{c + lass}{FileInputHelper} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no F in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no H in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! + +! LaTeX Error: Environment texdocclassintro undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.40 \begin{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no H in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassintro}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.41 ... reading text files.\end{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocclassmethods undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.42 \begin{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.43 \texdocmethod + {public static}{String}{read}{(String file)}{Reads the spe... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no ( in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no ) in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no , in font nullfont! +Missing character: There is no w in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no ' in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no , in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no , in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocparameters undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.45 ...line, and so on.}{\begin{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.46 \texdocparameter + {file}{the file to be read} +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocparameters}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.47 \end{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.48 \texdocreturn + {the content of the file} +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassmethods}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.50 \end{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclass}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.51 \end{texdocclass} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +Overfull \hbox (20.0pt too wide) in paragraph at lines 38--52 +[] + [] + + +! LaTeX Error: Environment texdocclass undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.54 \begin{texdocclass} + {class}{Main} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.54 \begin{texdocclass}{c + lass}{Main} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! + +! LaTeX Error: Environment texdocclassintro undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.56 \begin{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no M in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassintro}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.57 The Class Main.\end{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocclassmethods undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.58 \begin{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.59 \texdocmethod + {public static}{void}{main}{(String args)}{The main method... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no ( in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no ) in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocparameters undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.59 ...The main method.}{\begin{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.60 \texdocparameter + {args}{the arguments} +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no s in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocparameters}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.61 \end{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclassmethods}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.63 \end{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclass}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.64 \end{texdocclass} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +Overfull \hbox (20.0pt too wide) in paragraph at lines 54--65 +[] + [] + + +! LaTeX Error: Environment texdocclass undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.67 \begin{texdocclass} + {class}{Terminal} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.67 \begin{texdocclass}{c + lass}{Terminal} +You're in trouble here. Try typing to proceed. +If that doesn't work, type X to quit. + +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! + +! LaTeX Error: Environment texdocclassintro undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.69 \begin{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 70. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 70. +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocp undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.72 \begin{texdocp} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no N in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no , in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no k in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no I in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no y in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no . in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocp}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.75 ...em.in in the same assignment.\end{texdocp} + \end{texdocclassintro} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclassintro}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.75 ...gnment.\end{texdocp}\end{texdocclassintro} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocclassmethods undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.76 \begin{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.77 \texdocmethod + {public static}{void}{printLine}{(String out)}{Print a Str... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no v in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no ( in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no ) in font nullfont! +Missing character: There is no P in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocp undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.78 \begin{texdocp} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocp}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.79 ... String out must not be null.\end{texdocp} + }{\begin{texdocparameters} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: Environment texdocparameters undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.79 ...ll.\end{texdocp}}{\begin{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.80 \texdocparameter + {out}{The string to be printed.} +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no o in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocparameters}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.81 \end{texdocparameters} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.83 \texdocmethod + {public static}{String}{readLine}{()}{Reads a line from st... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no b in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no S in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no g in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no L in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no ( in font nullfont! +Missing character: There is no ) in font nullfont! +Missing character: There is no R in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocp undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.84 \begin{texdocp} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no R in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: Environment texdocp undefined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.86 \begin{texdocp} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +Missing character: There is no U in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no C in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no + in font nullfont! +Missing character: There is no D in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no c in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocp}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.87 ...he end of the standard input.\end{texdocp} + \end{texdocp}}{\texdocretu... + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocp}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.87 ... standard input.\end{texdocp}\end{texdocp} + }{\texdocreturn{The next l... + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Undefined control sequence. +l.87 ....\end{texdocp}\end{texdocp}}{\texdocreturn + {The next line from the st... +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +Missing character: There is no T in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no x in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no f in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no m in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no h in font nullfont! +Missing character: There is no e in font nullfont! +Missing character: There is no s in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no a in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no d in font nullfont! +Missing character: There is no i in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no p in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no t in font nullfont! +Missing character: There is no o in font nullfont! +Missing character: There is no r in font nullfont! +Missing character: There is no n in font nullfont! +Missing character: There is no u in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no l in font nullfont! +Missing character: There is no . in font nullfont! + +! LaTeX Error: \begin{document} ended by \end{texdocclassmethods}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.89 \end{texdocclassmethods} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: \begin{document} ended by \end{texdocclass}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.90 \end{texdocclass} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +Overfull \hbox (20.0pt too wide) in paragraph at lines 67--91 +[] + [] + + +Overfull \hbox (5.00002pt too wide) in paragraph at lines 67--91 +$\OML/cmm/m/it/10 =$ + [] + + +! LaTeX Error: \begin{document} ended by \end{texdocpackage}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.93 \end{texdocpackage} + +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +) +! Emergency stop. +<*> docs.tex + +*** (job aborted, no legal \end found) + + +Here is how much of TeX's memory you used: + 23 strings out of 493698 + 332 string characters out of 3144409 + 55149 words of memory out of 3000000 + 3449 multiletter control sequences out of 15000+200000 + 3640 words of font info for 14 fonts, out of 3000000 for 9000 + 1025 hyphenation exceptions out of 8191 + 18i,1n,12p,165b,70s stack positions out of 5000i,500n,10000p,200000b,50000s +! ==> Fatal error occurred, no output PDF file produced! diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/docs.tex b/Uni/Java/WS1516/Programmieren/Final01/src/docs.tex new file mode 100644 index 0000000..18717f8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/docs.tex @@ -0,0 +1,96 @@ +\begin{texdocpackage}{edu.kit.informatik} +\label{texdoclet:edu.kit.informatik} + +\begin{texdocclass}{class}{Constant} +\label{texdoclet:edu.kit.informatik.Constant} +\begin{texdocclassintro} +All constants used in the program\end{texdocclassintro} +\begin{texdocclassfields} +\texdocfield{public static final}{String}{CODE\_NOT\_ACCESSIBLE}{The Constant CODE\_NOT\_ACCESSIBLE.} +\texdocfield{public static final}{String}{COMMAND\_NOT\_FOUND}{The Constant COMMAND\_NOT\_FOUND.} +\texdocfield{public static final}{String}{COMMAND\_SUCCESSFUL}{The Constant COMMAND\_SUCCESSFUL.} +\texdocfield{public static final}{String}{EDGE\_CANNOT\_REMOVE}{The Constant EDGE\_CANNOT\_REMOVE.} +\texdocfield{public static final}{String}{EDGE\_CONTAINED\_ALLREADY}{The Constant EDGE\_CONTAINED\_ALLREADY.} +\texdocfield{public static final}{String}{EDGE\_VERTEX\_NOT\_FOUND}{The Constant EDGE\_VERTEX\_NOT\_FOUND.} +\texdocfield{public static final}{String}{FILE\_WRONG\_FORMAT}{The Constant FILE\_WRONG\_FORMAT.} +\texdocfield{public static final}{String}{GRAPH\_EDGE\_LESS\_THAN\_ONE}{The Constant GRAPH\_EDGE\_LESS\_THAN\_ONE.} +\texdocfield{public static final}{String}{GRAPH\_NOT\_CONTINOUS}{The Constant GRAPH\_NOT\_CONTINOUS.} +\texdocfield{public static final}{String}{GRAPH\_VERTEX\_LESS\_THAN\_TWO}{The Constant GRAPH\_VERTEX\_LESS\_THAN\_TWO.} +\texdocfield{public static final}{String}{NUMBER\_FORMAT\_ILLEGAL}{The Constant NUMBER\_FORMAT\_ILLEGAL.} +\texdocfield{public static final}{String}{PREFIX\_ERROR}{The Constant PREFIX\_ERROR.} +\texdocfield{public static final}{String}{REGEX\_CITY\_NAME}{The regex for a city name.} +\texdocfield{public static final}{String}{REGEX\_CRITERION\_ALL}{The Constant REGEX\_CRITERION\_ALL.} +\texdocfield{public static final}{String}{REGEX\_CRITERION\_BOTH}{The Constant REGEX\_CRITERION\_BOTH.} +\texdocfield{public static final}{String}{REGEX\_CRITERION\_DISTANCE}{The Constant REGEX\_CRITERION\_DISTANCE.} +\texdocfield{public static final}{String}{REGEX\_CRITERION\_TIME}{The Constant REGEX\_CRITERION\_TIME.} +\texdocfield{public static final}{String}{REGEX\_EDGE}{The regex for an edge.} +\texdocfield{public static final}{String}{REGEX\_GRAPH\_FILE}{The regex for a file that contains a graph.} +\texdocfield{public static final}{String}{REGEX\_POSITIVE\_INTEGER}{The regex for a positive integer.} +\texdocfield{public static final}{String}{REGEX\_ROUTE}{The Constant REGEX\_ROUTE.} +\texdocfield{public static final}{String}{REGEX\_SEARCH}{The Constant REGEX\_SEARCH.} +\texdocfield{public static final}{String}{SEPARATOR}{The regex for the SEPARATOR of the two parts in the file.} +\texdocfield{public static final}{String}{VERTEX\_DUPLICATE}{The Constant VERTEX\_DUPLICATE.} +\texdocfield{public static final}{String}{VERTEX\_NOT\_FOUND}{The Constant VERTEX\_NOT\_FOUND.} +\end{texdocclassfields} +\end{texdocclass} + + +\begin{texdocclass}{class}{FileInputHelper} +\label{texdoclet:edu.kit.informatik.FileInputHelper} +\begin{texdocclassintro} +Helper class for reading text files.\end{texdocclassintro} +\begin{texdocclassmethods} +\texdocmethod{public static}{String}{read}{(String file)}{Reads the specified file and returns its content as a String array, where + the first array field contains the file's first line, the second field + contains the second line, and so on.}{\begin{texdocparameters} +\texdocparameter{file}{the file to be read} +\end{texdocparameters} +\texdocreturn{the content of the file} +} +\end{texdocclassmethods} +\end{texdocclass} + + +\begin{texdocclass}{class}{Main} +\label{texdoclet:edu.kit.informatik.Main} +\begin{texdocclassintro} +The Class Main.\end{texdocclassintro} +\begin{texdocclassmethods} +\texdocmethod{public static}{void}{main}{(String args)}{The main method.}{\begin{texdocparameters} +\texdocparameter{args}{the arguments} +\end{texdocparameters} +} +\end{texdocclassmethods} +\end{texdocclass} + + +\begin{texdocclass}{class}{Terminal} +\label{texdoclet:edu.kit.informatik.Terminal} +\begin{texdocclassintro} +This class provides some simple methods for input$/$output from and to a + terminal. + \begin{texdocp} + Never modify this class, never upload it to Praktomat. This is only for your + local use. If an assignment tells you to use this class for input and output + never use System.out or System.in in the same assignment.\end{texdocp}\end{texdocclassintro} +\begin{texdocclassmethods} +\texdocmethod{public static}{void}{printLine}{(String out)}{Print a String to the standard output. + \begin{texdocp} + The String out must not be null.\end{texdocp}}{\begin{texdocparameters} +\texdocparameter{out}{The string to be printed.} +\end{texdocparameters} +} +\texdocmethod{public static}{String}{readLine}{()}{Reads a line from standard input. + \begin{texdocp} + Returns null at the end of the standard input. + \begin{texdocp} + Use Ctrl+D to indicate the end of the standard input.\end{texdocp}\end{texdocp}}{\texdocreturn{The next line from the standard input or null.} +} +\end{texdocclassmethods} +\end{texdocclass} + + +\end{texdocpackage} + + + diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/Constant.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/Constant.java new file mode 100644 index 0000000..02a210c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/Constant.java @@ -0,0 +1,127 @@ +package edu.kit.informatik; + +/** + * All constants used in the program + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Constant { + + /** + * The regex for a positive integer. + */ + public static final String REGEX_POSITIVE_INTEGER = "([+]?[0-9]*[1-9][0-9]*)"; + /** + * The regex for a city name. + */ + public static final String REGEX_CITY_NAME = "([A-Za-z-]+)"; + /** + * The regex for the SEPARATOR of the two parts in the file. + */ + public static final String SEPARATOR = "--"; + /** + * The regex for an edge. + */ + public static final String REGEX_EDGE = REGEX_CITY_NAME + ";" + REGEX_CITY_NAME + ";" + + REGEX_POSITIVE_INTEGER + ";" + REGEX_POSITIVE_INTEGER; + /** + * The regex for a file that contains a graph. + */ + public static final String REGEX_GRAPH_FILE = "(" + REGEX_CITY_NAME + "\\n){2,}" + + SEPARATOR + "(\\n" + REGEX_EDGE + "){1,}"; + + /** + * The Constant REGEX_CRITERION_TIME. + */ + public static final String REGEX_CRITERION_TIME = "time"; + /** + * The Constant REGEX_CRITERION_DISTANCE. + */ + public static final String REGEX_CRITERION_DISTANCE = "route"; + /** + * The Constant REGEX_CRITERION_BOTH. + */ + public static final String REGEX_CRITERION_BOTH = "optimal"; + /** + * The Constant REGEX_CRITERION_ALL. + */ + public static final String REGEX_CRITERION_ALL = "all"; + /** + * The Constant REGEX_SEARCH. + */ + public static final String REGEX_SEARCH = "((" + REGEX_CRITERION_TIME + ")|(" + REGEX_CRITERION_DISTANCE + ")|(" + + REGEX_CRITERION_BOTH + "))"; + /** + * The Constant REGEX_ROUTE. + */ + public static final String REGEX_ROUTE = "(" + REGEX_SEARCH + "|" + REGEX_CRITERION_ALL + ")"; + + ///////////////////////// ////Error Messages///// /////////////////////// + + /** + * The Constant VERTEX_DUPLICATE. + */ + public static final String VERTEX_DUPLICATE = "duplicate vertex found"; + /** + * The Constant VERTEX_NOT_FOUND. + */ + public static final String VERTEX_NOT_FOUND = "vertex not found"; + /** + * The Constant EDGE_VERTEX_NOT_FOUND. + */ + public static final String EDGE_VERTEX_NOT_FOUND = "edge contains vertices that " + "have not been initilized"; + /** + * The Constant EDGE_CANNOT_REMOVE. + */ + public static final String EDGE_CANNOT_REMOVE = "edge can't be removed"; + /** + * The Constant EDGE_CONTAINED_ALLREADY. + */ + public static final String EDGE_CONTAINED_ALLREADY = "edge is allready contained"; + + /** + * The Constant NUMBER_FORMAT_ILLEGAL. + */ + public static final String NUMBER_FORMAT_ILLEGAL = "not a number (format may be wrong or number might be to big)"; + + /** + * The Constant FILE_WRONG_FORMAT. + */ + public static final String FILE_WRONG_FORMAT = "not formated correctly"; + + /** + * The Constant GRAPH_NOT_CONTINOUS. + */ + public static final String GRAPH_NOT_CONTINOUS = "graph is not continous"; + /** + * The Constant GRAPH_EDGE_LESS_THAN_ONE. + */ + public static final String GRAPH_EDGE_LESS_THAN_ONE = "contains less than one edge"; + /** + * The Constant GRAPH_VERTEX_LESS_THAN_TWO. + */ + public static final String GRAPH_VERTEX_LESS_THAN_TWO = "contains less than two vertices"; + + /** + * The Constant PREFIX_ERROR. + */ + public static final String PREFIX_ERROR = "Error,"; + + /** + * The Constant COMMAND_SUCCESSFUL. + */ + public static final String COMMAND_SUCCESSFUL = "OK"; + /** + * The Constant COMMAND_NOT_FOUND. + */ + public static final String COMMAND_NOT_FOUND = "please use a valid command"; + + /** + * The Constant CODE_NOT_ACCESSIBLE. + */ + public static final String CODE_NOT_ACCESSIBLE = "this code is not possible to run therefore you must be god"; + + private Constant() { + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/FileInputHelper.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/FileInputHelper.java new file mode 100644 index 0000000..6343ace --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/FileInputHelper.java @@ -0,0 +1,68 @@ +package edu.kit.informatik; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; + +/** + * Helper class for reading text files. + * + * @author IPD Reussner, KIT + * @author ITI Sinz, KIT + * @version 1.1 + */ +public final class FileInputHelper { + + /** + * Private constructor to avoid instantiation. + */ + private FileInputHelper() { + // intentionally left blank + } + + /** + * Reads the specified file and returns its content as a String array, where + * the first array field contains the file's first line, the second field + * contains the second line, and so on. + * + * @param file + * the file to be read + * @return the content of the file + */ + public static String read(final String file) { + final StringBuilder result = new StringBuilder(); + + FileReader in = null; + try { + in = new FileReader(file); + } catch (final FileNotFoundException e) { + Terminal.printLine("Error, " + e.getMessage()); + System.exit(1); + } + + final BufferedReader reader = new BufferedReader(in); + try { + String line = reader.readLine(); + while (line != null) { + result.append(line); + line = reader.readLine(); + if (line != null) { + result.append("\n"); + } + } + } catch (final IOException e) { + Terminal.printLine("Error, " + e.getMessage()); + System.exit(1); + } finally { + try { + reader.close(); + } catch (final IOException e) { + // no need for handling this exception + } + } + + return result.toString(); + } + +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..b94df55 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/Main.java @@ -0,0 +1,39 @@ +package edu.kit.informatik; + +import edu.kit.informatik.exception.InvalidFileFormatException; +import edu.kit.informatik.graph.fileinput.GraphBuilder; +import edu.kit.informatik.terminalinput.InputManager; + +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + private Main() { + } + + /** + * The main method. + * + * @param args + * the arguments + */ + public static void main(final String[] args) { + if (args.length != 1) { + InputManager.error("program has to be started with one parameter (filePath)"); + System.exit(1); + } + final InputManager inputManager; + try { + inputManager = new InputManager(GraphBuilder.fileToGraph(args[0])); + inputManager.run(); + } catch (final InvalidFileFormatException e) { + InputManager.error(e.getMessage()); + System.exit(1); + } + + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/Terminal.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/Terminal.java new file mode 100644 index 0000000..c3612c8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/Terminal.java @@ -0,0 +1,70 @@ +package edu.kit.informatik; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * This class provides some simple methods for input/output from and to a + * terminal. + *

+ * Never modify this class, never upload it to Praktomat. This is only for your + * local use. If an assignment tells you to use this class for input and output + * never use System.out or System.in in the same assignment. + * + * @author ITI, VeriAlg Group + * @author IPD, SDQ Group + * @version 4 + */ +public final class Terminal { + + /** + * BufferedReader for reading from standard input line-by-line. + */ + /* + * private static BufferedReader in = new BufferedReader(new + * InputStreamReader(System.in)); + */ + + /** + * Private constructor to avoid object generation. + */ + private Terminal() { + } + + /** + * Print a String to the standard output. + *

+ * The String out must not be null. + * + * @param out + * The string to be printed. + */ + public static void printLine(final String out) { + System.out.println(out); + } + + /** + * Reads a line from standard input. + *

+ * Returns null at the end of the standard input. + *

+ * Use Ctrl+D to indicate the end of the standard input. + * + * @return The next line from the standard input or null. + */ + public static String readLine() { + try { + final BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + return in.readLine(); + } catch (final IOException e) { + /* + * rethrow unchecked (!) exception to prevent students from being + * forced to use Exceptions before they have been introduced in the + * lecture. + */ + throw new RuntimeException(e); + } + } + +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/exception/IllegalObjectException.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/exception/IllegalObjectException.java new file mode 100644 index 0000000..edbad0e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/exception/IllegalObjectException.java @@ -0,0 +1,19 @@ +package edu.kit.informatik.exception; + +/** + * The Class IllegalObjectException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class IllegalObjectException extends Exception { + /** + * Instantiates a new illegal object exception. + * + * @param message + * the message + */ + public IllegalObjectException(final String message) { + super(message); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/exception/InvalidFileFormatException.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/exception/InvalidFileFormatException.java new file mode 100644 index 0000000..9c1df77 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/exception/InvalidFileFormatException.java @@ -0,0 +1,28 @@ +package edu.kit.informatik.exception; + +/** + * The Class InvalidFileFormatException. It Indicates that the file format is + * not supported. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class InvalidFileFormatException extends Exception { + + /** + * File format exception. + */ + public InvalidFileFormatException() { + super(); + } + + /** + * Instantiates a new invalid file format exception. + * + * @param message + * the message + */ + public InvalidFileFormatException(final String message) { + super(message); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/Edge.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/Edge.java new file mode 100644 index 0000000..d453271 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/Edge.java @@ -0,0 +1,159 @@ +package edu.kit.informatik.graph; + +/** + * The Class Edge. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Edge implements Comparable { + + /** The distance in kilometers. */ + private final int distance; + + /** The time in minutes. */ + private final int time; + + /** The first. */ + private final Vertex first; + + /** The second. */ + private final Vertex second; + + /** + * Instantiates a new edge. + * + * @param v + * the first vertex the edge should be connecting + * @param w + * the second vertex the edge should be connecting + * @param distance + * the distance + * @param time + * the time + */ + public Edge(final Vertex v, final Vertex w, final int distance, final int time) { + this.first = v; + this.second = w; + this.distance = distance; + this.time = time; + } + + /** + * Gets the distance. + * + * @return the distance + */ + public int getDistance() { + return distance; + } + + /** + * Gets the time. + * + * @return the time + */ + public int getTime() { + return time; + } + + /** + * Checks if two objects are the same. + * + * @param obj + * the object this should be compared against + * @return true, if obj is edge that contains the same vertices (ignores + * time and distance) + */ + @Override + public boolean equals(final Object obj) { + if (obj != null && obj.getClass().equals(Edge.class)) { + if (((Edge) obj).getFirst().equals(this.first) && ((Edge) obj).getSecond().equals(this.second)) { + return true; + } else if (((Edge) obj).getFirst().equals(this.second) && ((Edge) obj).getSecond().equals(this.first)) { + return true; + } + } + return false; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return first.toString() + ";" + second.toString() + ";" + distance + ";" + time; + } + + /** + * Checks if edge contains vertex. + * + * @param v + * the v + * @return true, if successful + */ + public boolean containsVertex(final Vertex v) { + return (v.equals(first) || v.equals(second)); + } + + /** + * Gets the other vertex of the edge. Return null if v is not contained. + * + * @param v + * the v + * @return the other vertex + */ + public Vertex getOtherVertex(final Vertex v) { + if (v.equals(first)) { + return second; + } else if (v.equals(second)) { + return first; + } else { + return null; + } + } + + /** + * Gets the first. + * + * @return the first + */ + public Vertex getFirst() { + return first; + } + + /** + * Gets the second. + * + * @return the second + */ + public Vertex getSecond() { + return second; + } + + /** + * Builds a sorted string which consist of first.toString and + * second.toString. The string that is smaller (in terms of compareTo) will + * ne placed at the beginning. + * + * @return the string + */ + private String buildSortedString() { + if (first.compareTo(second) < 0) { + return first.toString() + second.toString(); + } else { + return second.toString() + first.toString(); + } + } + + @Override + public int compareTo(final Edge o) { + if (this.equals(o)) { + return 0; + } + return buildSortedString().compareTo(o.buildSortedString()); + + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/Graph.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/Graph.java new file mode 100644 index 0000000..a09fff3 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/Graph.java @@ -0,0 +1,251 @@ +package edu.kit.informatik.graph; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedList; +import java.util.List; +import java.util.Stack; +import java.util.TreeSet; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.exception.IllegalObjectException; + +/** + * The Class Graph. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Graph { + + /** The empty graph continious. */ + public static final boolean EMPTY_GRAPH_CONTINIOUS = true; + + /** The vertices. */ + private final List edges; + + /** + * Instantiates a new graph. + */ + public Graph() { + edges = new ArrayList<>(); + } + + /** + * Adds an edge to the graph but does not allow duplicates. + * + * @param edge + * the edge + * @throws IllegalObjectException + * the illegal object exception + */ + public void addEdge(final Edge edge) throws IllegalObjectException { + if (edge.getFirst().equals(edge.getSecond())) { + throw new IllegalObjectException(Constant.VERTEX_DUPLICATE); + } + if (edges.contains(edge)) { + throw new IllegalObjectException(Constant.EDGE_CONTAINED_ALLREADY); + } + edges.add(edge); + } + + /** + * Checks if graph contains a vertex + * + * @param v + * the v + * @return true, if successful + */ + public boolean contains(final Vertex v) { + for (final Edge edge : edges) { + if (edge.containsVertex(v)) { + return true; + } + } + return false; + } + + /** + * Adds the all edge to the graph but does not allow duplicates. Requires at + * lest one vertex of each edge to be part of the graph. + * + * @param collection + * the collection + * @throws IllegalObjectException + * the illegal object exception + */ + public void addAllEdges(final Collection collection) throws IllegalObjectException { + for (final Edge edge : collection) { + addEdge(edge); + } + } + + /** + * Checks if graph is continous. + * + * @return true, if graph is continous + */ + public boolean isContinous() { + if (edges.size() == 0) { + return EMPTY_GRAPH_CONTINIOUS; + } + final Stack queue = new Stack<>(); + final List notUsedEdges = new ArrayList<>(this.edges); + final List notUsedVertices = new ArrayList<>(getAllVertices()); + queue.add(edges.get(0).getFirst()); + notUsedVertices.remove(notUsedVertices.indexOf(edges.get(0).getFirst())); + + final List used = new ArrayList<>(); + Vertex v = null; + while (notUsedVertices.size() > 0 && !queue.isEmpty()) { + v = queue.pop(); + if (notUsedVertices.contains(v)) { + notUsedVertices.remove(notUsedVertices.indexOf(v)); + } + for (final Edge edge : notUsedEdges) { + final Vertex other = edge.getOtherVertex(v); + if (!used.contains(edge) && other != null) { + queue.push(other); + used.add(edge); + } + } + notUsedEdges.removeAll(used); + } + return (notUsedVertices.size() == 0); + } + + /** + * Checks if graph contains edge; + * + * @param e + * the e + * @return true, if successful + */ + public boolean contains(final Edge e) { + return edges.contains(e); + } + + private Collection getNeightbours(final Vertex v) throws IllegalObjectException { + final Collection tmp = new LinkedList<>(); + for (final Edge edge : edges) { + if (edge.containsVertex(v)) { + tmp.add(edge.getOtherVertex(v)); + } + } + if (tmp.size() == 0) { + throw new IllegalObjectException(Constant.VERTEX_NOT_FOUND); + } + return tmp; + } + + /** + * Gets the reference of the vertex contained in the graph that is equal to + * vertex v but might not have the same reference. + * + * @param v + * the v + * @return the vertex + */ + public Vertex getVertex(final Vertex v) { + for (final Edge edge : edges) { + if (v.equals(edge.getFirst())) { + return edge.getFirst(); + } else if (v.equals(edge.getSecond())) { + return edge.getSecond(); + } + } + return null; + } + + /** + * Gets all neigbouring Vertices and returns them as a string. Each vertex + * is in its own line. + * + * @param v + * the v + * @return the string + * @throws IllegalObjectException + * the illegal object exception + */ + public String neighboursToString(final Vertex v) throws IllegalObjectException { + String ret = ""; + for (final Vertex vertex : getNeightbours(v)) { + ret += vertex.toString() + "\n"; + } + return ret.trim(); + } + + /** + * Removes the edge and if vertex therefore has no adjacent edges it will be + * removed too. + * + * @param edge + * the edge to remove + * @return true, if successful + */ + public boolean removeEdge(final Edge edge) { + if (!edges.contains(edge)) { + return false; + } + // To have the correct reference + final Edge tmp = edges.get(edges.indexOf(edge)); + edges.remove(tmp); + + if (!isContinous()) { + // Undo changes + edges.add(tmp); + return false; + } + return true; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + if (edges.size() == 0) { + return ""; + } + final Collection vertexSet = new TreeSet<>(); + + String firstSection = ""; + final String seperator = "--"; + String secondSection = ""; + for (final Edge edge : edges) { + vertexSet.add(edge.getFirst()); + vertexSet.add(edge.getSecond()); + secondSection += "\n" + edge.toString(); + } + for (final Vertex vertex : vertexSet) { + firstSection += vertex.toString() + "\n"; + } + return (firstSection + seperator + secondSection).trim(); + } + + private List getAllVertices() { + final List list = new ArrayList<>(); + for (final Edge edge : edges) { + final Vertex first = edge.getFirst(); + final Vertex second = edge.getSecond(); + if (!list.contains(first)) { + list.add(first); + } + if (!list.contains(second)) { + list.add(second); + } + } + return list; + } + + /** + * Gets the edges. + * + * @return the edges + */ + public List getEdges() { + return edges; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/Vertex.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/Vertex.java new file mode 100644 index 0000000..809459d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/Vertex.java @@ -0,0 +1,79 @@ +package edu.kit.informatik.graph; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * The Class Vertex. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Vertex implements Comparable { + + /** The identifier of a Vertex. */ + private final String identifier; + + /** + * Instantiates a new vertex. + * + * @param identifier + * the identifier + */ + public Vertex(final String identifier) { + this.identifier = identifier; + } + + /** + * Gets the edges that contain this vertex from a list of edges + * + * @param edges + * the edges + * @return the edges + */ + public Collection getEdges(final Collection edges) { + final Collection col = new ArrayList<>(); + for (final Edge edge : edges) { + if (edge.containsVertex(this)) { + col.add(edge); + } + } + return col; + } + + /** + * Gets the identifier. + * + * @return the identifier + */ + public String getIdentifier() { + return identifier; + } + + /** + * Checks if two objects are the same. + * + * @param obj + * the object this should be compared against + * @return true, if obj is Vertex and if identifiers are the same + */ + @Override + public boolean equals(final Object obj) { + return obj.getClass().equals(Vertex.class) && ((Vertex) obj).identifier.equalsIgnoreCase(this.identifier); + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return identifier; + } + + @Override + public int compareTo(final Vertex o) { + return this.identifier.compareToIgnoreCase(o.identifier); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/fileinput/GraphBuilder.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/fileinput/GraphBuilder.java new file mode 100644 index 0000000..e696148 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/fileinput/GraphBuilder.java @@ -0,0 +1,163 @@ +package edu.kit.informatik.graph.fileinput; + +import java.util.ArrayList; +import java.util.Collection; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.FileInputHelper; +import edu.kit.informatik.exception.IllegalObjectException; +import edu.kit.informatik.exception.InvalidFileFormatException; +import edu.kit.informatik.graph.Edge; +import edu.kit.informatik.graph.Graph; +import edu.kit.informatik.graph.Vertex; + +/** + * The Class GraphBuilder. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class GraphBuilder { + + /** + * Instantiates a new graph builder. + */ + private GraphBuilder() { + } + + /** + * Reads a file and converts it to a graph. + * + * @param filePath + * the file path + * @return the graph + * @throws InvalidFileFormatException + * the invalid file format exception + */ + public static Graph fileToGraph(final String filePath) throws InvalidFileFormatException { + final String content = FileInputHelper.read(filePath); + if (!content.matches(Constant.REGEX_GRAPH_FILE)) { + exceptionInvalidFileFormat(Constant.FILE_WRONG_FORMAT); + } + final int sep = content.lastIndexOf("\n" + Constant.SEPARATOR + "\n"); + final String firstPart = content.substring(0, sep); + // +2 to remove \n + final String secondPart = content.substring(sep + Constant.SEPARATOR.length() + 2); + + final Collection vertices = firstPartToVertices(firstPart); + final Collection edges = secondPartToEdges(secondPart, vertices); + + for (final Vertex vertex : vertices) { + boolean hasEdge = false; + for (final Edge edge : edges) { + if (edge.containsVertex(vertex)) { + hasEdge = true; + } + } + if (!hasEdge) { + exceptionInvalidFileFormat(Constant.GRAPH_NOT_CONTINOUS); + } + } + + final Graph graph = new Graph(); + for (final Edge edge : edges) { + if (!(vertices.contains(edge.getFirst()) && vertices.contains(edge.getSecond()))) { + exceptionInvalidFileFormat(Constant.EDGE_VERTEX_NOT_FOUND); + } + } + try { + graph.addAllEdges(edges); + } catch (final IllegalObjectException e) { + exceptionInvalidFileFormat(e.getMessage()); + } + + if (!graph.isContinous()) { + exceptionInvalidFileFormat(Constant.GRAPH_NOT_CONTINOUS); + } + + return graph; + } + + /** + * Converts the first part of the file to vertices. + * + * @param firstFilePart + * the first part of the file + * @return the collection of vertices + * @throws InvalidFileFormatException + * the invalid file format exception + */ + private static Collection firstPartToVertices(final String firstFilePart) + throws InvalidFileFormatException { + final String[] lines = firstFilePart.split("\n"); + final Collection vertices = new ArrayList<>(); + + for (final String str : lines) { + final Vertex v = new Vertex(str); + if (vertices.contains(v)) { + exceptionInvalidFileFormat(Constant.VERTEX_DUPLICATE); + } else { + vertices.add(v); + } + } + + if (vertices.size() < 2) { + exceptionInvalidFileFormat(Constant.GRAPH_VERTEX_LESS_THAN_TWO); + } + return vertices; + } + + /** + * Converts the second part of the file to edges. + * + * @param secondFilePart + * the second part of the file + * @param vertices + * the vertices + * @return the collection + * @throws InvalidFileFormatException + * the invalid file format exception + */ + private static Collection secondPartToEdges(final String secondFilePart, final Collection vertices) + throws InvalidFileFormatException { + final Collection edges = new ArrayList<>(); + final String[] lines = secondFilePart.split("\n"); + + for (final String str : lines) { + final String[] param = str.split(";"); + // Convert String to Vertices and int + final Vertex v = new Vertex(param[0]); + final Vertex w = new Vertex(param[1]); + int distance = -1; + int time = -1; + try { + distance = Integer.parseInt(param[2]); + time = Integer.parseInt(param[3]); + if (time <= 0 || distance <= 0) { + throw new InvalidFileFormatException(); + } + } catch (final NumberFormatException e) { + exceptionInvalidFileFormat(Constant.NUMBER_FORMAT_ILLEGAL); + } + + if (!(vertices.contains(v) || vertices.contains(w))) { + exceptionInvalidFileFormat(Constant.EDGE_VERTEX_NOT_FOUND); + } + + final Edge e = new Edge(v, w, distance, time); + if (edges.contains(e)) { + exceptionInvalidFileFormat(Constant.VERTEX_DUPLICATE); + } + edges.add(e); + } + + if (edges.size() < 1) { + exceptionInvalidFileFormat(Constant.GRAPH_EDGE_LESS_THAN_ONE); + } + return edges; + } + + private static void exceptionInvalidFileFormat(final String message) throws InvalidFileFormatException { + throw new InvalidFileFormatException("while reading file: " + message); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/GraphPathFinder.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/GraphPathFinder.java new file mode 100644 index 0000000..71336e0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/GraphPathFinder.java @@ -0,0 +1,217 @@ +/* + * @author Hannes Kuchelmeister + * + * @version 1.0 + */ +package edu.kit.informatik.graph.pathfinding; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedList; +import java.util.List; + +import edu.kit.informatik.graph.Edge; +import edu.kit.informatik.graph.Vertex; + +/** + * The Class GraphPathFinder will find a path between two nodes in a graph + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class GraphPathFinder { + + /** The graph. */ + private final List graph; + + /** + * Instantiates a new graph path finder. + * + * @param edges + * all edges of a graph + */ + public GraphPathFinder(final List edges) { + graph = edges; + } + + /** + * Gets the path with Dijkstra algorithm. + * + * @param start + * the start vertex + * @param destination + * the destination vertex + * @param comparator + * the comparator which compares vertices + * @return the path + */ + public PathVertex getPathReversedDijkstra(final Vertex start, final Vertex destination, + final PathVertexComparator comparator) { + final PathVertex s = new PathVertex(start); + + // Intialize Get a list of all vertices + final List vertices = new ArrayList<>(); + final List toVisit = new LinkedList<>(); + //foreach edge add all vertices to toVisit, vertices and set they score to -1 which resembles infinity + for (final Edge edge : graph) { + + final PathVertex first = new PathVertex(edge.getFirst()); + if (!first.equals(s)) { + comparator.setScore(first, -1); + } + if (!vertices.contains(first)) { + vertices.add(first); + } + if (!toVisit.contains(first)) { + toVisit.add(first); + } + + final PathVertex second = new PathVertex(edge.getSecond()); + if (!second.equals(s)) { + comparator.setScore(second, -1); + } + if (!vertices.contains(second)) { + vertices.add(second); + } + if (!toVisit.contains(second)) { + toVisit.add(second); + } + } + // Real magic happens here (pathfinding) + while (toVisit.size() > 1) { + toVisit.sort(comparator); + PathVertex v = toVisit.get(0); + + toVisit.remove(toVisit.indexOf(v)); + for (final PathVertex u : v.getNeighbours(vertices, graph)) { + if (toVisit.contains(u)) { + // Get connecting edge + final int index = graph.indexOf(new Edge(v.getData(), u.getData(), 10, 10)); + if (index >= 0) { + final Edge e = graph.get(index); + // new Distance + final int dist = comparator.getScore(v) + comparator.getEdgeScore(e); + if (dist < comparator.getScore(u) || comparator.getScore(u) == -1) { + comparator.setScore(u, dist); + u.setPrevious(v); + } + } + } + } + } + return vertices.get(vertices.indexOf(new PathVertex(destination))); + } + + /** + * Gets all paths. + * + * @param vertex + * the vertex + * @param searchFor + * the search for + * @return the all paths + */ + public Collection getAllPaths(final Vertex vertex, final Vertex searchFor) { + return depthFirstSearch(vertex, searchFor, new ArrayList<>()); + } + + /** + * Gets the path depth first search. + * + * @param vertex + * the vertex + * @param searchFor + * the search for + * @return the best path (pathScore calculated by distance*distance + + * time*time) + */ + public PathVertex getPathDepthFirstSearch(final Vertex vertex, final Vertex searchFor) { + final Collection pathVertices = depthFirstSearch(vertex, searchFor, new ArrayList<>()); + + // find best path + PathVertex path = null; + for (final PathVertex v : pathVertices) { + if (path == null || path.getOptimalScore() > v.getOptimalScore()) { + path = v; + } + } + return path; + } + + /** + * recursive search for paths from vertex to + * searchFor + * + * @param vertex + * the vertex + * @param searchFor + * the search for + * @param lookedAt + * the looked at + * @return the collection + */ + private Collection depthFirstSearch(final Vertex vertex, final Vertex searchFor, + final ArrayList lookedAt) { + // Abbort conditions + if (vertex.equals(searchFor)) { + final PathVertex tmp = new PathVertex(vertex); + final Collection collection = new ArrayList<>(); + collection.add(tmp); + return collection; + } + if (lookedAt.contains(vertex)) { + return null; + } + lookedAt.add(vertex); + + final Collection neighbours = vertex.getEdges(graph); + + final PathVertex path = new PathVertex(vertex); + final Collection retPathCollection = new ArrayList<>(); + + path.setDistance(0); + path.setTime(0); + for (final Edge edge : neighbours) { + // recursive search for all paths + final Collection tmpPathCollection = depthFirstSearch(edge.getOtherVertex(vertex), searchFor, + /*(ArrayList) lookedAt.clone()*/ new ArrayList<>(lookedAt)); + // connect vertex to all found paths + if (tmpPathCollection != null) { + for (final PathVertex pathVertex : tmpPathCollection) { + if (pathVertex != null) { + PathVertex tmpPath; + tmpPath = (path.clone()); + if (tmpPath != null) { + tmpPath.setPrevious(pathVertex); + // calc new pathscore + tmpPath.setDistance(pathVertex.getDistance() + edgeDistance(pathVertex.getData(), vertex)); + tmpPath.setTime(pathVertex.getTime() + edgeTime(pathVertex.getData(), vertex)); + retPathCollection.add(tmpPath); + } + } + } + } + } + + return retPathCollection; + + } + + private int edgeDistance(final Vertex v, final Vertex w) { + for (final Edge edge : graph) { + if (edge.containsVertex(v) && edge.containsVertex(w)) { + return edge.getDistance(); + } + } + return 0; + } + + private int edgeTime(final Vertex v, final Vertex w) { + for (final Edge edge : graph) { + if (edge.containsVertex(v) && edge.containsVertex(w)) { + return edge.getTime(); + } + } + return 0; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertex.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertex.java new file mode 100644 index 0000000..9205a0c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertex.java @@ -0,0 +1,169 @@ +package edu.kit.informatik.graph.pathfinding; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import edu.kit.informatik.graph.Edge; +import edu.kit.informatik.graph.Vertex; + +/** + * The Class PathVertex. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class PathVertex { + + /** The data. */ + private final Vertex data; + + /** The previous. */ + private PathVertex previous; + + private int time; + private int distance; + + /** + * Instantiates a new path vertex. + * + * @param v + * the v + */ + public PathVertex(final Vertex v) { + time = 0; + distance = 0; + data = v; + previous = null; + } + + /** + * Sets the previous. + * + * @param previous + * the new previous + */ + public void setPrevious(final PathVertex previous) { + this.previous = previous; + } + + /** + * Gets the previous. + * + * @return the previous + */ + public PathVertex getPrevious() { + return previous; + } + + /** + * Gets the data. + * + * @return the data + */ + public Vertex getData() { + return data; + } + + /** + * Gets the neighbours of a pathVertex + * + * @param vertices + * the vertices + * @param edges + * the edges + * @return the neighbours + */ + public Collection getNeighbours(final List vertices, final Collection edges) { + final Collection neighbours = new ArrayList<>(); + for (final Edge edge : edges) { + for (final PathVertex vertex : vertices) { + if (edge.containsVertex(vertex.data) && !neighbours.contains(vertex)) { + neighbours.add(vertex); + } + } + } + return neighbours; + } + + /** + * Gets the distance. + * + * @return the distance + */ + public int getDistance() { + return distance; + } + + /** + * Gets the time. + * + * @return the time + */ + public int getTime() { + return time; + } + + /** + * Gets the optimal score. + * + * @return the optimal score + */ + public int getOptimalScore() { + return (distance * distance) + (time * time); + } + + /** + * Sets the distance. + * + * @param distance + * the new distance + */ + public void setDistance(final int distance) { + this.distance = distance; + } + + /** + * Sets the time. + * + * @param time + * the new time + */ + public void setTime(final int time) { + this.time = time; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + String str = data.toString(); + if (previous != null) { + str += " " + previous.toString(); + } + + return str; + } + + @Override + public boolean equals(final Object obj) { + if (!obj.getClass().equals(this.getClass())) { + return false; + } else { + return data.equals(((PathVertex) obj).data); + } + } + + @Override + protected PathVertex clone() { + final PathVertex tmpPathVertex = new PathVertex(data); + tmpPathVertex.setPrevious(this.previous); + tmpPathVertex.setDistance(this.distance); + tmpPathVertex.setTime(this.time); + return tmpPathVertex; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertexComparator.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertexComparator.java new file mode 100644 index 0000000..0409bde --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertexComparator.java @@ -0,0 +1,46 @@ +package edu.kit.informatik.graph.pathfinding; + +import java.util.Comparator; + +import edu.kit.informatik.graph.Edge; + +/** + * The Class VertexComparator. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public abstract class PathVertexComparator implements Comparator { + @Override + public abstract int compare(final PathVertex first, final PathVertex second); + + /** + * Gets the score of a pathVertex + * + * @param v + * the v + * @return the score + */ + public abstract int getScore(PathVertex v); + + /** + * Sets the score of a path vertex. + * + * @param v + * the path vertex + * @param score + * the score + */ + public abstract void setScore(PathVertex v, int score); + + /** + * Gets the score of an edge, what the score actually means might differ in + * subclasses. + * + * @param e + * the e + * @return the edge score + */ + public abstract int getEdgeScore(Edge e); + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertexDistanceComparator.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertexDistanceComparator.java new file mode 100644 index 0000000..2907f5a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertexDistanceComparator.java @@ -0,0 +1,55 @@ +package edu.kit.informatik.graph.pathfinding; + +import edu.kit.informatik.graph.Edge; + +/** + * The Class PathVertexDistanceComparator. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class PathVertexDistanceComparator extends PathVertexComparator { + + /** + * Instantiates a new path vertex distance comparator. + */ + public PathVertexDistanceComparator() { + } + + /** + * Gets the edge score. + * + * @param e + * the e + * @return the edge score + */ + @Override + public int getEdgeScore(final Edge e) { + return e.getDistance(); + } + + @Override + public int compare(final PathVertex first, final PathVertex second) { + if (first.equals(second)) { + return 0; + } else if (first.getDistance() == -1) { + // first is greater than second + return 1; + } else if (second.getDistance() == -1) { + // first is less than second + return -1; + } + + return first.getDistance() - second.getDistance(); + } + + @Override + public int getScore(final PathVertex v) { + return v.getDistance(); + } + + @Override + public void setScore(final PathVertex v, final int score) { + v.setDistance(score); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertexTimeComparator.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertexTimeComparator.java new file mode 100644 index 0000000..d00360d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/graph/pathfinding/PathVertexTimeComparator.java @@ -0,0 +1,55 @@ +package edu.kit.informatik.graph.pathfinding; + +import edu.kit.informatik.graph.Edge; + +/** + * The Class PathVertexDistanceComparator. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class PathVertexTimeComparator extends PathVertexComparator { + + /** + * Instantiates a new path vertex time comparator. + */ + public PathVertexTimeComparator() { + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.graph.PathVertexComparator#getEdgeScore(edu.kit. + * informatik.graph.Edge) + */ + @Override + public int getEdgeScore(final Edge e) { + return e.getTime(); + } + + @Override + public int compare(final PathVertex first, final PathVertex second) { + if (first.equals(second)) { + return 0; + } else if (first.getTime() == -1) { + // first is greater than second + return 1; + } else if (second.getTime() == -1) { + // first is less than second + return -1; + } + + return first.getTime() - second.getTime(); + } + + @Override + public int getScore(final PathVertex v) { + return v.getTime(); + } + + @Override + public void setScore(final PathVertex v, final int score) { + v.setTime(score); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/Command.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/Command.java new file mode 100644 index 0000000..17d4116 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/Command.java @@ -0,0 +1,137 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.graph.Graph; + +/** + * The Class Command. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public abstract class Command { + + /** The name. */ + private final String name; + + private final String info; + + /** The parameter count. */ + private final int parameterCount; + + /** + * Instantiates a new command. + * + * @param name + * the name + * @param info + * the information on how to use the command + * @param parameterCount + * the parameter count + */ + public Command(final String name, final String info, final int parameterCount) { + this.name = name; + this.info = info; + this.parameterCount = parameterCount; + } + + /** + * Checks if the string starts with the correct name of this command. + * + * @param str + * the str + * @return true, if successful + */ + private boolean correctCommand(final String str) { + return name.equals(str.split(" ")[0]); + } + + /** + * Checks if string has valid command form. Will call + * correctCommand, correctParameters and will + * check parameterCount. + * + * @param command + * the command + * @return true, if successful + */ + public final boolean validate(final String command) { + final String[] parameters = commandToParametersArray(command); + return correctCommand(command) && parameters.length == parameterCount && correctParameters(parameters); + } + + /** + * Checks if parameters of string are correct. + * + * @param command + * the command + * @return true, if successful + */ + public boolean correctParameters(final String[] command) { + return true; + } + + /** + * Executes the command. + * + * @param command + * the command + * @param graph + * the graph + */ + public abstract void execute(String command, Graph graph); + + /** + * Gets the parameters from a String which is a console command. + * + * @param command + * the command + * @return the string[] that contains all parameters + */ + public String[] commandToParametersArray(final String command) { + final String[] tmp = command.split(" "); + if (tmp.length > 1) { + return tmp[1].split(";"); + } + return new String[0]; + } + + /** + * Checks if program should quit. + * + * @return true, if successful + */ + public boolean checkQuit() { + return false; + } + + /** + * Checks if objects are equal. + * + * @param obj + * the obj + * @return true, if same name and same parameterCount + */ + @Override + public boolean equals(final Object obj) { + return (obj.getClass().equals(this.getClass())) && ((Command) obj).name.equals(this.name) + && ((Command) obj).parameterCount == this.parameterCount; + } + /** + * Gets the name. + * + * @return the name + */ + /*public String getName() { + return name; + }*/ + + /** + * Gets the info. + * + * @return the info + */ + public String getInfo() { + return info; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/InfoCommand.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/InfoCommand.java new file mode 100644 index 0000000..2bcac59 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/InfoCommand.java @@ -0,0 +1,32 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Terminal; +import edu.kit.informatik.graph.Graph; + +/** + * The Class InfoCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class InfoCommand extends Command { + + /** + * Instantiates a new info command. + */ + public InfoCommand() { + super("info", "info", 0); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final Graph graph) { + Terminal.printLine(graph.toString()); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/InputManager.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/InputManager.java new file mode 100644 index 0000000..5d1caa1 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/InputManager.java @@ -0,0 +1,102 @@ +package edu.kit.informatik.terminalinput; + +import java.util.LinkedList; +import java.util.List; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.graph.Graph; + +/** + * The Class InputManager. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class InputManager { + + /** The commands. */ + private List commands; + + /** The graph. */ + private final Graph graph; + + /** The quit. */ + private boolean quit; + + /** + * Instantiates a new input manager. + * + * @param g + * the graph + */ + public InputManager(final Graph g) { + this.graph = g; + initializeCommands(); + quit = false; + } + + /** + * Initialize all commands. + */ + private void initializeCommands() { + commands = new LinkedList<>(); + commands.add(new QuitCommand()); + commands.add(new InfoCommand()); + commands.add(new VerticesCommand()); + commands.add(new NodesCommand()); + commands.add(new RemoveCommand()); + commands.add(new InsertCommand()); + commands.add(new RouteCommand()); + commands.add(new SearchCommand()); + + } + + /** + * Run the input manager. + */ + public void run() { + while (!quit) { + boolean commandExcecuted = false; + final String input = Terminal.readLine(); + for (final Command command : commands) { + if (command.validate(input)) { + command.execute(input, graph); + if (command.checkQuit()) { + quit = true; + } + commandExcecuted = true; + } + } + if (!commandExcecuted) { + error(Constant.COMMAND_NOT_FOUND + " (valid commands: " + commandsInfo() + + " [numbers can't be zero or less])"); + } + } + } + + /** + * Prints an error. + * + * @param message + * the message + */ + public static void error(final String message) { + Terminal.printLine(Constant.PREFIX_ERROR + " " + message); + } + + /** + * Prints the success command output. + */ + public static void printSuccess() { + Terminal.printLine(Constant.COMMAND_SUCCESSFUL); + } + + private String commandsInfo() { + String out = ""; + for (final Command command : commands) { + out += "'" + command.getInfo() + "' "; + } + return out; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/InsertCommand.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/InsertCommand.java new file mode 100644 index 0000000..916ef75 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/InsertCommand.java @@ -0,0 +1,80 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.exception.IllegalObjectException; +import edu.kit.informatik.graph.Edge; +import edu.kit.informatik.graph.Graph; +import edu.kit.informatik.graph.Vertex; + +/** + * The Class InsertCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class InsertCommand extends Command { + + /** + * Instantiates a new insert command. + */ + public InsertCommand() { + super("insert", "insert ;;;", 4); + } + + @Override + public boolean correctParameters(final String[] parameters) { + return parameters[0].matches(Constant.REGEX_CITY_NAME) && parameters[1].matches(Constant.REGEX_CITY_NAME) + && parameters[2].matches(Constant.REGEX_POSITIVE_INTEGER) + && parameters[3].matches(Constant.REGEX_POSITIVE_INTEGER); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final Graph graph) { + final String[] parameters = commandToParametersArray(command); + + Vertex v = new Vertex(parameters[0]); + Vertex w = new Vertex(parameters[1]); + int distance = 0; + int time = 0; + try { + distance = Integer.parseInt(parameters[2]); + time = Integer.parseInt(parameters[3]); + } catch (final NumberFormatException e) { + InputManager.error(Constant.NUMBER_FORMAT_ILLEGAL); + return; + } + + if (!graph.contains(v) && !graph.contains(w)) { + InputManager.error(Constant.EDGE_VERTEX_NOT_FOUND); + return; + } + + // Get the correct reference + if (graph.contains(v)) { + v = graph.getVertex(v); + } + if (graph.contains(w)) { + w = graph.getVertex(w); + } + + final Edge edge = new Edge(v, w, distance, time); + if (graph.contains(edge)) { + InputManager.error(Constant.EDGE_CONTAINED_ALLREADY); + return; + } + try { + graph.addEdge(edge); + InputManager.printSuccess(); + } catch (final IllegalObjectException e) { + InputManager.error(e.getMessage()); + } + + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/NodesCommand.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/NodesCommand.java new file mode 100644 index 0000000..3ee170e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/NodesCommand.java @@ -0,0 +1,39 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.exception.IllegalObjectException; +import edu.kit.informatik.graph.Graph; +import edu.kit.informatik.graph.Vertex; + +/** + * The Class NodesCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class NodesCommand extends Command { + + /** + * Instantiates a new nodes command. + */ + public NodesCommand() { + super("nodes", "nodes ", 1); + } + + @Override + public boolean correctParameters(final String[] parameters) { + return parameters[0].matches(Constant.REGEX_CITY_NAME); + } + + @Override + public void execute(final String command, final Graph graph) { + final Vertex v = new Vertex(commandToParametersArray(command)[0]); + try { + Terminal.printLine(graph.neighboursToString(v)); + } catch (final IllegalObjectException e) { + InputManager.error(e.getMessage()); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/QuitCommand.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/QuitCommand.java new file mode 100644 index 0000000..3b542d4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/QuitCommand.java @@ -0,0 +1,32 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.graph.Graph; + +/** + * The Class QuitCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class QuitCommand extends Command { + private boolean quit; + + /** + * Instantiates a new quit command. + */ + public QuitCommand() { + super("quit", "quit", 0); + quit = false; + } + + @Override + public void execute(final String command, final Graph graph) { + quit = true; + } + + @Override + public boolean checkQuit() { + return quit; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/RemoveCommand.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/RemoveCommand.java new file mode 100644 index 0000000..9bc0591 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/RemoveCommand.java @@ -0,0 +1,48 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.graph.Edge; +import edu.kit.informatik.graph.Graph; +import edu.kit.informatik.graph.Vertex; + +/** + * The Class RemoveCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class RemoveCommand extends Command { + + /** + * Instantiates a new removes the command. + */ + public RemoveCommand() { + super("remove", "remove ;", 2); + } + + @Override + public boolean correctParameters(final String[] parameters) { + return parameters[0].matches(Constant.REGEX_CITY_NAME) && parameters[1].matches(Constant.REGEX_CITY_NAME); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final Graph graph) { + final String[] parameters = commandToParametersArray(command); + final Vertex v = new Vertex(parameters[0]); + final Vertex w = new Vertex(parameters[1]); + + if (graph.removeEdge(new Edge(v, w, 10, 10))) { + Terminal.printLine("OK"); + } else { + InputManager.error(Constant.EDGE_CANNOT_REMOVE); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/RouteCommand.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/RouteCommand.java new file mode 100644 index 0000000..5afce3c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/RouteCommand.java @@ -0,0 +1,96 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.graph.Graph; +import edu.kit.informatik.graph.Vertex; +import edu.kit.informatik.graph.pathfinding.GraphPathFinder; +import edu.kit.informatik.graph.pathfinding.PathVertex; +import edu.kit.informatik.graph.pathfinding.PathVertexDistanceComparator; +import edu.kit.informatik.graph.pathfinding.PathVertexTimeComparator; + +/** + * The Class RouteCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class RouteCommand extends Command { + + /** + * Instantiates a new route command. + */ + public RouteCommand() { + super("route", "route ;;", 3); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#correctParameters(java.lang. + * String) + */ + @Override + public boolean correctParameters(final String[] parameters) { + return parameters[0].matches(Constant.REGEX_CITY_NAME) && parameters[1].matches(Constant.REGEX_CITY_NAME) + && parameters[2].matches(Constant.REGEX_ROUTE); + } + + @Override + public void execute(final String command, final Graph graph) { + final GraphPathFinder pathFinder = new GraphPathFinder(graph.getEdges()); + final String[] parameters = commandToParametersArray(command); + + final Vertex start = new Vertex(parameters[0]); + final Vertex searchFor = new Vertex(parameters[1]); + final String criterion = parameters[2]; + + // Check if start and searchFor are part of graph + if (!graph.contains(start) || !graph.contains(searchFor)) { + InputManager.error(Constant.VERTEX_NOT_FOUND); + return; + } + + String out = ""; + switch (criterion) { + case Constant.REGEX_CRITERION_ALL: + out = ""; + for (final PathVertex pVert : pathFinder.getAllPaths(start, searchFor)) { + out += pVert.toString() + "\n"; + } + break; + case Constant.REGEX_CRITERION_BOTH: + out = pathFinder.getPathDepthFirstSearch(start, searchFor).toString(); + break; + case Constant.REGEX_CRITERION_TIME: { + out = ""; + final String[] arr = pathFinder.getPathReversedDijkstra(start, searchFor, new PathVertexTimeComparator()) + .toString().split(" "); + // Reverse order + for (String anArr : arr) { + out = anArr + " " + out; + } + out = out.trim(); + break; + } + case Constant.REGEX_CRITERION_DISTANCE: { + out = ""; + final String[] arr = pathFinder + .getPathReversedDijkstra(start, searchFor, new PathVertexDistanceComparator()).toString() + .split(" "); + // Reverse order + for (String anArr : arr) { + out = anArr + " " + out; + } + out = out.trim(); + break; + } + default: + InputManager.error(Constant.CODE_NOT_ACCESSIBLE); + return; + } + out = out.trim(); + Terminal.printLine(out); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/SearchCommand.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/SearchCommand.java new file mode 100644 index 0000000..3fb0618 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/SearchCommand.java @@ -0,0 +1,78 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.graph.Graph; +import edu.kit.informatik.graph.Vertex; +import edu.kit.informatik.graph.pathfinding.GraphPathFinder; +import edu.kit.informatik.graph.pathfinding.PathVertexDistanceComparator; +import edu.kit.informatik.graph.pathfinding.PathVertexTimeComparator; + +/** + * The Class SearchCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class SearchCommand extends Command { + + /** + * Instantiates a new search command. + */ + public SearchCommand() { + super("search", "search ;;", 3); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#correctParameters(java.lang. + * String) + */ + @Override + public boolean correctParameters(final String[] parameters) { + return parameters[0].matches(Constant.REGEX_CITY_NAME) && parameters[1].matches(Constant.REGEX_CITY_NAME) + && parameters[2].matches(Constant.REGEX_SEARCH); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final Graph graph) { + final GraphPathFinder pathFinder = new GraphPathFinder(graph.getEdges()); + final String[] parameters = commandToParametersArray(command); + + final Vertex start = new Vertex(parameters[0]); + final Vertex searchFor = new Vertex(parameters[1]); + final String criterion = parameters[2]; + + // Check if start and searchFor are part of graph + if (!graph.contains(start) || !graph.contains(searchFor)) { + InputManager.error(Constant.VERTEX_NOT_FOUND); + return; + } + + String out = ""; + switch (criterion) { + case Constant.REGEX_CRITERION_BOTH: + out = Integer.toString(pathFinder.getPathDepthFirstSearch(start, searchFor).getOptimalScore()); + break; + case Constant.REGEX_CRITERION_TIME: + out = Integer.toString( + pathFinder.getPathReversedDijkstra(start, searchFor, new PathVertexTimeComparator()).getTime()); + break; + case Constant.REGEX_CRITERION_DISTANCE: + out = Integer.toString(pathFinder + .getPathReversedDijkstra(start, searchFor, new PathVertexDistanceComparator()).getDistance()); + break; + default: + InputManager.error(Constant.CODE_NOT_ACCESSIBLE); + return; + } + Terminal.printLine(out); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/VerticesCommand.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/VerticesCommand.java new file mode 100644 index 0000000..b7c8e8b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/terminalinput/VerticesCommand.java @@ -0,0 +1,26 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.graph.Graph; + +/** + * The Class VerticesCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class VerticesCommand extends Command { + + /** + * Instantiates a new vertices command. + */ + public VerticesCommand() { + super("vertices", "vertices", 0); + } + + @Override + public void execute(final String command, final Graph graph) { + Terminal.printLine(graph.toString().split("\n" + Constant.SEPARATOR + "\n")[0].trim()); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/test.graph b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/test.graph new file mode 100644 index 0000000..ebdc5cc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/test.graph @@ -0,0 +1,10 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/testsuite/ExpectionInputStream.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/testsuite/ExpectionInputStream.java new file mode 100644 index 0000000..9e8fd0a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/testsuite/ExpectionInputStream.java @@ -0,0 +1,101 @@ +package edu.kit.informatik.tests.testsuite; + +import java.io.IOException; +import java.io.PipedInputStream; +import java.io.PipedOutputStream; +import java.io.StringReader; +import java.util.List; + +/** + * InputStream that expects reading and reads specific lines. + * + * @author Moritz Hepp + * @version 1.0 + */ +public class ExpectionInputStream extends PipedInputStream { + + private boolean expecting; + private int count; + private final List inputs; + private ExpectionOutputStream out; + + /** + * Initialises a new InputStream. + * + * @param ins + * Lines the stream expects. + */ + public ExpectionInputStream(final List ins) { + super(); + inputs = ins; + count = 0; + expecting = true; + } + + /** + * Setter of expecting. + * + * @param val + * Value of expecting. + */ + public void setExpecting(final boolean val) { + expecting = val; + } + + /** + * Getter of expecting. + * + * @return value of expecting. + */ + public boolean isExpecting() { + return expecting; + } + + @Override + public void connect(final PipedOutputStream str) throws IOException { + if (str instanceof ExpectionOutputStream) { + super.connect(str); + out = (ExpectionOutputStream) str; + } else { + System.err.println(TestSuite.ERR_PREF + "Tried to connect with non ExpectionOutputStream instance!"); + System.exit(-1); + } + } + + @Override + public int read(final byte[] b, final int off, final int len) throws IOException { + int result = -1; + if (expecting) { + if (inputs.size() > count) { + final char[] ch = new char[b.length]; + final StringReader reader = new StringReader(inputs.get(count).toString() + System.lineSeparator()); + + result = reader.read(ch, off, len); + + for (int i = off; i < result; i++) { + b[i] = (byte) ch[i]; + } + count++; + expecting = false; + } else if (inputs.size() == count) { + final byte[] by = ("quit" + System.lineSeparator()).getBytes(); + System.arraycopy(by, 0, b, 0, by.length); + result = by.length; + expecting = false; + } else { + System.err.println(TestSuite.ERR_PREF + "End of expectations reached!"); + System.exit(-2); + } + } else { + if (this.out.isExpecting()) { + System.err.println( + TestSuite.ERR_PREF + "Expecting " + (this.out.getExpectationSize() - this.out.getCount()) + + " more outputs but got call to read!"); + } else { + System.err.println(TestSuite.ERR_PREF + "Reading while not expected; case: " + count); + System.exit(-2); + } + } + return result; + } +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.java new file mode 100644 index 0000000..43e73ba --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.java @@ -0,0 +1,154 @@ +package edu.kit.informatik.tests.testsuite; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PipedInputStream; +import java.io.PipedOutputStream; +import java.io.PrintStream; +import java.io.PrintWriter; +import java.util.Arrays; +import java.util.List; + +/** + * OutputStream multiple outputs and only writing if output matches the expected + * output. + * + * @author Moritz Hepp + * @version 1.0 + */ +public class ExpectionOutputStream extends PipedOutputStream { + + private final List expectations; + private int count = 0; + private boolean newLineAllowed = false; + private ExpectionInputStream in; + private final PrintStream out; + private PrintWriter log; + + /** + * Initialises a PipedStream with a list of expected inputs. + * + * @param expected Expected lines to print. + * @param str Next OutputStream. + * @param logFile File to save the output in. + * @throws IOException Will be thrown if initialisation of logwriter went wrong. + */ + public ExpectionOutputStream(final List expected, final OutputStream str, final File logFile) + throws IOException { + super(); + expectations = expected; + this.out = new PrintStream(str); + if (logFile.exists()) { + if (!logFile.delete()) { + throw new IOException("Deleting previous file failed!"); + } + } else { + if (!logFile.getParentFile().exists()) { + if (logFile.mkdirs()) { + throw new IOException("Deleting previous file failed!"); + } + } + } + if (logFile.createNewFile()) { + log = new PrintWriter(new FileWriter(logFile)); + } else { + throw new IOException("Creating new logFile failed!"); + } + } + + /** + * Getter of already printed lines. + * + * @return Count of already printed lines. + */ + public int getCount() { + return count; + } + + /** + * Getter of line count expecting. + * + * @return Size of list of expectations. + */ + public int getExpectationSize() { + return expectations.size(); + } + + /** + * Getter of property, if this Stream still expects. + * + * @return true, if count of already printed outputs is smaller then the + * size of the expected lines, false otherwise. + */ + public boolean isExpecting() { + return count < this.expectations.size(); + } + + /** + * Getter of the next stream this stream is connected to. + * + * @return Stream this stream is connected to. + */ + public PrintStream getNextStream() { + return this.out; + } + + @Override + public void connect(final PipedInputStream in) throws IOException { + if (in instanceof ExpectionInputStream) { + super.connect(in); + this.in = (ExpectionInputStream) in; + } else { + System.err.println(TestSuite.ERR_PREF + "Tried to connect with non ExpectionInputStream instance!"); + System.exit(-1); + } + } + + @Override + public void write(final byte[] b, final int off, final int len) throws IOException { + final String out = new String(Arrays.copyOfRange(b, off, len)); + if (out.startsWith(TestSuite.ERR_PREF) || out.startsWith(TestSuite.DEF_PREF) + || (out.matches(System.lineSeparator()) && newLineAllowed)) { + this.log.print(out); + newLineAllowed = false; + } else if (this.isExpecting()) { + String sRep = expectations.get(count).toString(); + // Get options + boolean ignoreEquals = false; + if (sRep.startsWith("!")) { + sRep = sRep.replaceFirst("!", ""); + // Ignore case + if (sRep.startsWith("C")) { + sRep = sRep.replaceFirst("C", ""); + ignoreEquals = sRep.equalsIgnoreCase(out); + } + //Others are not supported + } + if (sRep.equals(out) || ignoreEquals || (sRep.equals("00err") && out.startsWith("Error")) + || (out.replace(System.lineSeparator(), "\n").equals(sRep))) { + this.log.print(out); + + // quit-cmd has to be written + in.setExpecting(true); + count++; + newLineAllowed = true; + } else { + System.err.println(TestSuite.ERR_PREF + "\nexpected: " + sRep + "\nactual: " + out); + newLineAllowed = false; + System.exit(-2); + } + } else { + System.err.println(TestSuite.ERR_PREF + "Unexpected output at case: " + count); + newLineAllowed = false; + System.exit(-2); + } + } + + @Override + public void close() throws IOException { + super.close(); + this.log.close(); + } +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/testsuite/TestSuite.java b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/testsuite/TestSuite.java new file mode 100644 index 0000000..05e9c16 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/edu/kit/informatik/tests/testsuite/TestSuite.java @@ -0,0 +1,320 @@ +package edu.kit.informatik.tests.testsuite; + +import edu.kit.informatik.Terminal; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.PrintStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; +import java.util.Queue; +import java.util.Scanner; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Testing class providing a text file with command inputs instead of manual + * input. The text file is formatted as follows: + *

    + *
  • - '<arg1;arg2>' at the start of the file with arg1 and arg2 as + * command-line-arguments of testing file.
  • + *
  • - '#' at the start of a line marks a line-comment.
  • + *
  • - "<expectedOutput> : \"<input>\""
  • + *
+ * + * @author Moritz Hepp + * @version 1.0 + */ +public final class TestSuite { + /** + * Prefix for error messages. ExpectionOutputStream will ignore output with + * this prefix. + */ + public static final String ERR_PREF = "$Error: "; + /** + * Prefix for test messages. ExpectionOutputStream will ignore output with + * this prefix. + */ + public static final String DEF_PREF = "Test: "; + + private static final String PARAM_REGEX = "(?:!C)?"; + + private static final String LINE_REGEX + = "(null|00err|true|false|\"" + PARAM_REGEX + + "[\\w\\s;\\-]*\"|-?[\\d]+|-?[\\d]+\\.[\\d]+)\\s:\\s\"([\\w\\s;]+)\""; + private static final String CMD_LINE_ARGS_REGEX = "\"[\\w\\\\/:_\\-\\.]+\"(;\"[\\w\\\\/:_\\-\\.]+\")*"; + + private static final String CMD_LINE_ARGS = "$CMD_LINE_ARGS$"; + + private static ExpectionInputStream sysIn; + private static ExpectionOutputStream sysOut; + + private static File[] files; + private static Class cl; + private static File logDir; + + private static final Queue THREAD_QUEUE = new ConcurrentLinkedQueue<>(); + + private TestSuite() { + } + + /** + * Test main to perform the tests located at $ProjectRoot/tests and named + * *.test. + * + * @param args Command line arguments. + */ + public static void main(final String... args) { + init(); + for (final File f : files) { + final Class clazz = cl; + final List fileLines = readTestFile(f.getPath()); + if (fileLines != null) { + Thread thread = new Thread(() -> { + final File logFile = new File( + logDir.getAbsoluteFile() + "/" + f.getName().replace(".test", "Test.log")); + System.out.println(DEF_PREF + "## file: " + f.getName()); + + List inputs = new LinkedList<>(); + List expectations = new LinkedList<>(); + + convert(fileLines, inputs, expectations); + + testFile(clazz, inputs, expectations, logFile); + if (!THREAD_QUEUE.isEmpty()) + THREAD_QUEUE.poll().start(); + }); + thread.setDaemon(false); + THREAD_QUEUE.add(thread); + } else + System.err.println(ERR_PREF + "Bad formatted file: " + f.getName()); + } + if (!THREAD_QUEUE.isEmpty()) + THREAD_QUEUE.poll().start(); + else + System.err.println(ERR_PREF + "Threading error: Thread queue is empty!"); + } + + private static void init() { + final Scanner scan = new Scanner(System.in); + Properties prop = new Properties(); + try { + prop.load(new FileReader("TestSuite.config")); + } catch (IOException ignored) { + } + File testsDir = null; + if (prop.containsKey("TestSources")) + testsDir = new File(prop.getProperty("TestSources")); + while (testsDir == null || !testsDir.exists()) { + System.out.print("Path to tests directory: "); + String input = scan.nextLine(); + testsDir = new File(input); + if (!testsDir.exists()) { + System.err.println(ERR_PREF + "Not a valid directory!"); + testsDir = null; + } else { + prop.setProperty("TestSources", testsDir.getPath()); + } + } + files = testsDir.listFiles((dir, name) -> name.endsWith(".test")); + if (files == null || files.length == 0) { + System.err.println(ERR_PREF + "Tests directory doesn't contain .test-Files!"); + System.exit(-1); + } + logDir = new File(testsDir.getPath() + "/logs/"); + if (!logDir.exists()) + if (!logDir.mkdir()) + System.err.println(ERR_PREF + "Failed to create log-directory."); + cl = null; + String className; + if (prop.containsKey("TestClass")) { + try { + className = prop.getProperty("TestClass"); + cl = Terminal.class.getClassLoader().loadClass("edu.kit.informatik." + className); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + cl = null; + } + } + while (cl == null) { + try { + System.out.print("Name of testing class: "); + className = scan.nextLine(); + cl = Terminal.class.getClassLoader().loadClass("edu.kit.informatik." + className); + prop.setProperty("TestClass", className); + } catch (ClassNotFoundException e) { + System.err.println(ERR_PREF + e.getMessage()); + cl = null; + } + } + try { + prop.store(new FileOutputStream("TestSuite.config"), "TestSuite runtime config"); + } catch (IOException e) { + System.err.println(ERR_PREF + "Failed storing properties!"); + } + } + + /** + * Performs the tests one file is representing. + * + * @param testClass Class to be tested. + * @param inputs Inputs with Command line args. + * @param expectations Expected outputs. + * @param logFile File to store the output of this test. + */ + public static void testFile(final Class testClass, final List inputs, + final List expectations, final File logFile) { + if (inputs != null && expectations != null && !inputs.isEmpty() && !expectations.isEmpty()) { + try { + final Method main = testClass.getMethod("main", String[].class); + + String[] arguments = null; + if (inputs.get(0).startsWith(CMD_LINE_ARGS)) { + String cmdLineArgs = inputs.get(0).replace(CMD_LINE_ARGS, ""); + + arguments = cmdLineArgs.split(";"); + inputs.remove(0); + } + initInOutput(inputs, expectations, logFile); + + main.invoke(null, (Object) arguments); + + resetInOutputSettings(); + } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | IOException e) { + System.err.println(ERR_PREF + "Something went wrong while testing!"); + e.printStackTrace(); + } + } else { + System.err.println(ERR_PREF + "Empty test-file!"); + } + } + + private static void resetInOutputSettings() { + final int count = sysOut.getCount(); + if (count < sysOut.getExpectationSize()) { + System.err + .println(ERR_PREF + "Expected output count: " + count + ", actual: " + sysOut.getExpectationSize()); + } else if (sysIn.isExpecting()) { + System.err.println(ERR_PREF + "Expected input!"); + } else { + System.setOut(sysOut.getNextStream()); + try { + sysOut.close(); + sysOut = null; + sysIn.close(); + sysIn = null; + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + private static void initInOutput(final List inputs, + final List expectations, + final File logFile) throws IOException { + TestSuite.sysOut = new ExpectionOutputStream(expectations, System.out, logFile); + TestSuite.sysIn = new ExpectionInputStream(inputs); + + try { + sysIn.connect(sysOut); + } catch (final IOException e) { + System.err.println(ERR_PREF + e.getMessage()); + System.exit(-1); + return; + } + + System.setOut(new PrintStream(TestSuite.sysOut)); + System.setIn(TestSuite.sysIn); + } + + private static List readTestFile(final String path) { + List lines = null; + if (path != null) { + File testFile; + if (path.matches("[\\w]+")) { + testFile = new File(System.getProperty("user.dir") + File.pathSeparatorChar + path); + } else { + testFile = new File(path); + } + if (testFile.exists()) { + try { + final BufferedReader reader = new BufferedReader(new FileReader(testFile)); + lines = new LinkedList<>(); + while (reader.ready()) { + String nLine = reader.readLine(); + if (nLine != null) { + // if output is multiple lines long + if (nLine.matches("\"[\\w\\s\\-]*") && reader.ready()) { + String next; + boolean cont = true; + while (cont) { + next = reader.readLine(); + nLine += "\n" + next; + if (next.matches("[\\w\\s\\-;]*\"\\s:\\s\"[\\w\\s;]+\"")) { + cont = false; + } else if (!reader.ready()) { + nLine = ""; + cont = false; + } + } + } + if (nLine.matches(LINE_REGEX)) { + lines.add(nLine); + } else if (nLine.matches("<" + CMD_LINE_ARGS_REGEX + ">")) { + if (lines.size() == 0) { + final String args = nLine.replace("<", "").replace(">", ""); + lines.add(args); + } else { + lines = null; + break; + } + } else if (!nLine.matches("#.*") && !nLine.isEmpty()) { + lines = null; + break; + } + } + } + } catch (final IOException e) { + System.err.println(ERR_PREF + "Something went wrong while reading test File: " + e.getMessage()); + } + } + } + return lines; + } + + private static void convert(final List lines, + final List inputs, final List expections) { + if (lines != null) { + //Problem with same command + for (final String line : lines) { + if (line != null) { + if (line.matches(CMD_LINE_ARGS_REGEX)) { + String cmdLineArgs = line.replace("\"", ""); + inputs.add(CMD_LINE_ARGS + cmdLineArgs); + } else { + final Pattern pat = Pattern.compile(LINE_REGEX); + final Matcher match = pat.matcher(line); + if (match.matches() && (match.groupCount() == 2 || match.groupCount() == 3)) { + /* + group(1) == expected output + group() == input + */ + final String expected = match.group(1).replace("\"", ""); + final String input = match.group(2); + + expections.add(expected); + inputs.add(input); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/inputFile.txt b/Uni/Java/WS1516/Programmieren/Final01/src/inputFile.txt new file mode 100644 index 0000000..75a1c70 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/src/inputFile.txt @@ -0,0 +1,15 @@ +Aa +bB +C +d +e +f +-- +Aa;bB;1;+003 +Aa;C;2;4 +Aa;d;11;20 +bb;D;1;1 +bB;C;5;2 +C;d;1;1 +d;e;1;1 +f;e;1;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/src/texdoclet.jar b/Uni/Java/WS1516/Programmieren/Final01/src/texdoclet.jar new file mode 100644 index 0000000..28844aa Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final01/src/texdoclet.jar differ diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/README.txt b/Uni/Java/WS1516/Programmieren/Final01/tests/README.txt new file mode 100644 index 0000000..d46b7d1 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/README.txt @@ -0,0 +1,35 @@ +1. Die Klassen "TestSuite", "ExpectionInputStream", "ExpectionOutputStream" in das Projekt kopieren. + +2. Beim Start der TestSuite-Klasse wird nach dem Ordner der Testfälle gefragt, + berücksichtige dabei dass der Projekt Ordner als Start-Verzeichnis gilt. + +3. Danach wird nach der zu testenden Klasse gefragt, gebe hier einfach den Namen der Klasse im Package + "edu.kit.informatik" an, die als Main-Klasse gehandelt wird. + +4. Die test-Dateien müssen so benannt sein: "*.test" und forlgender formatierung folgen: + - Ein Testfall wird dargestellt als: : "" + - Wobei 'expected' eine Zeichenkette über mehrere Zeilen sein kann, die dem + regulären Ausdruck [a-zA-Z0-9\\s]+ entspricht. 'expected' stellt dabei die erwartete Ausgabe dar. + 'expected' muss entweder "true", "false", einer Zahl oder einer Zeichenkette + gekennzeichnet durch " entsprechen. + 'expected' kann nur als Zeichenkette mehrzeilig sein, solange der Zeilenumsprung + in den " ist. + + - und 'actual' eine Zeichenkette über eine Zeile sein kann, die dem regulären Ausdruck + [a-zA-Z0-9\\s-;]+ entspricht. 'actual' stellt dabei die Eingabe eines Befehls dar. + - Die Kommandozeilenargumente werden dargestellt als: + <"cmd1";"cmd2";...> + Wobei cmd1 ein Kommandozeilenargument darstellt. + Die Kommandozeilenargumente müssen in der ersten Zeile der .test-Datei stehen. + +5. Ein Beispiel für den Test-Fall auf dem Aufgabenblatt: + +<"src\edu\kit\informatik\tests\test.graph"> +6 : "search bB;d;route" +"bB Aa C d" : "route bB;d;route" +"bB Aa C d +bB Aa d +bB C Aa d +bB C d" : "route bB;d;all" +"Aa +C" : "nodes bB" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/insert.test b/Uni/Java/WS1516/Programmieren/Final01/tests/insert.test new file mode 100644 index 0000000..bb6845b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/insert.test @@ -0,0 +1,20 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#Errors +00err : "insert " +00err : "insert null" +00err : "insert null;null;;" +00err : "insert null;null;null;null" +00err : "insert null;null;null;null;null;null" +00err : "insert Aa;EE;Cee;1" +00err : "insert Aa;EE;1;dee" +00err : "insert Aa;Aa;5;4" +00err : "insert Aa;bb;10;5" +00err : "insert bB;d;50000000000;5" +#00err : "insert Aa;Aa;-5;4" +00err : "insert bB;d;1;0" +00err : "insert bB;d;0;0" + +#Works +"OK" : "insert Aa;ee;1;10" +"OK" : "insert bB;d;2;5" +#"OK" : "insert --;d;2;5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/insertTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/insertTest.log new file mode 100644 index 0000000..e69de29 diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/nodesInsertTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/nodesInsertTest.log new file mode 100644 index 0000000..b87d962 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/nodesInsertTest.log @@ -0,0 +1,10 @@ +Error, vertex not found +Aa +bB +d +OK +C +Aa +bB +d +ee diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/nodesRemoveTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/nodesRemoveTest.log new file mode 100644 index 0000000..23be1be --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/nodesRemoveTest.log @@ -0,0 +1,6 @@ +OK +C +C +d +Error, edge can't be removed +OK diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/nodesTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/nodesTest.log new file mode 100644 index 0000000..04acdba --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/nodesTest.log @@ -0,0 +1,18 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, vertex not found +bB +C +d +bB +C +d +Aa +bB +d +Aa +C +Aa +C diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/publicTestTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/publicTestTest.log new file mode 100644 index 0000000..16024af --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/publicTestTest.log @@ -0,0 +1,8 @@ +6 +bB Aa C d +bB Aa C d +bB Aa d +bB C Aa d +bB C d +Aa +C diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/removeTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/removeTest.log new file mode 100644 index 0000000..fcec023 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/removeTest.log @@ -0,0 +1,10 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +OK +OK +OK +OK +OK + diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/removeTillEmptyTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/removeTillEmptyTest.log new file mode 100644 index 0000000..e22e2cd --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/removeTillEmptyTest.log @@ -0,0 +1,6 @@ +OK +OK +OK +OK +OK + diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/removeTillNotCoherentTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/removeTillNotCoherentTest.log new file mode 100644 index 0000000..042c57e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/removeTillNotCoherentTest.log @@ -0,0 +1,7 @@ +OK +OK +OK +OK +OK +Error, vertex not found +Error, edge contains vertices that have not been initilized diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/routeTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/routeTest.log new file mode 100644 index 0000000..692b9de --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/routeTest.log @@ -0,0 +1,97 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, vertex not found +Error, vertex not found +Error, vertex not found +Aa +Aa +Aa +Aa +Aa bB +Aa bB +Aa bB +Aa bB +Aa C bB +Aa d C bB +Aa C +Aa C +Aa C +Aa bB C +Aa C +Aa d C +Aa C d +Aa C d +Aa C d +Aa bB C d +Aa C d +Aa d +bB +bB +bB +bB +bB Aa +bB Aa +bB Aa +bB Aa +bB C Aa +bB C d Aa +bB C +bB Aa C +bB C +bB Aa C +bB Aa d C +bB C +bB C d +bB Aa C d +bB C d +bB Aa C d +bB Aa d +bB C Aa d +bB C d +C +C +C +C +C Aa +C Aa +C Aa +C Aa +C bB Aa +C d Aa +C bB +C Aa bB +C bB +C Aa bB +C bB +C d Aa bB +C d +C d +C d +C Aa d +C bB Aa d +C d +d +d +d +d +d C Aa +d C Aa +d C Aa +d Aa +d C Aa +d C bB Aa +d C bB +d C Aa bB +d C bB +d Aa bB +d Aa C bB +d C Aa bB +d C bB +d C +d C +d C +d Aa bB C +d Aa C +d C diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/searchTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/searchTest.log new file mode 100644 index 0000000..193f551 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/searchTest.log @@ -0,0 +1,55 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, vertex not found +Error, vertex not found +Error, vertex not found +0 +0 +0 +3 +1 +10 +4 +2 +20 +5 +5 +50 +0 +0 +0 +3 +1 +10 +2 +3 +29 +3 +6 +73 +0 +0 +0 +4 +2 +20 +2 +3 +29 +1 +3 +10 +0 +0 +0 +5 +5 +50 +3 +6 +73 +1 +3 +10 diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/test1Test.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/test1Test.log new file mode 100644 index 0000000..a23c7c9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/test1Test.log @@ -0,0 +1 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/test2Test.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/test2Test.log new file mode 100644 index 0000000..a23c7c9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/test2Test.log @@ -0,0 +1 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/treeGraphTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/treeGraphTest.log new file mode 100644 index 0000000..8986d12 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/treeGraphTest.log @@ -0,0 +1,68 @@ +A +B +C +D +E +F +G +-- +A;B;2;5 +A;C;100;2 +B;D;100;60 +B;E;300;20 +C;F;4;4 +C;G;20;6 +B +C +A +D +E +A +F +G +B +B +C +C +A B +A B +A B +A B +5 +2 +29 +A C +A C +A C +A C +2 +100 +10004 +A B D +A B D +A B D +A B D +65 +102 +14629 +A B E +A B E +A B E +A B E +25 +302 +91829 +A C F +A C F +A C F +A C F +6 +104 +10852 +A C G +A C G +A C G +A C G +8 +120 +14464 diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/logs/verticesTest.log b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/verticesTest.log new file mode 100644 index 0000000..17427b0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/logs/verticesTest.log @@ -0,0 +1,12 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Aa +bB +C +d +OK +OK +OK +OK +OK + diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/nodes.test b/Uni/Java/WS1516/Programmieren/Final01/tests/nodes.test new file mode 100644 index 0000000..8ba3e32 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/nodes.test @@ -0,0 +1,22 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#Errors +00err : "nodes " +00err : "nodes null" +00err : "nodes ;;" +00err : "nodes e" +00err : "nodes cc" + +#Nodes of all +"bB +C +d" : "nodes Aa" +"bB +C +d" : "nodes aa" +"Aa +bB +d" : "nodes C" +"Aa +C" : "nodes d" +"Aa +C" : "nodes bB" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/nodesInsert.test b/Uni/Java/WS1516/Programmieren/Final01/tests/nodesInsert.test new file mode 100644 index 0000000..0a8bd24 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/nodesInsert.test @@ -0,0 +1,11 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +00err : "nodes ee" +"Aa +bB +d" : "nodes C" +"OK" : "insert C;ee;2;13" +"C" : "nodes ee" +"Aa +bB +d +ee" : "nodes C" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/nodesRemove.test b/Uni/Java/WS1516/Programmieren/Final01/tests/nodesRemove.test new file mode 100644 index 0000000..cbe1bcb --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/nodesRemove.test @@ -0,0 +1,7 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +"OK" : "remove bB;Aa" +"C" : "nodes bB" +"C +d" : "nodes Aa" +00err : "remove Aa;bB" +"OK" : "remove C;Aa" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/publicTest.test b/Uni/Java/WS1516/Programmieren/Final01/tests/publicTest.test new file mode 100644 index 0000000..f0622de --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/publicTest.test @@ -0,0 +1,9 @@ +<"C:\Eclipse\workspace\Final01\src\edu\kit\informatik\tests\test.graph"> +6 : "search bB;d;route" +"bB Aa C d" : "route bB;d;route" +"bB Aa C d +bB Aa d +bB C Aa d +bB C d" : "route bB;d;all" +"Aa +C" : "nodes bB" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/remove.test b/Uni/Java/WS1516/Programmieren/Final01/tests/remove.test new file mode 100644 index 0000000..d5dcc3b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/remove.test @@ -0,0 +1,16 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#init +#Errors +00err : "remove " +00err : "remove null;" +00err : "remove null;null;null" +00err : "remove ;" + +"OK" : "remove C;d" +"OK" : "remove bB;C" +"OK" : "remove d;aa" +"OK" : "remove aa;c" +"OK" : "remove aa;bb" + +" +" : "info" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/removeTillEmpty.test b/Uni/Java/WS1516/Programmieren/Final01/tests/removeTillEmpty.test new file mode 100644 index 0000000..980746f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/removeTillEmpty.test @@ -0,0 +1,9 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +"OK" : "remove C;bB" +"OK" : "remove C;d" +"OK" : "remove Aa;d" +"OK" : "remove Aa;bB" +"OK" : "remove Aa;C" + +" +" : "info" diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/removeTillNotCoherent.test b/Uni/Java/WS1516/Programmieren/Final01/tests/removeTillNotCoherent.test new file mode 100644 index 0000000..3a50bf1 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/removeTillNotCoherent.test @@ -0,0 +1,8 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +"OK" : "remove bB;C" +"!Cok" : "remove C;d" +"OK" : "remove Aa;d" +"OK" : "remove Aa;C" +"OK" : "remove Aa;bB" +00err : "nodes Aa" +00err : "insert Aa;ee;10;5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/route.test b/Uni/Java/WS1516/Programmieren/Final01/tests/route.test new file mode 100644 index 0000000..8cdba66 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/route.test @@ -0,0 +1,120 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#72 Testcases +#Errors +00err : "route " +00err : "route null;null;null" +00err : "route null;null;null;null" +00err : "route null;null;time" +00err : "route null;null;route" +00err : "route null;null;optimal" +00err : "route ceee;deeee;optimal;" + +#Aa to all others +"Aa" : "route Aa;Aa;time" +"Aa" : "route Aa;Aa;route" +"Aa" : "route Aa;Aa;optimal" +"Aa" : "route Aa;Aa;all" + +"Aa bB" : "route Aa;bB;time" +"Aa bB" : "route Aa;bB;route" +"Aa bB" : "route Aa;bB;optimal" +"Aa bB +Aa C bB +Aa d C bB" : "route Aa;bB;all" + +"Aa C" : "route Aa;C;time" +"Aa C" : "route Aa;C;route" +"Aa C" : "route Aa;C;optimal" +"Aa bB C +Aa C +Aa d C" : "route Aa;C;all" + +"Aa C d" : "route Aa;d;time" +"Aa C d" : "route Aa;d;route" +"Aa C d" : "route Aa;d;optimal" +"Aa bB C d +Aa C d +Aa d" : "route Aa;d;all" + +#bB to all others +"bB" : "route bB;bB;time" +"bB" : "route bB;bB;route" +"bB" : "route bB;bB;optimal" +"bB" : "route bB;bB;all" + +"bB Aa" : "route bB;Aa;time" +"bB Aa" : "route bB;Aa;route" +"bB Aa" : "route bB;Aa;optimal" +"bB Aa +bB C Aa +bB C d Aa" : "route bB;Aa;all" + +"bB C" : "route bB;C;time" +"bB Aa C" : "route bB;C;route" +"bB C" : "route bB;C;optimal" +"bB Aa C +bB Aa d C +bB C" : "route bB;C;all" + +"bB C d" : "route bB;d;time" +"bB Aa C d" : "route bB;d;route" +"bB C d" : "route bB;d;optimal" +"bB Aa C d +bB Aa d +bB C Aa d +bB C d" : "route bB;d;all" + +#C to all others +"C" : "route C;C;time" +"C" : "route C;C;route" +"C" : "route C;C;optimal" +"C" : "route C;C;all" + +"C Aa" : "route C;Aa;time" +"C Aa" : "route C;Aa;route" +"C Aa" : "route C;Aa;optimal" +"C Aa +C bB Aa +C d Aa" : "route C;Aa;all" + +"C bB" : "route C;bB;time" +"C Aa bB" : "route C;bB;route" +"C bB" : "route C;bB;optimal" +"C Aa bB +C bB +C d Aa bB" : "route C;bB;all" + +"C d" : "route C;d;time" +"C d" : "route C;d;route" +"C d" : "route C;d;optimal" +"C Aa d +C bB Aa d +C d" : "route C;d;all" + +#d to all others +"d" : "route d;d;time" +"d" : "route d;d;route" +"d" : "route d;d;optimal" +"d" : "route d;d;all" + +"d C Aa" : "route d;Aa;time" +"d C Aa" : "route d;Aa;route" +"d C Aa" : "route d;Aa;optimal" +"d Aa +d C Aa +d C bB Aa" : "route d;Aa;all" + +"d C bB" : "route d;bB;time" +"d C Aa bB" : "route d;bB;route" +"d C bB" : "route d;bB;optimal" +"d Aa bB +d Aa C bB +d C Aa bB +d C bB" : "route d;bB;all" + +"d C" : "route d;C;time" +"d C" : "route d;C;route" +"d C" : "route d;C;optimal" +"d Aa bB C +d Aa C +d C" : "route d;C;all" diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/search.test b/Uni/Java/WS1516/Programmieren/Final01/tests/search.test new file mode 100644 index 0000000..6b13d14 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/search.test @@ -0,0 +1,78 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#55 Testcases +#Errors +00err : "search " +00err : "search null;null;null" +00err : "search null;null;null;null" +00err : "search null;null;time" +00err : "search null;null;route" +00err : "search null;null;optimal" +00err : "search ceee;deeee;optimal;" + +#Aa to all others +0 : "search Aa;Aa;time" +0 : "search Aa;Aa;route" +0 : "search Aa;Aa;optimal" + +3 : "search Aa;bB;time" +1 : "search Aa;bB;route" +10 : "search Aa;bB;optimal" + +4 : "search Aa;C;time" +2 : "search Aa;C;route" +20 : "search Aa;C;optimal" + +5 : "search Aa;d;time" +5 : "search Aa;d;route" +50 : "search Aa;d;optimal" + +#bB to all others +0 : "search bB;bB;time" +0 : "search bB;bB;route" +0 : "search bB;bB;optimal" + +3 : "search bB;Aa;time" +1 : "search bB;Aa;route" +10 : "search bB;Aa;optimal" + +2 : "search bB;C;time" +3 : "search bB;C;route" +29 : "search bB;C;optimal" + +3 : "search bB;d;time" +6 : "search bB;d;route" +73 : "search bB;d;optimal" + +#C to all others +0 : "search C;C;time" +0 : "search C;C;route" +0 : "search C;C;optimal" + +4 : "search C;Aa;time" +2 : "search C;Aa;route" +20 : "search C;Aa;optimal" + +2 : "search C;bB;time" +3 : "search C;bB;route" +29 : "search C;bB;optimal" + +1 : "search C;d;time" +3 : "search C;d;route" +10 : "search C;d;optimal" + +#d to all others +0 : "search d;d;time" +0 : "search d;d;route" +0 : "search d;d;optimal" + +5 : "search d;Aa;time" +5 : "search d;Aa;route" +50 : "search d;Aa;optimal" + +3 : "search d;bB;time" +6 : "search d;bB;route" +73 : "search d;bB;optimal" + +1 : "search d;C;time" +3 : "search d;C;route" +10 : "search d;C;optimal" diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/test.graph b/Uni/Java/WS1516/Programmieren/Final01/tests/test.graph new file mode 100644 index 0000000..ebdc5cc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/test.graph @@ -0,0 +1,10 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/treeGraph.graph b/Uni/Java/WS1516/Programmieren/Final01/tests/treeGraph.graph new file mode 100644 index 0000000..773b01b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/treeGraph.graph @@ -0,0 +1,14 @@ +A +B +C +D +E +F +G +-- +A;B;2;5 +A;C;100;2 +B;D;100;60 +B;E;300;20 +C;F;4;4 +C;G;20;6 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/treeGraph.test b/Uni/Java/WS1516/Programmieren/Final01/tests/treeGraph.test new file mode 100644 index 0000000..69d5c7c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/treeGraph.test @@ -0,0 +1,80 @@ +<"C:\Eclipse\workspace\Final01\tests\treeGraph.graph"> +#Init test +"A +B +C +D +E +F +G +-- +A;B;2;5 +A;C;100;2 +B;D;100;60 +B;E;300;20 +C;F;4;4 +C;G;20;6" : "info" + +#Nodes +"B +C" : "nodes A" +"A +D +E" : "nodes B" +"A +F +G" : "nodes C" +"B" : "nodes D" +"B" : "nodes E" +"C" : "nodes F" +"C" : "nodes G" + +#Routes +#From root +"A B" : "route A;B;time" +"A B" : "route A;B;route" +"A B" : "route A;B;optimal" +"A B" : "route A;B;all" +5 : "search A;B;time" +2 : "search A;B;route" +29 : "search A;B;optimal" + +"A C" : "route A;C;time" +"A C" : "route A;C;route" +"A C" : "route A;C;optimal" +"A C" : "route A;C;all" +2 : "search A;C;time" +100 : "search A;C;route" +10004 : "search A;C;optimal" + +"A B D" : "route A;D;time" +"A B D" : "route A;D;route" +"A B D" : "route A;D;optimal" +"A B D" : "route A;D;all" +65 : "search A;D;time" +102 : "search A;D;route" +14629 : "search A;D;optimal" + +"A B E" : "route A;E;time" +"A B E" : "route A;E;route" +"A B E" : "route A;E;optimal" +"A B E" : "route A;E;all" +25 : "search A;E;time" +302 : "search A;E;route" +91829 : "search A;E;optimal" + +"A C F" : "route A;F;time" +"A C F" : "route A;F;route" +"A C F" : "route A;F;optimal" +"A C F" : "route A;F;all" +6 : "search A;F;time" +104 : "search A;F;route" +10852 : "search A;F;optimal" + +"A C G" : "route A;G;time" +"A C G" : "route A;G;route" +"A C G" : "route A;G;optimal" +"A C G" : "route A;G;all" +8 : "search A;G;time" +120 : "search A;G;route" +14464 : "search A;G;optimal" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final01/tests/vertices.test b/Uni/Java/WS1516/Programmieren/Final01/tests/vertices.test new file mode 100644 index 0000000..e5f19dc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final01/tests/vertices.test @@ -0,0 +1,21 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#Errors +00err : "vertices null" +00err : "vertices 10" + +#Standard +"Aa +bB +C +d" : "vertices" + +#Remove till empty +"OK" : "remove C;bB" +"OK" : "remove C;d" +"OK" : "remove Aa;d" +"OK" : "remove Aa;bB" +"OK" : "remove Aa;C" + +#Empty output +" +" : "vertices" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.checkstyle b/Uni/Java/WS1516/Programmieren/Final02/.checkstyle new file mode 100644 index 0000000..4d50a66 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Final02/.classpath b/Uni/Java/WS1516/Programmieren/Final02/.classpath new file mode 100644 index 0000000..0a757b9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Uni/Java/WS1516/Programmieren/Final02/.idea/.name b/Uni/Java/WS1516/Programmieren/Final02/.idea/.name new file mode 100644 index 0000000..2f4fb11 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.idea/.name @@ -0,0 +1 @@ +Final02 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.idea/checkstyle-idea.xml b/Uni/Java/WS1516/Programmieren/Final02/.idea/checkstyle-idea.xml new file mode 100644 index 0000000..a6944f6 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.idea/checkstyle-idea.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.idea/compiler.xml b/Uni/Java/WS1516/Programmieren/Final02/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.idea/copyright/profiles_settings.xml b/Uni/Java/WS1516/Programmieren/Final02/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.idea/encodings.xml b/Uni/Java/WS1516/Programmieren/Final02/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.idea/misc.xml b/Uni/Java/WS1516/Programmieren/Final02/.idea/misc.xml new file mode 100644 index 0000000..c57292f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.idea/misc.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.idea/modules.xml b/Uni/Java/WS1516/Programmieren/Final02/.idea/modules.xml new file mode 100644 index 0000000..5422ebf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.idea/uiDesigner.xml b/Uni/Java/WS1516/Programmieren/Final02/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.idea/workspace.xml b/Uni/Java/WS1516/Programmieren/Final02/.idea/workspace.xml new file mode 100644 index 0000000..723b204 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.idea/workspace.xml @@ -0,0 +1,961 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $PROJECT_DIR$ + true + + bdd + + DIRECTORY + + false + + + + + + + + + + + + + + + + + + + + + + + + + 1458221842980 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No facets are configured + + + + + + + + + + + + + + + 1.8 + + + + + + + + Final02 + + + + + + + + 1.8 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/.project b/Uni/Java/WS1516/Programmieren/Final02/.project new file mode 100644 index 0000000..035b3d7 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.project @@ -0,0 +1,23 @@ + + + Final02 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/Uni/Java/WS1516/Programmieren/Final02/.settings/org.eclipse.jdt.core.prefs b/Uni/Java/WS1516/Programmieren/Final02/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Uni/Java/WS1516/Programmieren/Final02/Final02.iml b/Uni/Java/WS1516/Programmieren/Final02/Final02.iml new file mode 100644 index 0000000..ebcd1ba --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/Final02.iml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/README.md b/Uni/Java/WS1516/Programmieren/Final02/bin/README.md new file mode 100644 index 0000000..3598c30 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/README.md @@ -0,0 +1 @@ +tests \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/bag.test b/Uni/Java/WS1516/Programmieren/Final02/bin/bag.test new file mode 100644 index 0000000..22e13d0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/bag.test @@ -0,0 +1,92 @@ +<"standard"> + +"0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" : "bag" + +"OK" : "select 8" +"OK" : "place 4;0" + +"0 1 2 3 4 5 6 7 9 10 11 12 13 14 15" : "bag" + +"OK" : "select 15" + +"0 1 2 3 4 5 6 7 9 10 11 12 13 14" : "bag" + +00err : "place" + +"0 1 2 3 4 5 6 7 9 10 11 12 13 14 15" : "bag" + +"OK" : "select 14" +"OK" : "place 2;0" + +"0 1 2 3 4 5 6 7 9 10 11 12 13 15" : "bag" + +"OK" : "select 13" +"OK" : "place 1;0" + +"0 1 2 3 4 5 6 7 9 10 11 12 15" : "bag" + +"OK" : "select 7" +"OK" : "place 4;1" + +"0 1 2 3 4 5 6 9 10 11 12 15" : "bag" + +"OK" : "select 6" +"OK" : "place 5;1" + +"0 1 2 3 4 5 9 10 11 12 15" : "bag" + +"OK" : "select 3" +"OK" : "place 0;1" + +"0 1 2 4 5 9 10 11 12 15" : "bag" + +"OK" : "select 2" +"OK" : "place 1;1" + +"0 1 4 5 9 10 11 12 15" : "bag" + +"OK" : "select 1" +"OK" : "place 2;2" + +"0 4 5 9 10 11 12 15" : "bag" + +"OK" : "select 10" +"OK" : "place 3;2" + +"0 4 5 9 11 12 15" : "bag" + +"OK" : "select 12" +"OK" : "place 4;3" + +"0 4 5 9 11 15" : "bag" + +"OK" : "select 4" +"OK" : "place 5;3" + +"0 5 9 11 15" : "bag" + +"OK" : "select 15" +"OK" : "place 0;3" + +"0 5 9 11" : "bag" + +"OK" : "select 9" +"OK" : "place 1;3" + +"0 5 11" : "bag" + +"OK" : "select 0" +"OK" : "place 3;4" + +"5 11" : "bag" + +"OK" : "select 5" +"OK" : "place 2;4" + +"11" : "bag" + +"OK" : "select 11" +"draw" : "place 5;5" + +" +" : "bag" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/draw_colprint_rowprint.test b/Uni/Java/WS1516/Programmieren/Final02/bin/draw_colprint_rowprint.test new file mode 100644 index 0000000..6307bc8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/draw_colprint_rowprint.test @@ -0,0 +1,58 @@ +<"torus"> +"OK" : "select 0" +"OK" : "place 6;0" +"OK" : "select 1" +"OK" : "place 0;2" +"OK" : "select 2" +"OK" : "place 0;4" +"OK" : "select 3" +"OK" : "place 1;1" +"OK" : "select 4" +"OK" : "place 1;3" +"OK" : "select 5" +"OK" : "place 1;5" +"OK" : "select 6" +"OK" : "place 2;1" +"OK" : "select 7" +"OK" : "place 2;3" +"OK" : "select 8" +"OK" : "place 2;-1" +"OK" : "select 9" +"OK" : "place 3;0" +"OK" : "select 10" +"OK" : "place 3;2" +"OK" : "select 11" +"OK" : "place 3;4" +"OK" : "select 12" +"OK" : "place 4;1" +"OK" : "select 13" +"OK" : "place 4;3" +"OK" : "select 14" +"OK" : "place 4;5" +"OK" : "select 15" +"draw" : "place 5;1" + +"0 # 1 # 2 #" : "rowprint 0" +"# 3 # 4 # 5" : "rowprint +01" +"# 6 # 7 # 8" : "rowprint 002" +"9 # 10 # 11 #" : "rowprint +3" +"# 12 # 13 # 14" : "rowprint 4" +"# 15 # # # #" : "rowprint 5" + +"0 # # 9 # #" : "colprint 0" +"# 3 6 # 12 15" : "colprint 1" +"1 # # 10 # #" : "colprint 2" +"# 4 7 # 13 #" : "colprint +03" +"2 # # 11 # #" : "colprint 004" +"# 5 8 # 14 #" : "colprint +5" + +00err : "colprint -1" +00err : "colprint 6" +00err : "rowprint -1" +00err : "rowprint 6" + +00err : "select 0" +00err : "place 1;0" + +" +" : "bag" diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/Constant.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/Constant.class new file mode 100644 index 0000000..a60e9a3 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/Constant.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/ExitException.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/ExitException.class new file mode 100644 index 0000000..22779bf Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/ExitException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/FileInputHelper.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/FileInputHelper.class new file mode 100644 index 0000000..49c110f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/FileInputHelper.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/Main.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/Main.class new file mode 100644 index 0000000..d93f849 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/Main.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/MainTest.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/MainTest.class new file mode 100644 index 0000000..4ecac13 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/MainTest.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/NoExitSecurityManager.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/NoExitSecurityManager.class new file mode 100644 index 0000000..3c9a54c Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/NoExitSecurityManager.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/Terminal.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/Terminal.class new file mode 100644 index 0000000..b4cddc5 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/Terminal.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/IllegalMethodCallException.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/IllegalMethodCallException.class new file mode 100644 index 0000000..4d638bd Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/IllegalMethodCallException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/IllegalObjectException.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/IllegalObjectException.class new file mode 100644 index 0000000..b35e4db Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/IllegalObjectException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/IllegalParameterException.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/IllegalParameterException.class new file mode 100644 index 0000000..c1796aa Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/IllegalParameterException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/InvalidFileFormatException.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/InvalidFileFormatException.class new file mode 100644 index 0000000..a2f78a8 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/exception/InvalidFileFormatException.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/BoardGame.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/BoardGame.class new file mode 100644 index 0000000..ce13232 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/BoardGame.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/EmptyToken.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/EmptyToken.class new file mode 100644 index 0000000..8416461 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/EmptyToken.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/Token.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/Token.class new file mode 100644 index 0000000..384fc71 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/Token.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/TokenCounter.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/TokenCounter.class new file mode 100644 index 0000000..44c79c8 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/TokenCounter.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/TorusBoardGame.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/TorusBoardGame.class new file mode 100644 index 0000000..8db63f0 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/game/TorusBoardGame.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/Edge.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/Edge.class new file mode 100644 index 0000000..62738a3 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/Edge.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/Graph.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/Graph.class new file mode 100644 index 0000000..3fdd9f0 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/Graph.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/Vertex.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/Vertex.class new file mode 100644 index 0000000..508637f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/Vertex.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/fileinput (1)/GraphBuilder.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/fileinput (1)/GraphBuilder.class new file mode 100644 index 0000000..1ba8740 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/fileinput (1)/GraphBuilder.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/GraphPathFinder.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/GraphPathFinder.class new file mode 100644 index 0000000..748cb7f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/GraphPathFinder.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertex.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertex.class new file mode 100644 index 0000000..8c56c1d Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertex.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertexComparator.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertexComparator.class new file mode 100644 index 0000000..df03f47 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertexComparator.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertexDistanceComparator.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertexDistanceComparator.class new file mode 100644 index 0000000..cc8c523 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertexDistanceComparator.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertexTimeComparator.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertexTimeComparator.class new file mode 100644 index 0000000..43af5e1 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/graph/pathfinding/PathVertexTimeComparator.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/BagCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/BagCommand.class new file mode 100644 index 0000000..1e500a4 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/BagCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/ColprintCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/ColprintCommand.class new file mode 100644 index 0000000..aeb3c2a Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/ColprintCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/Command.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/Command.class new file mode 100644 index 0000000..f89e584 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/Command.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/InfoCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/InfoCommand.class new file mode 100644 index 0000000..5011350 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/InfoCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/InputManager.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/InputManager.class new file mode 100644 index 0000000..879c1dc Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/InputManager.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/InsertCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/InsertCommand.class new file mode 100644 index 0000000..54158d1 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/InsertCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/NodesCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/NodesCommand.class new file mode 100644 index 0000000..6b55a5d Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/NodesCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/PlaceCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/PlaceCommand.class new file mode 100644 index 0000000..0b9aa1e Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/PlaceCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/QuitCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/QuitCommand.class new file mode 100644 index 0000000..c9fbdd4 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/QuitCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/RemoveCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/RemoveCommand.class new file mode 100644 index 0000000..bef962d Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/RemoveCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/RouteCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/RouteCommand.class new file mode 100644 index 0000000..1193ef4 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/RouteCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/RowprintCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/RowprintCommand.class new file mode 100644 index 0000000..e0184d6 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/RowprintCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/SearchCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/SearchCommand.class new file mode 100644 index 0000000..8a7361c Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/SearchCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/SelectCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/SelectCommand.class new file mode 100644 index 0000000..06d31a0 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/SelectCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/VerticesCommand.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/VerticesCommand.class new file mode 100644 index 0000000..840668f Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/terminalinput/VerticesCommand.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/test.graph b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/test.graph new file mode 100644 index 0000000..ebdc5cc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/test.graph @@ -0,0 +1,10 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/testsuite/ExpectionInputStream.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/testsuite/ExpectionInputStream.class new file mode 100644 index 0000000..ea67e54 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/testsuite/ExpectionInputStream.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.class new file mode 100644 index 0000000..72ceb12 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/testsuite/TestSuite.class b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/testsuite/TestSuite.class new file mode 100644 index 0000000..b72f02a Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/edu/kit/informatik/tests/testsuite/TestSuite.class differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/extreme_error_test.test b/Uni/Java/WS1516/Programmieren/Final02/bin/extreme_error_test.test new file mode 100644 index 0000000..8c64165 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/extreme_error_test.test @@ -0,0 +1,87 @@ +<"standard"> +00err : "place" +00err : "place 3;2" +00err : "place -5;3" +00err : "place 16;3" +00err : "place -1;4" +00err : "place 99999999999999999999;99999999999999999999" +00err : "place 5;13" +00err : "place 5;kartoffel" +00err : "place kartoffel;5" + +00err : "select" +00err : "kartoffel" +00err : "select -5" +00err : "select 16" +00err : "select -1" +00err : "select 9999999999999999999999999999" +00err : "select 5;13" +00err : "select 5;kartoffel" + +"OK" : "select 0" + +00err : "select 3" +00err : "select" +00err : "kartoffel" +00err : "select -5" +00err : "select 16" +00err : "select -1" +00err : "select 9999999999999999999999999999" +00err : "select 5;13" +00err : "select 5;kartoffel" + +00err : "place 3" +00err : "place 3;4" +"OK" : "select 0" +00err : "place" +00err : "place 5;2" +"OK" : "select 0" +00err : "place -3;2" +00err : "place 5;2" +"OK" : "select 0" +00err : "place -5;3" +00err : "place 5;2" +"OK" : "select 0" +00err : "place 16;3" +00err : "place 5;2" +"OK" : "select 0" +00err : "place -1;4" +00err : "place 5;2" +"OK" : "select 0" +00err : "place 99999999999999999999;99999999999999999999" +00err : "place 5;2" +"OK" : "select 0" +00err : "place 5;kartoffel" +00err : "place 5;2" +"OK" : "select 0" +"OK" : "place 5;2" + +00err : "colprint" +00err : "colprint " +00err : "colprint ; " +00err : "colprint kartoffel" +00err : "colprint 8" +00err : "colprint -8" +00err : "colprint 9999999999999999999999" +00err : "colprint kartoffel;8" +00err : "colprint 8;kartoffel" +00err : "colprint -8;999999999999999999" + +00err : "rowprint" +00err : "rowprint " +00err : "rowprint ; " +00err : "rowprint kartoffel" +00err : "rowprint 8" +00err : "rowprint -8" +00err : "rowprint 9999999999999999999999" +00err : "rowprint kartoffel;8" +00err : "rowprint 8;kartoffel" +00err : "rowprint -8;999999999999999999" + +00err : "bag kartoffel" +00err : "bag 8" +00err : "bag -8" +00err : "bag 9999999999999999999999" +00err : "bag kartoffel;8" +00err : "bag 8;kartoffel" +00err : "bag -8;999999999999999999" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/duplicateEdge.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/duplicateEdge.txt new file mode 100644 index 0000000..a2e06e6 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/duplicateEdge.txt @@ -0,0 +1,7 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;bB;2;4 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/duplicateVertex.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/duplicateVertex.txt new file mode 100644 index 0000000..782a3bf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/duplicateVertex.txt @@ -0,0 +1,11 @@ +Aa +aA +AA +aa +bB +-- +aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/edgeWithoutVertex.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/edgeWithoutVertex.txt new file mode 100644 index 0000000..eff11e9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/edgeWithoutVertex.txt @@ -0,0 +1,5 @@ +bB +C +d +-- +Aa;bB;1;3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/emptyFile.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/emptyFile.txt new file mode 100644 index 0000000..e69de29 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/negativeNumber.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/negativeNumber.txt new file mode 100644 index 0000000..18f3bd5 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/negativeNumber.txt @@ -0,0 +1,4 @@ +Aa +bB +-- +Aa;bB;1;-3 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/noDivider.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/noDivider.txt new file mode 100644 index 0000000..fc8d307 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/noDivider.txt @@ -0,0 +1,9 @@ +Aa +bB +C +d +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/noFirstPart.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/noFirstPart.txt new file mode 100644 index 0000000..db1350f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/noFirstPart.txt @@ -0,0 +1,6 @@ +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/noSecondPart.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/noSecondPart.txt new file mode 100644 index 0000000..a0601cf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/noSecondPart.txt @@ -0,0 +1,5 @@ +Aa +bB +C +d +-- \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/notContinous.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/notContinous.txt new file mode 100644 index 0000000..532c89f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/notContinous.txt @@ -0,0 +1,6 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/numberOverflow.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/numberOverflow.txt new file mode 100644 index 0000000..c41d589 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/numberOverflow.txt @@ -0,0 +1,10 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;30000000000 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/numberZero.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/numberZero.txt new file mode 100644 index 0000000..87f5380 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/graphs/numberZero.txt @@ -0,0 +1,5 @@ +C +d +-- +bB;C;5;2 +C;d;0;0 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/inputFile.txt b/Uni/Java/WS1516/Programmieren/Final02/bin/inputFile.txt new file mode 100644 index 0000000..75a1c70 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/inputFile.txt @@ -0,0 +1,15 @@ +Aa +bB +C +d +e +f +-- +Aa;bB;1;+003 +Aa;C;2;4 +Aa;d;11;20 +bb;D;1;1 +bB;C;5;2 +C;d;1;1 +d;e;1;1 +f;e;1;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/bagTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/bagTest.log new file mode 100644 index 0000000..ae64ae6 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/bagTest.log @@ -0,0 +1,53 @@ +0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 +OK +OK +0 1 2 3 4 5 6 7 9 10 11 12 13 14 15 +OK +0 1 2 3 4 5 6 7 9 10 11 12 13 14 +Error, there has been an issue with the number of parameters used with place (therefore turn will be reset) +0 1 2 3 4 5 6 7 9 10 11 12 13 14 15 +OK +OK +0 1 2 3 4 5 6 7 9 10 11 12 13 15 +OK +OK +0 1 2 3 4 5 6 7 9 10 11 12 15 +OK +OK +0 1 2 3 4 5 6 9 10 11 12 15 +OK +OK +0 1 2 3 4 5 9 10 11 12 15 +OK +OK +0 1 2 4 5 9 10 11 12 15 +OK +OK +0 1 4 5 9 10 11 12 15 +OK +OK +0 4 5 9 10 11 12 15 +OK +OK +0 4 5 9 11 12 15 +OK +OK +0 4 5 9 11 15 +OK +OK +0 5 9 11 15 +OK +OK +0 5 9 11 +OK +OK +0 5 11 +OK +OK +5 11 +OK +OK +11 +OK +draw + diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/drawTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/drawTest.log new file mode 100644 index 0000000..e06e961 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/drawTest.log @@ -0,0 +1,46 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +0 # 1 # 2 # +# 3 # 4 # 5 +# 6 # 7 # 8 +9 # 10 # 11 # +# 12 # 13 # 14 +# 15 # # # # +0 # # 9 # # +# 3 6 # 12 15 +1 # # 10 # # +# 4 7 # 13 # +2 # # 11 # # +# 5 8 # 14 # +Error, Game is over. Command illegal. +Error, Game is over. Command illegal. diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/draw_colprint_rowprintTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/draw_colprint_rowprintTest.log new file mode 100644 index 0000000..e24b255 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/draw_colprint_rowprintTest.log @@ -0,0 +1,51 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +draw +0 # 1 # 2 # +# 3 # 4 # 5 +# 6 # 7 # 8 +9 # 10 # 11 # +# 12 # 13 # 14 +# 15 # # # # +0 # # 9 # # +# 3 6 # 12 15 +1 # # 10 # # +# 4 7 # 13 # +2 # # 11 # # +# 5 8 # 14 # +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' +Error, Game is over. Command illegal. +Error, Game is over. Command illegal. + diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/insertTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/insertTest.log new file mode 100644 index 0000000..bc509f5 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/insertTest.log @@ -0,0 +1,14 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, duplicate vertex found +Error, edge is allready contained +Error, not a number (format may be wrong or number might be to big) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +OK +OK diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/nodesInsertTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/nodesInsertTest.log new file mode 100644 index 0000000..b87d962 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/nodesInsertTest.log @@ -0,0 +1,10 @@ +Error, vertex not found +Aa +bB +d +OK +C +Aa +bB +d +ee diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/nodesRemoveTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/nodesRemoveTest.log new file mode 100644 index 0000000..23be1be --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/nodesRemoveTest.log @@ -0,0 +1,6 @@ +OK +C +C +d +Error, edge can't be removed +OK diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/nodesTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/nodesTest.log new file mode 100644 index 0000000..04acdba --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/nodesTest.log @@ -0,0 +1,18 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, vertex not found +bB +C +d +bB +C +d +Aa +bB +d +Aa +C +Aa +C diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/place_standardTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/place_standardTest.log new file mode 100644 index 0000000..93a8167 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/place_standardTest.log @@ -0,0 +1,7 @@ +OK +OK +OK +Error, Coordinate(s) not on board (or allready occupied). +Error, 'select' has to be called before using this command again. +OK +Error, Coordinate(s) not on board (or allready occupied). diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/place_torusTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/place_torusTest.log new file mode 100644 index 0000000..e1b8a28 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/place_torusTest.log @@ -0,0 +1,10 @@ +OK +OK +OK +OK +Error, 'select' has to be called before using this command again. +OK +OK +OK +Error, there has been an issue with the number of parameters used with place (therefore turn will be reset) +OK diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/publicTestTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/publicTestTest.log new file mode 100644 index 0000000..7b54dfd --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/publicTestTest.log @@ -0,0 +1,10 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 +# 5 # # # # diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/removeTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/removeTest.log new file mode 100644 index 0000000..fcec023 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/removeTest.log @@ -0,0 +1,10 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +OK +OK +OK +OK +OK + diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/removeTillEmptyTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/removeTillEmptyTest.log new file mode 100644 index 0000000..e22e2cd --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/removeTillEmptyTest.log @@ -0,0 +1,6 @@ +OK +OK +OK +OK +OK + diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/removeTillNotCoherentTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/removeTillNotCoherentTest.log new file mode 100644 index 0000000..042c57e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/removeTillNotCoherentTest.log @@ -0,0 +1,7 @@ +OK +OK +OK +OK +OK +Error, vertex not found +Error, edge contains vertices that have not been initilized diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/routeTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/routeTest.log new file mode 100644 index 0000000..692b9de --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/routeTest.log @@ -0,0 +1,97 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, vertex not found +Error, vertex not found +Error, vertex not found +Aa +Aa +Aa +Aa +Aa bB +Aa bB +Aa bB +Aa bB +Aa C bB +Aa d C bB +Aa C +Aa C +Aa C +Aa bB C +Aa C +Aa d C +Aa C d +Aa C d +Aa C d +Aa bB C d +Aa C d +Aa d +bB +bB +bB +bB +bB Aa +bB Aa +bB Aa +bB Aa +bB C Aa +bB C d Aa +bB C +bB Aa C +bB C +bB Aa C +bB Aa d C +bB C +bB C d +bB Aa C d +bB C d +bB Aa C d +bB Aa d +bB C Aa d +bB C d +C +C +C +C +C Aa +C Aa +C Aa +C Aa +C bB Aa +C d Aa +C bB +C Aa bB +C bB +C Aa bB +C bB +C d Aa bB +C d +C d +C d +C Aa d +C bB Aa d +C d +d +d +d +d +d C Aa +d C Aa +d C Aa +d Aa +d C Aa +d C bB Aa +d C bB +d C Aa bB +d C bB +d Aa bB +d Aa C bB +d C Aa bB +d C bB +d C +d C +d C +d Aa bB C +d Aa C +d C diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/searchTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/searchTest.log new file mode 100644 index 0000000..193f551 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/searchTest.log @@ -0,0 +1,55 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, vertex not found +Error, vertex not found +Error, vertex not found +Error, vertex not found +0 +0 +0 +3 +1 +10 +4 +2 +20 +5 +5 +50 +0 +0 +0 +3 +1 +10 +2 +3 +29 +3 +6 +73 +0 +0 +0 +4 +2 +20 +2 +3 +29 +1 +3 +10 +0 +0 +0 +5 +5 +50 +3 +6 +73 +1 +3 +10 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/selectTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/selectTest.log new file mode 100644 index 0000000..8a1d0c3 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/selectTest.log @@ -0,0 +1,6 @@ +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' +OK +Error, 'place' has to be called before using this command again. diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/select_negativeTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/select_negativeTest.log new file mode 100644 index 0000000..329f91b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/select_negativeTest.log @@ -0,0 +1 @@ +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/select_toBigTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/select_toBigTest.log new file mode 100644 index 0000000..329f91b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/select_toBigTest.log @@ -0,0 +1 @@ +Error, please use a valid command (valid commands: 'select ' 'bag' 'colprint ' 'rowprint ' 'place ;' 'quit' diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (1)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (1)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (1)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (10)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (10)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (10)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (11)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (11)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (11)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (12)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (12)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (12)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (13)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (13)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (13)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (14)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (14)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (14)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (15)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (15)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (15)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (16)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (16)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (16)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (2)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (2)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (2)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (3)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (3)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (3)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (4)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (4)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (4)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (5)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (5)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (5)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (6)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (6)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (6)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (7)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (7)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (7)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (8)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (8)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (8)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (9)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (9)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_black (9)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (1)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (1)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (1)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (10)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (10)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (10)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (11)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (11)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (11)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (12)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (12)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (12)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (13)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (13)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (13)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (14)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (14)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (14)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (15)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (15)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (15)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (16)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (16)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (16)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (2)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (2)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (2)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (3)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (3)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (3)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (4)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (4)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (4)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (5)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (5)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (5)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (6)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (6)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (6)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (7)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (7)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (7)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (8)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (8)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (8)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (9)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (9)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgy (9)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgyTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgyTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_edgyTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_hollowTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_hollowTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_hollowTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_largeTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_largeTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_largeTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_massiveTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_massiveTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_massiveTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (1)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (1)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (1)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (10)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (10)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (10)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (11)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (11)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (11)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (12)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (12)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (12)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (13)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (13)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (13)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (14)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (14)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (14)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (15)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (15)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (15)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (16)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (16)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (16)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (2)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (2)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (2)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (3)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (3)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (3)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (4)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (4)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (4)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (5)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (5)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (5)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (6)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (6)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (6)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (7)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (7)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (7)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (8)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (8)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (8)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (9)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (9)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_round (9)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_roundTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_roundTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_roundTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_smallTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_smallTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_smallTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (1)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (1)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (1)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (10)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (10)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (10)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (11)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (11)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (11)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (12)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (12)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (12)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (13)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (13)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (13)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (14)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (14)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (14)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (15)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (15)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (15)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (16)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (16)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (16)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (2)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (2)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (2)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (3)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (3)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (3)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (4)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (4)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (4)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (5)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (5)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (5)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (6)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (6)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (6)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (7)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (7)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (7)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (8)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (8)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (8)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (9)Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (9)Test.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_white (9)Test.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_whiteTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_whiteTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/standard_whiteTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/test1Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/test1Test.log new file mode 100644 index 0000000..a23c7c9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/test1Test.log @@ -0,0 +1 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/test2Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/test2Test.log new file mode 100644 index 0000000..a23c7c9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/test2Test.log @@ -0,0 +1 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_horizontalTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_horizontalTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_horizontalTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_topLeftTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_topLeftTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_topLeftTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_topRightTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_topRightTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_topRightTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_verticalTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_verticalTest.log new file mode 100644 index 0000000..b15c47a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/torus_verticalTest.log @@ -0,0 +1,9 @@ +OK +OK +OK +OK +OK +OK +OK +P1 wins +3 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/treeGraphTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/treeGraphTest.log new file mode 100644 index 0000000..8986d12 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/treeGraphTest.log @@ -0,0 +1,68 @@ +A +B +C +D +E +F +G +-- +A;B;2;5 +A;C;100;2 +B;D;100;60 +B;E;300;20 +C;F;4;4 +C;G;20;6 +B +C +A +D +E +A +F +G +B +B +C +C +A B +A B +A B +A B +5 +2 +29 +A C +A C +A C +A C +2 +100 +10004 +A B D +A B D +A B D +A B D +65 +102 +14629 +A B E +A B E +A B E +A B E +25 +302 +91829 +A C F +A C F +A C F +A C F +6 +104 +10852 +A C G +A C G +A C G +A C G +8 +120 +14464 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_10Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_10Test.log new file mode 100644 index 0000000..63ccb70 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_10Test.log @@ -0,0 +1,23 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P2 wins +10 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_11Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_11Test.log new file mode 100644 index 0000000..2fc3b8d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_11Test.log @@ -0,0 +1,25 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P1 wins +11 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_12Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_12Test.log new file mode 100644 index 0000000..bf779ef --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_12Test.log @@ -0,0 +1,27 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P2 wins +12 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_13Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_13Test.log new file mode 100644 index 0000000..cfbf896 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_13Test.log @@ -0,0 +1,29 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P1 wins +13 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_14Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_14Test.log new file mode 100644 index 0000000..5343b07 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_14Test.log @@ -0,0 +1,31 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P2 wins +14 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_15Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_15Test.log new file mode 100644 index 0000000..081a062 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_15Test.log @@ -0,0 +1,33 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P1 wins +15 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_3Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_3Test.log new file mode 100644 index 0000000..a2840e4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_3Test.log @@ -0,0 +1,11 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +P2 wins +4 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_4Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_4Test.log new file mode 100644 index 0000000..a2840e4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_4Test.log @@ -0,0 +1,11 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +P2 wins +4 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_5Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_5Test.log new file mode 100644 index 0000000..2cd3082 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_5Test.log @@ -0,0 +1,13 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P1 wins +5 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_6Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_6Test.log new file mode 100644 index 0000000..4339f81 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_6Test.log @@ -0,0 +1,15 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P2 wins +6 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_7Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_7Test.log new file mode 100644 index 0000000..657852b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_7Test.log @@ -0,0 +1,17 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P1 wins +7 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_8Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_8Test.log new file mode 100644 index 0000000..fcce324 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_8Test.log @@ -0,0 +1,19 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P2 wins +8 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_9Test.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_9Test.log new file mode 100644 index 0000000..422789f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_9Test.log @@ -0,0 +1,21 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +P1 wins +9 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_errorTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_errorTest.log new file mode 100644 index 0000000..cb491cf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/turncount_errorTest.log @@ -0,0 +1,19 @@ +OK +OK +OK +OK +OK +OK +OK +Error, there has been an issue with the number of parameters used with place (therefore turn will be reset) +OK +Error, Coordinate(s) not on board (or allready occupied). +OK +Error, For input string: "x" +OK +OK +OK +OK +OK +P1 wins +5 diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/logs/verticesTest.log b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/verticesTest.log new file mode 100644 index 0000000..17427b0 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/logs/verticesTest.log @@ -0,0 +1,12 @@ +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Error, please use a valid command (valid commands: 'quit' 'info' 'vertices' 'nodes ' 'remove ;' 'insert ;;;' 'route ;;' 'search ;;' [numbers can't be zero or less]) +Aa +bB +C +d +OK +OK +OK +OK +OK + diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/nodes.test b/Uni/Java/WS1516/Programmieren/Final02/bin/nodes.test new file mode 100644 index 0000000..8ba3e32 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/nodes.test @@ -0,0 +1,22 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#Errors +00err : "nodes " +00err : "nodes null" +00err : "nodes ;;" +00err : "nodes e" +00err : "nodes cc" + +#Nodes of all +"bB +C +d" : "nodes Aa" +"bB +C +d" : "nodes aa" +"Aa +bB +d" : "nodes C" +"Aa +C" : "nodes d" +"Aa +C" : "nodes bB" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/nodesInsert.test b/Uni/Java/WS1516/Programmieren/Final02/bin/nodesInsert.test new file mode 100644 index 0000000..0a8bd24 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/nodesInsert.test @@ -0,0 +1,11 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +00err : "nodes ee" +"Aa +bB +d" : "nodes C" +"OK" : "insert C;ee;2;13" +"C" : "nodes ee" +"Aa +bB +d +ee" : "nodes C" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/nodesRemove.test b/Uni/Java/WS1516/Programmieren/Final02/bin/nodesRemove.test new file mode 100644 index 0000000..cbe1bcb --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/nodesRemove.test @@ -0,0 +1,7 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +"OK" : "remove bB;Aa" +"C" : "nodes bB" +"C +d" : "nodes Aa" +00err : "remove Aa;bB" +"OK" : "remove C;Aa" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/place_standard.test b/Uni/Java/WS1516/Programmieren/Final02/bin/place_standard.test new file mode 100644 index 0000000..819cf4c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/place_standard.test @@ -0,0 +1,8 @@ +<"standard"> +"OK" : "select 0" +"OK" : "place 1;1" +"OK" : "select 1" +00err : "place 1;-1" +00err : "place 2;2" +"OK" : "select 1" +00err : "place 6;0" diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/place_torus.test b/Uni/Java/WS1516/Programmieren/Final02/bin/place_torus.test new file mode 100644 index 0000000..94b3327 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/place_torus.test @@ -0,0 +1,11 @@ +<"torus"> +"OK" : "select 0" +"OK" : "place 1;1" +"OK" : "select 1" +"OK" : "place 1;-1" +00err : "place 2;2" +"OK" : "select 2" +"OK" : "place 6;6" +"OK" : "select 3" +00err : "place" +"OK" : "select 3" diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/publicTest.test b/Uni/Java/WS1516/Programmieren/Final02/bin/publicTest.test new file mode 100644 index 0000000..b58f274 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/publicTest.test @@ -0,0 +1,15 @@ +<"torus"> +"OK" : "select 11" +"OK" : "place 1;4" + +"OK" : "select 7" +"OK" : "place 3;0" + +"OK" : "select 5" +"OK" : "place 4;1" + +"OK" : "select 15" +"P1 wins +3" : "place 2;5" + +"# 5 # # # #" : "rowprint 4" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/remove.test b/Uni/Java/WS1516/Programmieren/Final02/bin/remove.test new file mode 100644 index 0000000..d5dcc3b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/remove.test @@ -0,0 +1,16 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#init +#Errors +00err : "remove " +00err : "remove null;" +00err : "remove null;null;null" +00err : "remove ;" + +"OK" : "remove C;d" +"OK" : "remove bB;C" +"OK" : "remove d;aa" +"OK" : "remove aa;c" +"OK" : "remove aa;bb" + +" +" : "info" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/removeTillEmpty.test b/Uni/Java/WS1516/Programmieren/Final02/bin/removeTillEmpty.test new file mode 100644 index 0000000..980746f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/removeTillEmpty.test @@ -0,0 +1,9 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +"OK" : "remove C;bB" +"OK" : "remove C;d" +"OK" : "remove Aa;d" +"OK" : "remove Aa;bB" +"OK" : "remove Aa;C" + +" +" : "info" diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/removeTillNotCoherent.test b/Uni/Java/WS1516/Programmieren/Final02/bin/removeTillNotCoherent.test new file mode 100644 index 0000000..3a50bf1 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/removeTillNotCoherent.test @@ -0,0 +1,8 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +"OK" : "remove bB;C" +"!Cok" : "remove C;d" +"OK" : "remove Aa;d" +"OK" : "remove Aa;C" +"OK" : "remove Aa;bB" +00err : "nodes Aa" +00err : "insert Aa;ee;10;5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/route.test b/Uni/Java/WS1516/Programmieren/Final02/bin/route.test new file mode 100644 index 0000000..8cdba66 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/route.test @@ -0,0 +1,120 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#72 Testcases +#Errors +00err : "route " +00err : "route null;null;null" +00err : "route null;null;null;null" +00err : "route null;null;time" +00err : "route null;null;route" +00err : "route null;null;optimal" +00err : "route ceee;deeee;optimal;" + +#Aa to all others +"Aa" : "route Aa;Aa;time" +"Aa" : "route Aa;Aa;route" +"Aa" : "route Aa;Aa;optimal" +"Aa" : "route Aa;Aa;all" + +"Aa bB" : "route Aa;bB;time" +"Aa bB" : "route Aa;bB;route" +"Aa bB" : "route Aa;bB;optimal" +"Aa bB +Aa C bB +Aa d C bB" : "route Aa;bB;all" + +"Aa C" : "route Aa;C;time" +"Aa C" : "route Aa;C;route" +"Aa C" : "route Aa;C;optimal" +"Aa bB C +Aa C +Aa d C" : "route Aa;C;all" + +"Aa C d" : "route Aa;d;time" +"Aa C d" : "route Aa;d;route" +"Aa C d" : "route Aa;d;optimal" +"Aa bB C d +Aa C d +Aa d" : "route Aa;d;all" + +#bB to all others +"bB" : "route bB;bB;time" +"bB" : "route bB;bB;route" +"bB" : "route bB;bB;optimal" +"bB" : "route bB;bB;all" + +"bB Aa" : "route bB;Aa;time" +"bB Aa" : "route bB;Aa;route" +"bB Aa" : "route bB;Aa;optimal" +"bB Aa +bB C Aa +bB C d Aa" : "route bB;Aa;all" + +"bB C" : "route bB;C;time" +"bB Aa C" : "route bB;C;route" +"bB C" : "route bB;C;optimal" +"bB Aa C +bB Aa d C +bB C" : "route bB;C;all" + +"bB C d" : "route bB;d;time" +"bB Aa C d" : "route bB;d;route" +"bB C d" : "route bB;d;optimal" +"bB Aa C d +bB Aa d +bB C Aa d +bB C d" : "route bB;d;all" + +#C to all others +"C" : "route C;C;time" +"C" : "route C;C;route" +"C" : "route C;C;optimal" +"C" : "route C;C;all" + +"C Aa" : "route C;Aa;time" +"C Aa" : "route C;Aa;route" +"C Aa" : "route C;Aa;optimal" +"C Aa +C bB Aa +C d Aa" : "route C;Aa;all" + +"C bB" : "route C;bB;time" +"C Aa bB" : "route C;bB;route" +"C bB" : "route C;bB;optimal" +"C Aa bB +C bB +C d Aa bB" : "route C;bB;all" + +"C d" : "route C;d;time" +"C d" : "route C;d;route" +"C d" : "route C;d;optimal" +"C Aa d +C bB Aa d +C d" : "route C;d;all" + +#d to all others +"d" : "route d;d;time" +"d" : "route d;d;route" +"d" : "route d;d;optimal" +"d" : "route d;d;all" + +"d C Aa" : "route d;Aa;time" +"d C Aa" : "route d;Aa;route" +"d C Aa" : "route d;Aa;optimal" +"d Aa +d C Aa +d C bB Aa" : "route d;Aa;all" + +"d C bB" : "route d;bB;time" +"d C Aa bB" : "route d;bB;route" +"d C bB" : "route d;bB;optimal" +"d Aa bB +d Aa C bB +d C Aa bB +d C bB" : "route d;bB;all" + +"d C" : "route d;C;time" +"d C" : "route d;C;route" +"d C" : "route d;C;optimal" +"d Aa bB C +d Aa C +d C" : "route d;C;all" diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest1.test b/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest1.test new file mode 100644 index 0000000..ca87302 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest1.test @@ -0,0 +1,19 @@ +<"torus"> +"OK" : "select 14" +"OK" : "place 0;1" + +"OK" : "select 13" +"OK" : "place 5;0" + +"OK" : "select 15" +"OK" : "place 2;3" + +"OK" : "select 12" +"P1 wins +3" : "place 1;2" + +"13 # # # # #" : "rowprint 5" +"# # # # # 13" : "colprint 0" + +"# 14 # # # #" : "rowprint 0" +"14 # # # # #" : "colprint 1" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest2.test b/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest2.test new file mode 100644 index 0000000..c315bfb --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest2.test @@ -0,0 +1,13 @@ +<"torus"> +"OK" : "select 4" +"OK" : "place 0;0" + +"OK" : "select 8" +"OK" : "place 0;1" + +"OK" : "select 9" +"OK" : "place 0;4" + +"OK" : "select 5" +"P1 wins +3" : "place 0;5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest3.test b/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest3.test new file mode 100644 index 0000000..29f2b32 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest3.test @@ -0,0 +1,19 @@ +<"torus"> +"OK" : "select 4" +"OK" : "place 0;2" + +"OK" : "select 8" +"OK" : "place 1;2" + +"OK" : "select 9" +"OK" : "place 3;2" + +"OK" : "select 5" +"OK" : "place 5;2" + +"OK" : "select 13" +"P2 wins +4" : "place 4;2" + +00err : "colprint -3" +00err : "rowprint -5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest4.test b/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest4.test new file mode 100644 index 0000000..850eb36 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/samsTorusTest4.test @@ -0,0 +1,19 @@ +<"torus"> +"OK" : "select 4" +"OK" : "place 0;5" + +"OK" : "select 8" +"OK" : "place 1;4" + +"OK" : "select 9" +"OK" : "place 5;0" + +"OK" : "select 5" +"OK" : "place 3;2" + +"OK" : "select 13" +"P2 wins +4" : "place 4;1" + +00err : "colprint -3" +00err : "rowprint -5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/search.test b/Uni/Java/WS1516/Programmieren/Final02/bin/search.test new file mode 100644 index 0000000..6b13d14 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/search.test @@ -0,0 +1,78 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#55 Testcases +#Errors +00err : "search " +00err : "search null;null;null" +00err : "search null;null;null;null" +00err : "search null;null;time" +00err : "search null;null;route" +00err : "search null;null;optimal" +00err : "search ceee;deeee;optimal;" + +#Aa to all others +0 : "search Aa;Aa;time" +0 : "search Aa;Aa;route" +0 : "search Aa;Aa;optimal" + +3 : "search Aa;bB;time" +1 : "search Aa;bB;route" +10 : "search Aa;bB;optimal" + +4 : "search Aa;C;time" +2 : "search Aa;C;route" +20 : "search Aa;C;optimal" + +5 : "search Aa;d;time" +5 : "search Aa;d;route" +50 : "search Aa;d;optimal" + +#bB to all others +0 : "search bB;bB;time" +0 : "search bB;bB;route" +0 : "search bB;bB;optimal" + +3 : "search bB;Aa;time" +1 : "search bB;Aa;route" +10 : "search bB;Aa;optimal" + +2 : "search bB;C;time" +3 : "search bB;C;route" +29 : "search bB;C;optimal" + +3 : "search bB;d;time" +6 : "search bB;d;route" +73 : "search bB;d;optimal" + +#C to all others +0 : "search C;C;time" +0 : "search C;C;route" +0 : "search C;C;optimal" + +4 : "search C;Aa;time" +2 : "search C;Aa;route" +20 : "search C;Aa;optimal" + +2 : "search C;bB;time" +3 : "search C;bB;route" +29 : "search C;bB;optimal" + +1 : "search C;d;time" +3 : "search C;d;route" +10 : "search C;d;optimal" + +#d to all others +0 : "search d;d;time" +0 : "search d;d;route" +0 : "search d;d;optimal" + +5 : "search d;Aa;time" +5 : "search d;Aa;route" +50 : "search d;Aa;optimal" + +3 : "search d;bB;time" +6 : "search d;bB;route" +73 : "search d;bB;optimal" + +1 : "search d;C;time" +3 : "search d;C;route" +10 : "search d;C;optimal" diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/select.test b/Uni/Java/WS1516/Programmieren/Final02/bin/select.test new file mode 100644 index 0000000..d1dc272 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/select.test @@ -0,0 +1,7 @@ +<"torus"> +00err : "select" +00err : "select +" +00err : "select x;1" +00err : "select 0002;23" +"OK" : "select 0" +00err : "select 1" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/select_negative.test b/Uni/Java/WS1516/Programmieren/Final02/bin/select_negative.test new file mode 100644 index 0000000..3ae5839 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/select_negative.test @@ -0,0 +1,2 @@ +<"torus"> +00err : "select -1" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/select_toBig.test b/Uni/Java/WS1516/Programmieren/Final02/bin/select_toBig.test new file mode 100644 index 0000000..40296d7 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/select_toBig.test @@ -0,0 +1,2 @@ +<"torus"> +00err : "select 16" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (1).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (1).test new file mode 100644 index 0000000..46921e5 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (1).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;0" +"OK" : "select 6" +"OK" : "place 3;3" +"OK" : "select 2" +"OK" : "place 2;2" +"OK" : "select 3" +"P1 wins +3" : "place 1;1" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (10).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (10).test new file mode 100644 index 0000000..588729f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (10).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;1" +"OK" : "select 6" +"OK" : "place 0;2" +"OK" : "select 2" +"OK" : "place 0;3" +"OK" : "select 3" +"P1 wins +3" : "place 0;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (11).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (11).test new file mode 100644 index 0000000..d6326f3 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (11).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;0" +"OK" : "select 6" +"OK" : "place 0;3" +"OK" : "select 2" +"OK" : "place 0;1" +"OK" : "select 3" +"P1 wins +3" : "place 0;2" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (12).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (12).test new file mode 100644 index 0000000..eb81f0c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (12).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;0" +"OK" : "select 6" +"OK" : "place 0;2" +"OK" : "select 2" +"OK" : "place 0;1" +"OK" : "select 3" +"P1 wins +3" : "place 0;3" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (13).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (13).test new file mode 100644 index 0000000..10a11e5 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (13).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;0" +"OK" : "select 6" +"OK" : "place 2;0" +"OK" : "select 2" +"OK" : "place 3;0" +"OK" : "select 3" +"P1 wins +3" : "place 1;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (14).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (14).test new file mode 100644 index 0000000..e656f2b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (14).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 1;0" +"OK" : "select 6" +"OK" : "place 2;0" +"OK" : "select 2" +"OK" : "place 3;0" +"OK" : "select 3" +"P1 wins +3" : "place 0;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (15).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (15).test new file mode 100644 index 0000000..12845ce --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (15).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;0" +"OK" : "select 6" +"OK" : "place 3;0" +"OK" : "select 2" +"OK" : "place 1;0" +"OK" : "select 3" +"P1 wins +3" : "place 2;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (16).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (16).test new file mode 100644 index 0000000..1a0e013 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (16).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;0" +"OK" : "select 6" +"OK" : "place 2;0" +"OK" : "select 2" +"OK" : "place 1;0" +"OK" : "select 3" +"P1 wins +3" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (2).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (2).test new file mode 100644 index 0000000..afa856d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (2).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;0" +"OK" : "select 6" +"OK" : "place 1;1" +"OK" : "select 2" +"OK" : "place 2;2" +"OK" : "select 3" +"P1 wins +3" : "place 3;3" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (3).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (3).test new file mode 100644 index 0000000..900833c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (3).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;0" +"OK" : "select 6" +"OK" : "place 1;1" +"OK" : "select 2" +"OK" : "place 3;3" +"OK" : "select 3" +"P1 wins +3" : "place 2;2" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (4).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (4).test new file mode 100644 index 0000000..2733624 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (4).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 1;1" +"OK" : "select 6" +"OK" : "place 3;3" +"OK" : "select 2" +"OK" : "place 2;2" +"OK" : "select 3" +"P1 wins +3" : "place 0;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (5).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (5).test new file mode 100644 index 0000000..3ee93ae --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (5).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;5" +"OK" : "select 6" +"OK" : "place 1;4" +"OK" : "select 2" +"OK" : "place 3;2" +"OK" : "select 3" +"P1 wins +3" : "place 2;3" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (6).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (6).test new file mode 100644 index 0000000..dcf855d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (6).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;5" +"OK" : "select 6" +"OK" : "place 1;4" +"OK" : "select 2" +"OK" : "place 2;3" +"OK" : "select 3" +"P1 wins +3" : "place 3;2" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (7).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (7).test new file mode 100644 index 0000000..51b9095 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (7).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;5" +"OK" : "select 6" +"OK" : "place 3;2" +"OK" : "select 2" +"OK" : "place 2;3" +"OK" : "select 3" +"P1 wins +3" : "place 1;4" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (8).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (8).test new file mode 100644 index 0000000..1235b3c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (8).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 1;4" +"OK" : "select 6" +"OK" : "place 3;2" +"OK" : "select 2" +"OK" : "place 2;3" +"OK" : "select 3" +"P1 wins +3" : "place 0;5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (9).test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (9).test new file mode 100644 index 0000000..7945933 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_black (9).test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 7" +"OK" : "place 0;0" +"OK" : "select 6" +"OK" : "place 0;2" +"OK" : "select 2" +"OK" : "place 0;3" +"OK" : "select 3" +"P1 wins +3" : "place 0;1" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_edgy.test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_edgy.test new file mode 100644 index 0000000..90be00b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_edgy.test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 0" +"OK" : "place 0;5" +"OK" : "select 3" +"OK" : "place 1;4" +"OK" : "select 10" +"OK" : "place 2;3" +"OK" : "select 11" +"P1 wins +3" : "place 3;2" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_hollow.test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_hollow.test new file mode 100644 index 0000000..a86a24f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_hollow.test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 0" +"OK" : "place 0;0" +"OK" : "select 14" +"OK" : "place 1;1" +"OK" : "select 12" +"OK" : "place 2;2" +"OK" : "select 8" +"P1 wins +3" : "place 3;3" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_large.test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_large.test new file mode 100644 index 0000000..13f1edd --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_large.test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 3" +"OK" : "place 0;5" +"OK" : "select 15" +"OK" : "place 3;2" +"OK" : "select 11" +"OK" : "place 2;3" +"OK" : "select 7" +"P1 wins +3" : "place 1;4" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_massive.test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_massive.test new file mode 100644 index 0000000..7ca2414 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_massive.test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 1" +"OK" : "place 0;0" +"OK" : "select 15" +"OK" : "place 3;0" +"OK" : "select 9" +"OK" : "place 1;0" +"OK" : "select 11" +"P1 wins +3" : "place 2;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_round.test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_round.test new file mode 100644 index 0000000..774deeb --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_round.test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 15" +"OK" : "place 1;1" +"OK" : "select 4" +"OK" : "place 3;3" +"OK" : "select 5" +"OK" : "place 2;2" +"OK" : "select 12" +"P1 wins +3" : "place 0;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_small.test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_small.test new file mode 100644 index 0000000..cc077cf --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_small.test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 0" +"OK" : "place 0;0" +"OK" : "select 13" +"OK" : "place 2;0" +"OK" : "select 5" +"OK" : "place 3;0" +"OK" : "select 9" +"P1 wins +3" : "place 1;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/standard_white.test b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_white.test new file mode 100644 index 0000000..f98faf9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/standard_white.test @@ -0,0 +1,10 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 0;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" +"OK" : "select 11" +"P1 wins +3" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/test.graph b/Uni/Java/WS1516/Programmieren/Final02/bin/test.graph new file mode 100644 index 0000000..ebdc5cc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/test.graph @@ -0,0 +1,10 @@ +Aa +bB +C +d +-- +Aa;bB;1;3 +Aa;C;2;4 +Aa;d;11;20 +bB;C;5;2 +C;d;3;1 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/testsuite.zip b/Uni/Java/WS1516/Programmieren/Final02/bin/testsuite.zip new file mode 100644 index 0000000..d0079a5 Binary files /dev/null and b/Uni/Java/WS1516/Programmieren/Final02/bin/testsuite.zip differ diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/torus_horizontal.test b/Uni/Java/WS1516/Programmieren/Final02/bin/torus_horizontal.test new file mode 100644 index 0000000..3b640a4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/torus_horizontal.test @@ -0,0 +1,10 @@ +<"torus"> +"OK" : "select 2" +"OK" : "place 0;4" +"OK" : "select 15" +"OK" : "place 0;0" +"OK" : "select 7" +"OK" : "place 0;1" +"OK" : "select 11" +"P1 wins +3" : "place 0;5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/torus_topLeft.test b/Uni/Java/WS1516/Programmieren/Final02/bin/torus_topLeft.test new file mode 100644 index 0000000..8c08a7d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/torus_topLeft.test @@ -0,0 +1,10 @@ +<"torus"> +"OK" : "select 0" +"OK" : "place 0;4" +"OK" : "select 3" +"OK" : "place 5;3" +"OK" : "select 11" +"OK" : "place 2;0" +"OK" : "select 10" +"P1 wins +3" : "place 1;5" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/torus_topRight.test b/Uni/Java/WS1516/Programmieren/Final02/bin/torus_topRight.test new file mode 100644 index 0000000..9917866 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/torus_topRight.test @@ -0,0 +1,10 @@ +<"torus"> +"OK" : "select 6" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 2;5" +"OK" : "select 3" +"OK" : "place 5;2" +"OK" : "select 7" +"P1 wins +3" : "place 1;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/torus_vertical.test b/Uni/Java/WS1516/Programmieren/Final02/bin/torus_vertical.test new file mode 100644 index 0000000..98e005f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/torus_vertical.test @@ -0,0 +1,10 @@ +<"torus"> +"OK" : "select 12" +"OK" : "place 4;2" +"OK" : "select 8" +"OK" : "place 0;2" +"OK" : "select 14" +"OK" : "place 1;2" +"OK" : "select 0" +"P1 wins +3" : "place 5;2" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/treeGraph.graph b/Uni/Java/WS1516/Programmieren/Final02/bin/treeGraph.graph new file mode 100644 index 0000000..773b01b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/treeGraph.graph @@ -0,0 +1,14 @@ +A +B +C +D +E +F +G +-- +A;B;2;5 +A;C;100;2 +B;D;100;60 +B;E;300;20 +C;F;4;4 +C;G;20;6 \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/treeGraph.test b/Uni/Java/WS1516/Programmieren/Final02/bin/treeGraph.test new file mode 100644 index 0000000..69d5c7c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/treeGraph.test @@ -0,0 +1,80 @@ +<"C:\Eclipse\workspace\Final01\tests\treeGraph.graph"> +#Init test +"A +B +C +D +E +F +G +-- +A;B;2;5 +A;C;100;2 +B;D;100;60 +B;E;300;20 +C;F;4;4 +C;G;20;6" : "info" + +#Nodes +"B +C" : "nodes A" +"A +D +E" : "nodes B" +"A +F +G" : "nodes C" +"B" : "nodes D" +"B" : "nodes E" +"C" : "nodes F" +"C" : "nodes G" + +#Routes +#From root +"A B" : "route A;B;time" +"A B" : "route A;B;route" +"A B" : "route A;B;optimal" +"A B" : "route A;B;all" +5 : "search A;B;time" +2 : "search A;B;route" +29 : "search A;B;optimal" + +"A C" : "route A;C;time" +"A C" : "route A;C;route" +"A C" : "route A;C;optimal" +"A C" : "route A;C;all" +2 : "search A;C;time" +100 : "search A;C;route" +10004 : "search A;C;optimal" + +"A B D" : "route A;D;time" +"A B D" : "route A;D;route" +"A B D" : "route A;D;optimal" +"A B D" : "route A;D;all" +65 : "search A;D;time" +102 : "search A;D;route" +14629 : "search A;D;optimal" + +"A B E" : "route A;E;time" +"A B E" : "route A;E;route" +"A B E" : "route A;E;optimal" +"A B E" : "route A;E;all" +25 : "search A;E;time" +302 : "search A;E;route" +91829 : "search A;E;optimal" + +"A C F" : "route A;F;time" +"A C F" : "route A;F;route" +"A C F" : "route A;F;optimal" +"A C F" : "route A;F;all" +6 : "search A;F;time" +104 : "search A;F;route" +10852 : "search A;F;optimal" + +"A C G" : "route A;G;time" +"A C G" : "route A;G;route" +"A C G" : "route A;G;optimal" +"A C G" : "route A;G;all" +8 : "search A;G;time" +120 : "search A;G;route" +14464 : "search A;G;optimal" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_10.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_10.test new file mode 100644 index 0000000..873610f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_10.test @@ -0,0 +1,30 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 1;1" + +"OK" : "select 1" +"OK" : "place 2;2" +"OK" : "select 10" +"OK" : "place 3;2" + +"OK" : "select 12" +"OK" : "place 4;3" + + +"OK" : "select 11" +"P2 wins +10" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_11.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_11.test new file mode 100644 index 0000000..cc1f387 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_11.test @@ -0,0 +1,33 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 1;1" + +"OK" : "select 1" +"OK" : "place 2;2" +"OK" : "select 10" +"OK" : "place 3;2" + +"OK" : "select 12" +"OK" : "place 4;3" +"OK" : "select 4" +"OK" : "place 5;3" + + + +"OK" : "select 11" +"P1 wins +11" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_12.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_12.test new file mode 100644 index 0000000..c1757f2 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_12.test @@ -0,0 +1,34 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 1;1" + +"OK" : "select 1" +"OK" : "place 2;2" +"OK" : "select 10" +"OK" : "place 3;2" + +"OK" : "select 12" +"OK" : "place 4;3" +"OK" : "select 4" +"OK" : "place 5;3" +"OK" : "select 15" +"OK" : "place 0;3" + + +"OK" : "select 11" +"P2 wins +12" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_13.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_13.test new file mode 100644 index 0000000..ed65ee4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_13.test @@ -0,0 +1,36 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 1;1" + +"OK" : "select 1" +"OK" : "place 2;2" +"OK" : "select 10" +"OK" : "place 3;2" + +"OK" : "select 12" +"OK" : "place 4;3" +"OK" : "select 4" +"OK" : "place 5;3" +"OK" : "select 15" +"OK" : "place 0;3" +"OK" : "select 9" +"OK" : "place 1;3" + + +"OK" : "select 11" +"P1 wins +13" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_14.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_14.test new file mode 100644 index 0000000..52458a4 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_14.test @@ -0,0 +1,39 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 1;1" + +"OK" : "select 1" +"OK" : "place 2;2" +"OK" : "select 10" +"OK" : "place 3;2" + +"OK" : "select 12" +"OK" : "place 4;3" +"OK" : "select 4" +"OK" : "place 5;3" +"OK" : "select 15" +"OK" : "place 0;3" +"OK" : "select 9" +"OK" : "place 1;3" + +"OK" : "select 0" +"OK" : "place 3;4" + + +"OK" : "select 11" +"P2 wins +14" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_15.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_15.test new file mode 100644 index 0000000..ae5dfa9 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_15.test @@ -0,0 +1,42 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 1;1" + +"OK" : "select 1" +"OK" : "place 2;2" +"OK" : "select 10" +"OK" : "place 3;2" + +"OK" : "select 12" +"OK" : "place 4;3" +"OK" : "select 4" +"OK" : "place 5;3" +"OK" : "select 15" +"OK" : "place 0;3" +"OK" : "select 9" +"OK" : "place 1;3" + +"OK" : "select 0" +"OK" : "place 3;4" +"OK" : "select 5" +"OK" : "place 2;4" + + + +"OK" : "select 11" +"P1 wins +15" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_4.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_4.test new file mode 100644 index 0000000..046d554 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_4.test @@ -0,0 +1,14 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 0;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + +"OK" : "select 7" +"OK" : "place 4;1" + +"OK" : "select 11" +"P2 wins +4" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_5.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_5.test new file mode 100644 index 0000000..220932d --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_5.test @@ -0,0 +1,17 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" + + +"OK" : "select 11" +"P1 wins +5" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_6.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_6.test new file mode 100644 index 0000000..02ca49a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_6.test @@ -0,0 +1,20 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" + + +"OK" : "select 11" +"P2 wins +6" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_7.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_7.test new file mode 100644 index 0000000..d5b6a06 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_7.test @@ -0,0 +1,22 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 1;1" + + +"OK" : "select 11" +"P1 wins +7" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_8.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_8.test new file mode 100644 index 0000000..4aa8185 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_8.test @@ -0,0 +1,25 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 1;1" + +"OK" : "select 1" +"OK" : "place 2;2" + + +"OK" : "select 11" +"P2 wins +8" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_9.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_9.test new file mode 100644 index 0000000..02ca739 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_9.test @@ -0,0 +1,27 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" +"OK" : "select 3" +"OK" : "place 0;1" +"OK" : "select 2" +"OK" : "place 1;1" + +"OK" : "select 1" +"OK" : "place 2;2" +"OK" : "select 10" +"OK" : "place 3;2" + + +"OK" : "select 11" +"P1 wins +9" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_error.test b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_error.test new file mode 100644 index 0000000..cbf4202 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/turncount_error.test @@ -0,0 +1,25 @@ +<"standard"> +"OK" : "select 8" +"OK" : "place 4;0" +"OK" : "select 14" +"OK" : "place 2;0" +"OK" : "select 13" +"OK" : "place 1;0" + +"OK" : "select 7" +00err : "place" +"OK" : "select 7" +00err : "place 1;0" +"OK" : "select 7" +00err : "place x;0" + + +"OK" : "select 7" +"OK" : "place 4;1" +"OK" : "select 6" +"OK" : "place 5;1" + + +"OK" : "select 11" +"P1 wins +5" : "place 3;0" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/bin/vertices.test b/Uni/Java/WS1516/Programmieren/Final02/bin/vertices.test new file mode 100644 index 0000000..e5f19dc --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/bin/vertices.test @@ -0,0 +1,21 @@ +<"C:\Eclipse\workspace\Final01\tests\test.graph"> +#Errors +00err : "vertices null" +00err : "vertices 10" + +#Standard +"Aa +bB +C +d" : "vertices" + +#Remove till empty +"OK" : "remove C;bB" +"OK" : "remove C;d" +"OK" : "remove Aa;d" +"OK" : "remove Aa;bB" +"OK" : "remove Aa;C" + +#Empty output +" +" : "vertices" \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/Constant.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/Constant.java new file mode 100644 index 0000000..296811b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/Constant.java @@ -0,0 +1,58 @@ +package edu.kit.informatik; + +/** + * All constants used in the program + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Constant { + /** + * The regex for a token id + */ + public static final String REGEX_TOKEN_ID = "[+]?((1[0-5])|([0-9]))"; + /** + * The constant COMMAND_SUCCESSFUL. + */ + public static final String COMMAND_SUCCESSFUL = "OK"; + /** + * The constant COMMAND_NOT_FOUND. + */ + public static final String COMMAND_NOT_FOUND = "please use a valid command"; + /** + * The constant PREFIX_ERROR + */ + public static final String PREFIX_ERROR = "Error, "; + /** + * The constant COORDINATES_WRONG + */ + public static final String COORDINATE_WRONG = "Coordinate(s) not on board (or allready occupied)."; + /** + * The constant BAG_NOT_FOUND + */ + public static final String BAG_NOT_FOUND = "No Token with this identifier inside the bag."; + /** + * The constant COMMAND_PLACE_NEXT + */ + public static final String COMMAND_PLACE_NEXT = "'place' has to be called before using this command again."; + /** + * The constant COMMAND_SELECT_NEXT + */ + public static final String COMMAND_SELECT_NEXT = "'select' has to be called before using this command again."; + /** + * The constant COMMAND_GAME_ENDED + */ + public static final String COMMAND_GAME_ENDED = "Game is over. Command illegal."; + /** + * The constant REGEX_ON_BOARD + */ + public static final String REGEX_ON_BOARD = "[+]?[0]*[0-5]"; + /** + * error message for wrong parameter count in place!!!!!! + */ + public static final String PLACE_PARAMCOUNT_WRONG = "there has been an issue with the number of parameters " + + "used with place (therefore turn will be reset)"; + + private Constant() { + } +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/Main.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/Main.java new file mode 100644 index 0000000..f073600 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/Main.java @@ -0,0 +1,38 @@ +package edu.kit.informatik; + +import edu.kit.informatik.game.BoardGame; +import edu.kit.informatik.game.TorusBoardGame; +import edu.kit.informatik.terminalinput.InputManager; + +/** + * The Class Main. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public final class Main { + private Main() { + } + + /** + * The main method. + * + * @param args the arguments + */ + public static void main(final String[] args) { + if (args.length != 1 || (!args[0].equals("standard") && !args[0].equals("torus"))) { + InputManager.error("wrong parameter (expects one parameter which is either 'torus' or 'standard')"); + System.exit(1); + } + final InputManager inputManager; + switch (args[0]) { + case "torus": + inputManager = new InputManager(new TorusBoardGame()); + break; + default: + inputManager = new InputManager(new BoardGame()); + } + inputManager.run(); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/Terminal.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/Terminal.java new file mode 100644 index 0000000..c3612c8 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/Terminal.java @@ -0,0 +1,70 @@ +package edu.kit.informatik; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * This class provides some simple methods for input/output from and to a + * terminal. + *

+ * Never modify this class, never upload it to Praktomat. This is only for your + * local use. If an assignment tells you to use this class for input and output + * never use System.out or System.in in the same assignment. + * + * @author ITI, VeriAlg Group + * @author IPD, SDQ Group + * @version 4 + */ +public final class Terminal { + + /** + * BufferedReader for reading from standard input line-by-line. + */ + /* + * private static BufferedReader in = new BufferedReader(new + * InputStreamReader(System.in)); + */ + + /** + * Private constructor to avoid object generation. + */ + private Terminal() { + } + + /** + * Print a String to the standard output. + *

+ * The String out must not be null. + * + * @param out + * The string to be printed. + */ + public static void printLine(final String out) { + System.out.println(out); + } + + /** + * Reads a line from standard input. + *

+ * Returns null at the end of the standard input. + *

+ * Use Ctrl+D to indicate the end of the standard input. + * + * @return The next line from the standard input or null. + */ + public static String readLine() { + try { + final BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + return in.readLine(); + } catch (final IOException e) { + /* + * rethrow unchecked (!) exception to prevent students from being + * forced to use Exceptions before they have been introduced in the + * lecture. + */ + throw new RuntimeException(e); + } + } + +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/exception/IllegalMethodCallException.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/exception/IllegalMethodCallException.java new file mode 100644 index 0000000..0b82acb --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/exception/IllegalMethodCallException.java @@ -0,0 +1,18 @@ +package edu.kit.informatik.exception; + +/** + * The Class IllegalMethodCallException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class IllegalMethodCallException extends Throwable { + /** + * Instantiates a new illegal method call exception. + * + * @param message the message + */ + public IllegalMethodCallException(final String message) { + super(message); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/exception/IllegalParameterException.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/exception/IllegalParameterException.java new file mode 100644 index 0000000..6f34218 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/exception/IllegalParameterException.java @@ -0,0 +1,18 @@ +package edu.kit.informatik.exception; + +/** + * The Class IllegalParameterException. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class IllegalParameterException extends Exception { + /** + * Instantiates a new illegal parameter exception. + * + * @param message the message + */ + public IllegalParameterException(final String message) { + super(message); + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/BoardGame.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/BoardGame.java new file mode 100644 index 0000000..6e5e877 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/BoardGame.java @@ -0,0 +1,356 @@ +package edu.kit.informatik.game; + +import java.util.ArrayList; +import java.util.Collection; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.exception.IllegalMethodCallException; +import edu.kit.informatik.exception.IllegalParameterException; + +/** + * The Class BoardGame. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class BoardGame { + /** + * The constant that defines the number of fields per row + */ + public static final int ROW_COUNT = 6; + /** + * The constant that defines the number of fields per row + */ + public static final int COLUMN_COUNT = 6; + + private int lastTurnRow; + private int lastTurnColumn; + + private int turnCount; + private Token toPlace; + + private Collection bag; + private EmptyToken[][] board; + + /** + * Initializes the game. This means the bag will be filled with the standard + * tokens and that all fields on the board will be set as Empty Tokens + */ + public BoardGame() { + toPlace = null; + turnCount = 0; + + lastTurnColumn = 0; + lastTurnRow = 0; + + initBoard(); + initBag(); + } + + private void initBoard() { + board = new EmptyToken[ROW_COUNT][COLUMN_COUNT]; + for (int r = 0; r < board.length; r++) { + for (int c = 0; c < board[r].length; c++) { + board[r][c] = new EmptyToken(); + } + } + } + + private void initBag() { + bag = new ArrayList<>(); + bag.add(new Token(0, true, true, false, true)); + bag.add(new Token(1, true, true, false, false)); + bag.add(new Token(2, true, true, true, true)); + bag.add(new Token(3, true, true, true, false)); + + bag.add(new Token(4, true, false, false, true)); + bag.add(new Token(5, true, false, false, false)); + bag.add(new Token(6, true, false, true, true)); + bag.add(new Token(7, true, false, true, false)); + + bag.add(new Token(8, true, true, false, true)); + bag.add(new Token(9, true, true, false, false)); + bag.add(new Token(10, true, true, true, true)); + bag.add(new Token(11, true, true, true, false)); + + bag.add(new Token(12, true, false, false, true)); + bag.add(new Token(13, true, false, false, false)); + bag.add(new Token(14, true, false, true, true)); + bag.add(new Token(15, true, false, true, false)); + } + + /** + * Selects the next token to be placed + * + * @param identifier + * the identifier of the token that should be placed + * @throws IllegalParameterException + * is thrown if the bag does not contain a token with the + * identifier + * @throws IllegalMethodCallException + * is thrown if the another method needs to be called before + * this method + */ + public void select(final int identifier) throws IllegalParameterException, IllegalMethodCallException { + if (toPlace != null) + throw new IllegalMethodCallException(Constant.COMMAND_PLACE_NEXT); + for (final Token t : bag) { + if (identifier == t.getIdentifier()) { + toPlace = t; + bag.remove(t); + break; + } + } + if (toPlace == null) + throw new IllegalParameterException(Constant.BAG_NOT_FOUND); + } + + /** + * Places the selected token on the board + * + * @param row + * row coordinate + * @param column + * column coordinate + * @throws IllegalMethodCallException + * is thrown if another method needs to be called first + * @throws IllegalParameterException + * is thrown if parameters are not valid + */ + public void place(final int row, final int column) throws IllegalMethodCallException, IllegalParameterException { + if (toPlace == null) { + // just to be sure that it will be restarted + restartTurn(); + throw new IllegalMethodCallException(Constant.COMMAND_SELECT_NEXT); + } + final int tmpRow = modifyCoordinate(row); + final int tmpColumn = modifyCoordinate(column); + + if (!isOnField(tmpRow, tmpColumn) || board[tmpRow][tmpColumn] instanceof Token) { + // just to be sure that it will be restarted + restartTurn(); + throw new IllegalParameterException(Constant.COORDINATE_WRONG); + } + board[tmpRow][tmpColumn] = toPlace; + lastTurnRow = tmpRow; + lastTurnColumn = tmpColumn; + toPlace = null; + if (!hasEnded()) + turnCount += 1; + } + + /** + * Restarts the turn which mean that the token which is ready to be placed + * will be returned to the bag + */ + public void restartTurn() { + if (toPlace != null) + bag.add(toPlace); + toPlace = null; + } + + /** + * + * @return returns all tokens contained in the "bag" by their id separated + * with "\n" + */ + public String bagToString() { + String ret = ""; + for (final Token t : bag) { + ret += t.getIdentifier() + " "; + } + return ret.trim(); + } + + /** + * Returns a column as String (which means the tokens are separated by "\n") + * + * @param column + * the coordinate of the column which should be returned + * @return returns the column + * @throws IllegalParameterException + * is thrown if column coordinate is not correct + */ + public String columnToString(final int column) throws IllegalParameterException { + String ret = ""; + if (!isOnField(0, column)) + throw new IllegalParameterException(Constant.COORDINATE_WRONG); + + for (int i = 0; i < ROW_COUNT; i++) { + ret += board[i][column].toString() + " "; + } + return ret.trim(); + } + + /** + * Returns a row as String (which means that tokens are printed by their + * identifier seperated with "\n") + * + * @param row + * the row coordinates + * @return returns the row as string + * @throws IllegalParameterException + * is thrown if the row coordinate is wrong + */ + public String rowToString(final int row) throws IllegalParameterException { + String ret = ""; + if (!isOnField(row, 0)) + throw new IllegalParameterException(Constant.COORDINATE_WRONG); + + for (int i = 0; i < COLUMN_COUNT; i++) { + ret += board[row][i].toString() + " "; + } + return ret.trim(); + } + + /** + * Indicates if the game has enden + * + * @return returns true if the game is over + */ + public boolean hasEnded() { + return (bag.size() == 0 && toPlace == null) || hasWon(); + } + + /** + * tests if last turn was a winning turn + * + * @return returns true if last turn was a winning turn + */ + public boolean hasWon() { + if (!(board[lastTurnRow][lastTurnColumn] instanceof Token)) + return false; + + final Token lastTurnToken = (Token) board[modifyCoordinate(lastTurnRow)][modifyCoordinate(lastTurnColumn)]; + + final TokenCounter topLeft = new TokenCounter(lastTurnToken); + final TokenCounter topRight = new TokenCounter(lastTurnToken); + + final TokenCounter top = new TokenCounter(lastTurnToken); + final TokenCounter bottom = new TokenCounter(lastTurnToken); + + final TokenCounter bottomLeft = new TokenCounter(lastTurnToken); + final TokenCounter bottomRight = new TokenCounter(lastTurnToken); + + final TokenCounter left = new TokenCounter(lastTurnToken); + final TokenCounter right = new TokenCounter(lastTurnToken); + + for (int i = 1; i < 4; i++) { + + topLeft.addToCount(getLeftTop(lastTurnRow, lastTurnColumn, i)); + topRight.addToCount(getRightTop(lastTurnRow, lastTurnColumn, i)); + + top.addToCount(getTop(lastTurnRow, lastTurnColumn, i)); + bottom.addToCount(getBottom(lastTurnRow, lastTurnColumn, i)); + + bottomLeft.addToCount(getLeftBottom(lastTurnRow, lastTurnColumn, i)); + bottomRight.addToCount(getRightBottom(lastTurnRow, lastTurnColumn, i)); + + left.addToCount(getLeft(lastTurnRow, lastTurnColumn, i)); + right.addToCount(getRight(lastTurnRow, lastTurnColumn, i)); + } + // only 3 because last placed token is not counted therefore 3 + // neighbouring tokens with one attribute that is the same have to be + // found + return TokenCounter.combinedCount(left, right) >= 3 || TokenCounter.combinedCount(top, bottom) >= 3 + || TokenCounter.combinedCount(topLeft, bottomRight) >= 3 + || TokenCounter.combinedCount(topRight, bottomLeft) >= 3; + } + + private Token getLeftTop(final int row, final int column, final int offset) { + final int tmpRow = modifyCoordinate(row - offset); + final int tmpColumn = modifyCoordinate(column - offset); + if (!isOnField(tmpRow, tmpColumn) || !board[tmpRow][tmpColumn].getClass().equals(Token.class)) { + return null; + } + return (Token) board[tmpRow][tmpColumn]; + } + + private Token getLeftBottom(final int row, final int column, final int offset) { + final int tmpRow = modifyCoordinate(row + offset); + final int tmpColumn = modifyCoordinate(column - offset); + if (!isOnField(tmpRow, tmpColumn) || !board[tmpRow][tmpColumn].getClass().equals(Token.class)) { + return null; + } + return (Token) board[tmpRow][tmpColumn]; + } + + private Token getTop(final int row, final int column, final int offset) { + final int tmpRow = modifyCoordinate(row - offset); + final int tmpColumn = modifyCoordinate(column); + if (!isOnField(tmpRow, tmpColumn) || !board[tmpRow][tmpColumn].getClass().equals(Token.class)) { + return null; + } + return (Token) board[tmpRow][tmpColumn]; + } + + private Token getBottom(final int row, final int column, final int offset) { + final int tmpRow = modifyCoordinate(row + offset); + final int tmpColumn = modifyCoordinate(column); + if (!isOnField(tmpRow, tmpColumn) || !board[tmpRow][tmpColumn].getClass().equals(Token.class)) { + return null; + } + return (Token) board[tmpRow][tmpColumn]; + } + + private Token getRightTop(final int row, final int column, final int offset) { + final int tmpRow = modifyCoordinate(row - offset); + final int tmpColumn = modifyCoordinate(column + offset); + if (!isOnField(tmpRow, tmpColumn) || !board[tmpRow][tmpColumn].getClass().equals(Token.class)) { + return null; + } + return (Token) board[tmpRow][tmpColumn]; + } + + private Token getRightBottom(final int row, final int column, final int offset) { + final int tmpRow = modifyCoordinate(row + offset); + final int tmpColumn = modifyCoordinate(column + offset); + if (!isOnField(tmpRow, tmpColumn) || !board[tmpRow][tmpColumn].getClass().equals(Token.class)) { + return null; + } + return (Token) board[tmpRow][tmpColumn]; + } + + private Token getLeft(final int row, final int column, final int offset) { + final int tmpRow = modifyCoordinate(row); + final int tmpColumn = modifyCoordinate(column - offset); + if (!isOnField(tmpRow, tmpColumn) || !board[tmpRow][tmpColumn].getClass().equals(Token.class)) { + return null; + } + return (Token) board[tmpRow][tmpColumn]; + } + + private Token getRight(final int row, final int column, final int offset) { + final int tmpRow = modifyCoordinate(row); + final int tmpColumn = modifyCoordinate(column + offset); + if (!isOnField(tmpRow, tmpColumn) || !board[tmpRow][tmpColumn].getClass().equals(Token.class)) { + return null; + } + return (Token) board[tmpRow][tmpColumn]; + } + + private boolean isOnField(final int row, final int column) { + return 0 <= row && row < ROW_COUNT && 0 <= column && column < COLUMN_COUNT; + } + + /** + * placeholder to allow modification of coordinates which allows to change + * the coordinates if they are for example invalid (see torusboard) + * + * @param coordinate + * coordinate that should be corrected + * @return returns the corrected coordinate + */ + protected int modifyCoordinate(final int coordinate) { + return coordinate; + } + + /** + * Returns the number of done turns + * + * @return number of turn that have been done + */ + public int getTurnCount() { + return turnCount; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/EmptyToken.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/EmptyToken.java new file mode 100644 index 0000000..58d088f --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/EmptyToken.java @@ -0,0 +1,21 @@ +package edu.kit.informatik.game; + +/** + * The Class EmptyToken. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class EmptyToken { + /** + * Instanciates an EmptyToken + */ + public EmptyToken() { + + } + + @Override + public String toString() { + return "#"; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/Token.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/Token.java new file mode 100644 index 0000000..d320862 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/Token.java @@ -0,0 +1,135 @@ +package edu.kit.informatik.game; + +/** + * The Class Token extends emptyToken. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class Token extends EmptyToken { + private final int identifier; + + private boolean isLarge; + private boolean isBlack; + private boolean isEdgy; + private boolean isHollow; + + /** + * Instanciates a Token + * + * @param id + * the identifier + * @param isBlack + * the attribute which indicates if the token is black or white + * @param isEdgy + * the attribute which indicates if the token is round or edgy + * @param isLarge + * the attribute which indicates if the token is large or small + * @param isHollow + * the attribute which indicates if the token is hollow or + * massive + */ + public Token(final int id, final boolean isBlack, final boolean isEdgy, final boolean isLarge, + final boolean isHollow) { + this.identifier = id; + this.setLarge(isLarge); + this.setBlack(isBlack); + this.setEdgy(isEdgy); + this.setHollow(isHollow); + } + + @Override + public boolean equals(final Object obj) { + return obj.getClass().equals(this.getClass()) && ((Token) obj).getIdentifier() == this.getIdentifier(); + } + + @Override + public String toString() { + return Integer.toString(getIdentifier()); + } + + /** + * gets the Identifier + * + * @return get the identifier + */ + public int getIdentifier() { + return identifier; + } + + /** + * Is large boolean. + * + * @return the boolean + */ + public boolean isLarge() { + return isLarge; + } + + /** + * Sets large. + * + * @param large + * the large + */ + public void setLarge(final boolean large) { + isLarge = large; + } + + /** + * Is black boolean. + * + * @return the boolean + */ + public boolean isBlack() { + return isBlack; + } + + /** + * Sets black. + * + * @param black + * the black + */ + public void setBlack(final boolean black) { + isBlack = black; + } + + /** + * Is edgy boolean. + * + * @return the boolean + */ + public boolean isEdgy() { + return isEdgy; + } + + /** + * Sets edgy. + * + * @param edgy + * the edgy + */ + public void setEdgy(final boolean edgy) { + isEdgy = edgy; + } + + /** + * Is hollow boolean. + * + * @return the boolean + */ + public boolean isHollow() { + return isHollow; + } + + /** + * Sets hollow. + * + * @param hollow + * the hollow + */ + public void setHollow(final boolean hollow) { + isHollow = hollow; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/TokenCounter.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/TokenCounter.java new file mode 100644 index 0000000..5691ecb --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/TokenCounter.java @@ -0,0 +1,131 @@ +package edu.kit.informatik.game; + +/** + * The Class Token Counter. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class TokenCounter { + private final Token compare; + private final Token testFor; + + private int blackCount; + private int largeCount; + private int edgyCount; + private int hollowCount; + + /** + * Instantiates a new Token counter. + * + * @param compare + * the token to compare to + */ + public TokenCounter(final Token compare) { + blackCount = 0; + largeCount = 0; + edgyCount = 0; + hollowCount = 0; + + this.compare = compare; + + testFor = new Token(0, true, true, true, true); + } + + /** + * combines the count of the two elements. + * + * @param first + * the first + * @param second + * the second + * @return the int + */ + public static int combinedCount(final TokenCounter first, final TokenCounter second) { + final int tmpBlack = first.getBlackCount() + second.getBlackCount(); + final int tmpLarge = first.getLargeCount() + second.getLargeCount(); + final int tmpHollow = first.getHollowCount() + second.getHollowCount(); + final int tmpEdgy = first.getEdgyCount() + second.getEdgyCount(); + + if (tmpBlack >= tmpLarge && tmpBlack >= tmpHollow && tmpBlack >= tmpEdgy) + return tmpBlack; + if (tmpLarge >= tmpBlack && tmpLarge >= tmpHollow && tmpLarge >= tmpEdgy) + return tmpLarge; + if (tmpHollow >= tmpLarge && tmpHollow >= tmpBlack && tmpHollow >= tmpEdgy) + return tmpHollow; + if (tmpEdgy >= tmpLarge && tmpEdgy >= tmpHollow && tmpEdgy >= tmpBlack) + return tmpEdgy; + + return 0; + } + + /** + * Add token to be counted. + * + * @param token + * the token + */ + public void addToCount(final Token token) { + if (token == null) { + testFor.setBlack(false); + testFor.setEdgy(false); + testFor.setLarge(false); + testFor.setHollow(false); + return; + } + if (testFor.isEdgy() && token.isEdgy() == compare.isEdgy()) + edgyCount += 1; + else + testFor.setEdgy(false); + if (testFor.isBlack() && token.isBlack() == compare.isBlack()) + blackCount += 1; + else + testFor.setBlack(false); + + if (testFor.isLarge() && token.isLarge() == compare.isLarge()) + largeCount += 1; + else + testFor.setLarge(false); + + if (testFor.isHollow() && token.isHollow() == compare.isHollow()) + hollowCount += 1; + else + testFor.setHollow(false); + } + + /** + * Gets black count. + * + * @return the black count + */ + public int getBlackCount() { + return blackCount; + } + + /** + * Gets large count. + * + * @return the large count + */ + public int getLargeCount() { + return largeCount; + } + + /** + * Gets edgy count. + * + * @return the edgy count + */ + public int getEdgyCount() { + return edgyCount; + } + + /** + * Gets hollow count. + * + * @return the hollow count + */ + public int getHollowCount() { + return hollowCount; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/TorusBoardGame.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/TorusBoardGame.java new file mode 100644 index 0000000..471c712 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/game/TorusBoardGame.java @@ -0,0 +1,25 @@ +package edu.kit.informatik.game; + +/** + * The Class TorusBoardGame. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class TorusBoardGame extends BoardGame { + /** + * Instantiates a new Torus board game. + */ + public TorusBoardGame() { + super(); + } + + @Override + protected int modifyCoordinate(final int coordinate) { + if (coordinate < 0) + return 5 - (Math.abs(coordinate + 1) % 6); + else if (coordinate > 5) + return coordinate % 6; + return coordinate; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/BagCommand.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/BagCommand.java new file mode 100644 index 0000000..67b62af --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/BagCommand.java @@ -0,0 +1,37 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Terminal; +import edu.kit.informatik.game.BoardGame; + +/** + * The Class InsertCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class BagCommand extends Command { + + /** + * Instantiates a new insert command. + */ + public BagCommand() { + super("bag", "bag", 0); + } + + @Override + public boolean correctParameters(final String[] parameters) { + return true; + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final BoardGame game) { + Terminal.printLine(game.bagToString()); + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/ColprintCommand.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/ColprintCommand.java new file mode 100644 index 0000000..2311186 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/ColprintCommand.java @@ -0,0 +1,43 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.exception.IllegalParameterException; +import edu.kit.informatik.game.BoardGame; + +/** + * The Class InsertCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class ColprintCommand extends Command { + + /** + * Instantiates a new insert command. + */ + public ColprintCommand() { + super("colprint", "colprint ", 1); + } + + @Override + public boolean correctParameters(final String[] parameters) { + return parameters[0].matches(Constant.REGEX_ON_BOARD); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final BoardGame game) { + try { + Terminal.printLine(game.columnToString(Integer.parseInt(commandToParametersArray(command)[0]))); + } catch (final IllegalParameterException e) { + InputManager.error(e.getMessage()); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/Command.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/Command.java new file mode 100644 index 0000000..eb36554 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/Command.java @@ -0,0 +1,146 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.game.BoardGame; + +/** + * The Class Command. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public abstract class Command { + + /** The name. */ + private final String name; + + private final String info; + + /** The parameter count. */ + private final int parameterCount; + + /** + * Instantiates a new command. + * + * @param name + * the name + * @param info + * the information on how to use the command + * @param parameterCount + * the parameter count + */ + public Command(final String name, final String info, final int parameterCount) { + this.name = name; + this.info = info; + this.parameterCount = parameterCount; + } + + /** + * Checks if the string starts with the correct name of this command. + * + * @param str + * the str + * @return true, if successful + */ + protected boolean correctCommand(final String str) { + return name.equals(str.split(" ")[0]); + } + + /** + * Checks if string has valid command form. Will call + * correctCommand, correctParameters and will + * check parameterCount. + * + * @param command + * the command + * @return true, if successful + */ + public boolean validate(final String command) { + final String[] parameters = commandToParametersArray(command); + return correctCommand(command) && parameters.length == parameterCount && correctParameters(parameters); + } + + /** + * Checks if parameters of string are correct. + * + * @param command + * the command + * @return true, if successful + */ + public boolean correctParameters(final String[] command) { + return true; + } + + /** + * Executes the command. + * + * @param command + * the command + * @param boardGame + * the boardGame + */ + public abstract void execute(String command, BoardGame boardGame); + + /** + * Gets the parameters from a String which is a console command. + * + * @param command + * the command + * @return the string[] that contains all parameters + */ + public String[] commandToParametersArray(final String command) { + final String[] tmp = command.split(" "); + if (tmp.length > 1) { + return tmp[1].split(";"); + } + return new String[0]; + } + + /** + * Checks if program should quit. + * + * @return true, if successful + */ + public boolean checkQuit() { + return false; + } + + /** + * Checks if objects are equal. + * + * @param obj + * the obj + * @return true, if same name and same parameterCount + */ + @Override + public boolean equals(final Object obj) { + return (obj.getClass().equals(this.getClass())) && ((Command) obj).name.equals(this.name) + && ((Command) obj).parameterCount == this.parameterCount; + } + /** + * Gets the name. + * + * @return the name + */ + /* + * public String getName() { return name; } + */ + + /** + * Gets the info. + * + * @return the info + */ + public String getInfo() { + return info; + } + + /** + * returns the parameter count needed for correct syntax + * + * @return returns the parameter count + */ + protected int getParameterCount() { + return parameterCount; + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/InputManager.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/InputManager.java new file mode 100644 index 0000000..365041b --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/InputManager.java @@ -0,0 +1,98 @@ +package edu.kit.informatik.terminalinput; + +import java.util.LinkedList; +import java.util.List; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.game.BoardGame; + +/** + * The Class InputManager. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class InputManager { + + /** The commands. */ + private List commands; + + /** The boardGame. */ + private final BoardGame game; + + /** The quit. */ + private boolean quit; + + /** + * Instantiates a new input manager. + * + * @param g + * the graph + */ + public InputManager(final BoardGame g) { + this.game = g; + initializeCommands(); + quit = false; + } + + /** + * Initialize all commands. + */ + private void initializeCommands() { + commands = new LinkedList<>(); + commands.add(new SelectCommand()); + commands.add(new BagCommand()); + commands.add(new ColprintCommand()); + commands.add(new RowprintCommand()); + commands.add(new PlaceCommand()); + commands.add(new QuitCommand()); + } + + /** + * Run the input manager. + */ + public void run() { + while (!quit) { + boolean commandExcecuted = false; + final String input = Terminal.readLine(); + for (final Command command : commands) { + if (command.validate(input)) { + command.execute(input, game); + if (command.checkQuit()) { + quit = true; + } + commandExcecuted = true; + } + } + if (!commandExcecuted) { + error(Constant.COMMAND_NOT_FOUND + " (valid commands: " + commandsInfo()); + } + } + } + + /** + * Prints an error. + * + * @param message + * the message + */ + public static void error(final String message) { + Terminal.printLine(Constant.PREFIX_ERROR + " " + message); + } + + /** + * Prints the success command output. + */ + public static void printSuccess() { + Terminal.printLine(Constant.COMMAND_SUCCESSFUL); + } + + private String commandsInfo() { + String out = ""; + for (final Command command : commands) { + out += "'" + command.getInfo() + "' "; + } + return out; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/PlaceCommand.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/PlaceCommand.java new file mode 100644 index 0000000..237444e --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/PlaceCommand.java @@ -0,0 +1,80 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.exception.IllegalMethodCallException; +import edu.kit.informatik.exception.IllegalParameterException; +import edu.kit.informatik.game.BoardGame; + +/** + * The Class InsertCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class PlaceCommand extends Command { + + /** + * Instantiates a new insert command. + */ + public PlaceCommand() { + super("place", "place ;", 2); + } + + @Override + public boolean correctParameters(final String[] parameters) { + return true; + } + + // Required to do because of shitty regulations regarding what a correct + // command is therefore + @Override + public final boolean validate(final String command) { + final String[] parameters = commandToParametersArray(command); + return correctCommand(command) && correctParameters(parameters); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final BoardGame game) { + final String[] parameters = commandToParametersArray(command); + if (parameters.length != this.getParameterCount()) { + game.restartTurn(); + InputManager.error(Constant.PLACE_PARAMCOUNT_WRONG); + return; + } + final int row; + final int column; + try { + row = Integer.parseInt(parameters[0]); + column = Integer.parseInt(parameters[1]); + } catch (final NumberFormatException e) { + game.restartTurn(); + InputManager.error(e.getMessage()); + return; + } + if (game.hasEnded()) { + InputManager.error(Constant.COMMAND_GAME_ENDED); + return; + } + try { + game.place(row, column); + if (game.hasWon()) { + Terminal.printLine("P" + Integer.toString((game.getTurnCount() % 2 - 2) * -1) + " wins\n" + + Integer.toString(game.getTurnCount())); + } else if (game.hasEnded()) + Terminal.printLine("draw"); + else + InputManager.printSuccess(); + } catch (IllegalMethodCallException | IllegalParameterException e) { + game.restartTurn(); + InputManager.error(e.getMessage()); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/QuitCommand.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/QuitCommand.java new file mode 100644 index 0000000..9a5ea33 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/QuitCommand.java @@ -0,0 +1,42 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.game.BoardGame; + +/** + * The Class InsertCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class QuitCommand extends Command { + + private boolean readyToquit = false; + + /** + * Instantiates a new insert command. + */ + public QuitCommand() { + super("quit", "quit", 0); + } + + @Override + public boolean correctParameters(final String[] parameters) { + return true; + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final BoardGame game) { + readyToquit = true; + } + + @Override + public boolean checkQuit() { + return readyToquit; + } +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/RowprintCommand.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/RowprintCommand.java new file mode 100644 index 0000000..618a9e5 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/RowprintCommand.java @@ -0,0 +1,43 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.Terminal; +import edu.kit.informatik.exception.IllegalParameterException; +import edu.kit.informatik.game.BoardGame; + +/** + * The Class InsertCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class RowprintCommand extends Command { + + /** + * Instantiates a new insert command. + */ + public RowprintCommand() { + super("rowprint", "rowprint ", 1); + } + + @Override + public boolean correctParameters(final String[] parameters) { + return parameters[0].matches(Constant.REGEX_ON_BOARD); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final BoardGame game) { + try { + Terminal.printLine(game.rowToString(Integer.parseInt(commandToParametersArray(command)[0]))); + } catch (final IllegalParameterException e) { + InputManager.error(e.getMessage()); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/SelectCommand.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/SelectCommand.java new file mode 100644 index 0000000..8c946db --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/terminalinput/SelectCommand.java @@ -0,0 +1,49 @@ +package edu.kit.informatik.terminalinput; + +import edu.kit.informatik.Constant; +import edu.kit.informatik.exception.IllegalMethodCallException; +import edu.kit.informatik.exception.IllegalParameterException; +import edu.kit.informatik.game.BoardGame; + +/** + * The Class InsertCommand. + * + * @author Hannes Kuchelmeister + * @version 1.0 + */ +public class SelectCommand extends Command { + + /** + * Instantiates a new insert command. + */ + public SelectCommand() { + super("select", "select ", 1); + } + + @Override + public boolean correctParameters(final String[] parameters) { + return parameters[0].matches(Constant.REGEX_TOKEN_ID); + } + + /* + * (non-Javadoc) + * + * @see edu.kit.informatik.terminlinput.Command#execute(java.lang.String, + * edu.kit.informatik.graph.Graph) + */ + @Override + public void execute(final String command, final BoardGame game) { + if (game.hasEnded()) { + InputManager.error(Constant.COMMAND_GAME_ENDED); + return; + } + final int id = Integer.parseInt(commandToParametersArray(command)[0]); + try { + game.select(id); + InputManager.printSuccess(); + } catch (IllegalParameterException | IllegalMethodCallException e) { + InputManager.error(e.getMessage()); + } + } + +} diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/tests/testsuite/ExpectionInputStream.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/tests/testsuite/ExpectionInputStream.java new file mode 100644 index 0000000..9e8fd0a --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/tests/testsuite/ExpectionInputStream.java @@ -0,0 +1,101 @@ +package edu.kit.informatik.tests.testsuite; + +import java.io.IOException; +import java.io.PipedInputStream; +import java.io.PipedOutputStream; +import java.io.StringReader; +import java.util.List; + +/** + * InputStream that expects reading and reads specific lines. + * + * @author Moritz Hepp + * @version 1.0 + */ +public class ExpectionInputStream extends PipedInputStream { + + private boolean expecting; + private int count; + private final List inputs; + private ExpectionOutputStream out; + + /** + * Initialises a new InputStream. + * + * @param ins + * Lines the stream expects. + */ + public ExpectionInputStream(final List ins) { + super(); + inputs = ins; + count = 0; + expecting = true; + } + + /** + * Setter of expecting. + * + * @param val + * Value of expecting. + */ + public void setExpecting(final boolean val) { + expecting = val; + } + + /** + * Getter of expecting. + * + * @return value of expecting. + */ + public boolean isExpecting() { + return expecting; + } + + @Override + public void connect(final PipedOutputStream str) throws IOException { + if (str instanceof ExpectionOutputStream) { + super.connect(str); + out = (ExpectionOutputStream) str; + } else { + System.err.println(TestSuite.ERR_PREF + "Tried to connect with non ExpectionOutputStream instance!"); + System.exit(-1); + } + } + + @Override + public int read(final byte[] b, final int off, final int len) throws IOException { + int result = -1; + if (expecting) { + if (inputs.size() > count) { + final char[] ch = new char[b.length]; + final StringReader reader = new StringReader(inputs.get(count).toString() + System.lineSeparator()); + + result = reader.read(ch, off, len); + + for (int i = off; i < result; i++) { + b[i] = (byte) ch[i]; + } + count++; + expecting = false; + } else if (inputs.size() == count) { + final byte[] by = ("quit" + System.lineSeparator()).getBytes(); + System.arraycopy(by, 0, b, 0, by.length); + result = by.length; + expecting = false; + } else { + System.err.println(TestSuite.ERR_PREF + "End of expectations reached!"); + System.exit(-2); + } + } else { + if (this.out.isExpecting()) { + System.err.println( + TestSuite.ERR_PREF + "Expecting " + (this.out.getExpectationSize() - this.out.getCount()) + + " more outputs but got call to read!"); + } else { + System.err.println(TestSuite.ERR_PREF + "Reading while not expected; case: " + count); + System.exit(-2); + } + } + return result; + } +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.java new file mode 100644 index 0000000..0f3652c --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/tests/testsuite/ExpectionOutputStream.java @@ -0,0 +1,147 @@ +package edu.kit.informatik.tests.testsuite; + +import java.io.*; +import java.util.Arrays; +import java.util.List; + +/** + * OutputStream multiple outputs and only writing if output matches the expected + * output. + * + * @author Moritz Hepp + * @version 1.0 + */ +public class ExpectionOutputStream extends PipedOutputStream { + + private final List expectations; + private int count = 0; + private boolean newLineAllowed = false; + private ExpectionInputStream in; + private final PrintStream out; + private PrintWriter log; + + /** + * Initialises a PipedStream with a list of expected inputs. + * + * @param expected Expected lines to print. + * @param str Next OutputStream. + * @param logFile File to save the output in. + * @throws IOException Will be thrown if initialisation of logwriter went wrong. + */ + public ExpectionOutputStream(final List expected, final OutputStream str, final File logFile) + throws IOException { + super(); + expectations = expected; + this.out = new PrintStream(str); + if (logFile.exists()) { + if (!logFile.delete()) { + throw new IOException("Deleting previous file failed!"); + } + } else { + if (!logFile.getParentFile().exists()) { + if (logFile.mkdirs()) { + throw new IOException("Deleting previous file failed!"); + } + } + } + if (logFile.createNewFile()) { + log = new PrintWriter(new FileWriter(logFile)); + } else { + throw new IOException("Creating new logFile failed!"); + } + } + + /** + * Getter of already printed lines. + * + * @return Count of already printed lines. + */ + public int getCount() { + return count; + } + + /** + * Getter of line count expecting. + * + * @return Size of list of expectations. + */ + public int getExpectationSize() { + return expectations.size(); + } + + /** + * Getter of property, if this Stream still expects. + * + * @return true, if count of already printed outputs is smaller then the + * size of the expected lines, false otherwise. + */ + public boolean isExpecting() { + return count < this.expectations.size(); + } + + /** + * Getter of the next stream this stream is connected to. + * + * @return Stream this stream is connected to. + */ + public PrintStream getNextStream() { + return this.out; + } + + @Override + public void connect(final PipedInputStream in) throws IOException { + if (in instanceof ExpectionInputStream) { + super.connect(in); + this.in = (ExpectionInputStream) in; + } else { + System.err.println(TestSuite.ERR_PREF + "Tried to connect with non ExpectionInputStream instance!"); + System.exit(-1); + } + } + + @Override + public void write(final byte[] b, final int off, final int len) throws IOException { + final String out = new String(Arrays.copyOfRange(b, off, len)); + if (out.startsWith(TestSuite.ERR_PREF) || out.startsWith(TestSuite.DEF_PREF) + || (out.matches(System.lineSeparator()) && newLineAllowed)) { + this.log.print(out); + newLineAllowed = false; + } else if (this.isExpecting()) { + String sRep = expectations.get(count).toString(); + // Get options + boolean ignoreEquals = false; + if (sRep.startsWith("!")) { + sRep = sRep.replaceFirst("!", ""); + // Ignore case + if (sRep.startsWith("C")) { + sRep = sRep.replaceFirst("C", ""); + ignoreEquals = sRep.equalsIgnoreCase(out); + } + //Others are not supported + } + if (sRep.equals(out) || ignoreEquals || (sRep.equals("00err") && out.startsWith("Error")) + || (out.replace(System.lineSeparator(), "\n").equals(sRep))) { + this.log.print(out); + + // quit-cmd has to be written + in.setExpecting(true); + count++; + newLineAllowed = true; + } else { + System.err.println(TestSuite.ERR_PREF + "\nexpected: " + sRep + "\nactual: " + out); + newLineAllowed = false; + System.exit(-2); + } + } else { + System.err.println(TestSuite.ERR_PREF + "Unexpected output at case: " + count); + newLineAllowed = false; + System.exit(-2); + } + } + + @Override + public void close() throws IOException { + super.close(); + this.log.close(); + } +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/tests/testsuite/TestSuite.java b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/tests/testsuite/TestSuite.java new file mode 100644 index 0000000..8189a00 --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/src/edu/kit/informatik/tests/testsuite/TestSuite.java @@ -0,0 +1,313 @@ +package edu.kit.informatik.tests.testsuite; + +import java.io.*; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.*; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import edu.kit.informatik.Terminal; + +/** + * Testing class providing a text file with command inputs instead of manual + * input. The text file is formatted as follows: + *

    + *
  • - '<arg1;arg2>' at the start of the file with arg1 and arg2 as + * command-line-arguments of testing file.
  • + *
  • - '#' at the start of a line marks a line-comment.
  • + *
  • - "<expectedOutput> : \"<input>\""
  • + *
+ * + * @author Moritz Hepp + * @version 1.0 + */ +public final class TestSuite { + /** + * Prefix for error messages. ExpectionOutputStream will ignore output with + * this prefix. + */ + public static final String ERR_PREF = "$Error: "; + /** + * Prefix for test messages. ExpectionOutputStream will ignore output with + * this prefix. + */ + public static final String DEF_PREF = "Test: "; + + private static final String PARAM_REGEX = "(?:!C)?"; + + private static final String LINE_REGEX = "(null|00err|true|false|\"" + PARAM_REGEX + + "[#\\w\\s;\\-]*\"|-?[\\d]+|-?[\\d]+\\.[\\d]+)\\s:\\s\"([\\w\\s;+-]+)\""; + private static final String CMD_LINE_ARGS_REGEX = "\"[\\w\\\\/:_\\-\\.]+\"(;\"[\\w\\\\/:_\\-\\.]+\")*"; + + private static final String CMD_LINE_ARGS = "$CMD_LINE_ARGS$"; + private static final String COMMENT_PREFIX = "-"; + + private static ExpectionInputStream sysIn; + private static ExpectionOutputStream sysOut; + + private static File[] files; + private static Class cl; + private static File logDir; + + private static final Queue THREAD_QUEUE = new ConcurrentLinkedQueue<>(); + + private TestSuite() { + } + + /** + * Test main to perform the tests located at $ProjectRoot/tests and named + * *.test. + * + * @param args + * Command line arguments. + */ + public static void main(final String... args) { + init(); + for (final File f : files) { + final Class clazz = cl; + final List fileLines = readTestFile(f.getPath()); + if (fileLines != null) { + final Thread thread = new Thread(() -> { + final File logFile = new File( + logDir.getAbsoluteFile() + "/" + f.getName().replace(".test", "Test.log")); + System.out.println(DEF_PREF + "## file: " + f.getName()); + + final List inputs = new LinkedList<>(); + final List expectations = new LinkedList<>(); + + convert(fileLines, inputs, expectations); + + testFile(clazz, inputs, expectations, logFile); + if (!THREAD_QUEUE.isEmpty()) + THREAD_QUEUE.poll().start(); + }); + thread.setDaemon(false); + THREAD_QUEUE.add(thread); + } else + System.err.println(ERR_PREF + "Bad formatted file: " + f.getName()); + } + if (!THREAD_QUEUE.isEmpty()) + THREAD_QUEUE.poll().start(); + else + System.err.println(ERR_PREF + "Threading error: Thread queue is empty!"); + } + + private static void init() { + final Scanner scan = new Scanner(System.in); + final Properties prop = new Properties(); + try { + prop.load(new FileReader("TestSuite.config")); + } catch (final IOException ignored) { + } + File testsDir = null; + if (prop.containsKey("TestSources")) + testsDir = new File(prop.getProperty("TestSources")); + while (testsDir == null || !testsDir.exists()) { + System.out.print("Path to tests directory: "); + final String input = scan.nextLine(); + testsDir = new File(input); + if (!testsDir.exists()) { + System.err.println(ERR_PREF + "Not a valid directory!"); + testsDir = null; + } else { + prop.setProperty("TestSources", testsDir.getPath()); + } + } + files = testsDir.listFiles((dir, name) -> name.endsWith(".test")); + if (files == null || files.length == 0) { + System.err.println(ERR_PREF + "Tests directory doesn't contain .test-Files!"); + System.exit(-1); + } + logDir = new File(testsDir.getPath() + "/logs/"); + if (!logDir.exists()) + if (!logDir.mkdir()) + System.err.println(ERR_PREF + "Failed to create log-directory."); + cl = null; + String className; + if (prop.containsKey("TestClass")) { + try { + className = prop.getProperty("TestClass"); + cl = Terminal.class.getClassLoader().loadClass("edu.kit.informatik." + className); + } catch (final ClassNotFoundException e) { + e.printStackTrace(); + cl = null; + } + } + while (cl == null) { + try { + System.out.print("Name of testing class: "); + className = scan.nextLine(); + cl = Terminal.class.getClassLoader().loadClass("edu.kit.informatik." + className); + prop.setProperty("TestClass", className); + } catch (final ClassNotFoundException e) { + System.err.println(ERR_PREF + e.getMessage()); + cl = null; + } + } + try { + prop.store(new FileOutputStream("TestSuite.config"), "TestSuite runtime config"); + } catch (final IOException e) { + System.err.println(ERR_PREF + "Failed storing properties!"); + } + } + + /** + * Performs the tests one file is representing. + * + * @param testClass + * Class to be tested. + * @param inputs + * Inputs with Command line args. + * @param expectations + * Expected outputs. + * @param logFile + * File to store the output of this test. + */ + public static void testFile(final Class testClass, final List inputs, final List expectations, + final File logFile) { + if (inputs != null && expectations != null && !inputs.isEmpty() && !expectations.isEmpty()) { + try { + final Method main = testClass.getMethod("main", String[].class); + + String[] arguments = null; + if (inputs.get(0).startsWith(CMD_LINE_ARGS)) { + final String cmdLineArgs = inputs.get(0).replace(CMD_LINE_ARGS, ""); + + arguments = cmdLineArgs.split(";"); + inputs.remove(0); + } + initInOutput(inputs, expectations, logFile); + + main.invoke(null, (Object) arguments); + + resetInOutputSettings(); + } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | IOException e) { + System.err.println(ERR_PREF + "Something went wrong while testing!"); + e.printStackTrace(); + } + } else { + System.err.println(ERR_PREF + "Empty test-file!"); + } + } + + private static void resetInOutputSettings() { + final int count = sysOut.getCount(); + if (count < sysOut.getExpectationSize()) { + System.err + .println(ERR_PREF + "Expected output count: " + count + ", actual: " + sysOut.getExpectationSize()); + } else if (sysIn.isExpecting()) { + System.err.println(ERR_PREF + "Expected input!"); + } else { + System.setOut(sysOut.getNextStream()); + try { + sysOut.close(); + sysOut = null; + sysIn.close(); + sysIn = null; + } catch (final IOException e) { + e.printStackTrace(); + } + } + } + + private static void initInOutput(final List inputs, final List expectations, final File logFile) + throws IOException { + TestSuite.sysOut = new ExpectionOutputStream(expectations, System.out, logFile); + TestSuite.sysIn = new ExpectionInputStream(inputs); + + try { + sysIn.connect(sysOut); + } catch (final IOException e) { + System.err.println(ERR_PREF + e.getMessage()); + System.exit(-1); + return; + } + + System.setOut(new PrintStream(TestSuite.sysOut)); + System.setIn(TestSuite.sysIn); + } + + private static List readTestFile(final String path) { + List lines = null; + if (path != null) { + final File testFile; + if (path.matches("[\\w]+")) { + testFile = new File(System.getProperty("user.dir") + File.pathSeparatorChar + path); + } else { + testFile = new File(path); + } + if (testFile.exists()) { + try { + final BufferedReader reader = new BufferedReader(new FileReader(testFile)); + lines = new LinkedList<>(); + while (reader.ready()) { + String nLine = reader.readLine(); + if (nLine != null) { + // if output is multiple lines long + if (nLine.matches("\"[\\w\\s\\-]*") && reader.ready()) { + String next; + boolean cont = true; + while (cont) { + next = reader.readLine(); + nLine += "\n" + next; + if (next.matches("[\\w\\s\\-;]*\"\\s:\\s\"[\\w\\s;]+\"")) { + cont = false; + } else if (!reader.ready()) { + nLine = ""; + cont = false; + } + } + } + if (nLine.matches(LINE_REGEX)) { + lines.add(nLine); + } else if (nLine.matches("<" + CMD_LINE_ARGS_REGEX + ">")) { + if (lines.size() == 0) { + final String args = nLine.replace("<", "").replace(">", ""); + lines.add(args); + } else { + lines = null; + break; + } + } else if (!nLine.matches(COMMENT_PREFIX + ".*") && !nLine.isEmpty()) { + lines = null; + break; + } + } + } + } catch (final IOException e) { + System.err.println(ERR_PREF + "Something went wrong while reading test File: " + e.getMessage()); + } + } + } + return lines; + } + + private static void convert(final List lines, final List inputs, final List expections) { + if (lines != null) { + // Problem with same command + for (final String line : lines) { + if (line != null) { + if (line.matches(CMD_LINE_ARGS_REGEX)) { + final String cmdLineArgs = line.replace("\"", ""); + inputs.add(CMD_LINE_ARGS + cmdLineArgs); + } else { + final Pattern pat = Pattern.compile(LINE_REGEX); + final Matcher match = pat.matcher(line); + if (match.matches() && (match.groupCount() == 2 || match.groupCount() == 3)) { + /* + * group(1) == expected output group() == input + */ + final String expected = match.group(1).replace("\"", ""); + final String input = match.group(2); + + expections.add(expected); + inputs.add(input); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Uni/Java/WS1516/Programmieren/Final02/tests b/Uni/Java/WS1516/Programmieren/Final02/tests new file mode 160000 index 0000000..185aada --- /dev/null +++ b/Uni/Java/WS1516/Programmieren/Final02/tests @@ -0,0 +1 @@ +Subproject commit 185aada4a298532d23a523d944e7d46d74d42921