From 84726fd15ae2463d2365994d14703f570d99d2c9 Mon Sep 17 00:00:00 2001
From: Martin Goik <goik@hdm-stuttgart.de>
Date: Thu, 6 Feb 2014 08:01:30 +0100
Subject: [PATCH] Starting Sd1

---
 Sw1/bibliography.xml |  29 +++++
 Sw1/sw1.xml          | 255 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 284 insertions(+)
 create mode 100644 Sw1/bibliography.xml
 create mode 100644 Sw1/sw1.xml

diff --git a/Sw1/bibliography.xml b/Sw1/bibliography.xml
new file mode 100644
index 000000000..1862e7402
--- /dev/null
+++ b/Sw1/bibliography.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bibliography version="5.0" xmlns="http://docbook.org/ns/docbook"
+              xmlns:xlink="http://www.w3.org/1999/xlink"
+              xmlns:xi="http://www.w3.org/2001/XInclude"
+              xmlns:svg="http://www.w3.org/2000/svg"
+              xmlns:m="http://www.w3.org/1998/Math/MathML"
+              xmlns:html="http://www.w3.org/1999/xhtml"
+              xmlns:db="http://docbook.org/ns/docbook">
+  <title>Bibliographic links</title>
+
+  <biblioentry xml:id="bibKoelling2010">
+    <abbrev>Koelling2010</abbrev>
+
+    <author>
+      <personname>Michael Kölling</personname>
+    </author>
+
+    <date>2010</date>
+
+    <biblioid class="isbn">978-0-13-603753-8</biblioid>
+
+    <publisher>
+      <publishername>Prentice Hall</publishername>
+    </publisher>
+
+    <title xlink:href="http://www.greenfoot.org/book">Introduction to
+    Programming with <productname>Greenfoot</productname></title>
+  </biblioentry>
+</bibliography>
diff --git a/Sw1/sw1.xml b/Sw1/sw1.xml
new file mode 100644
index 000000000..d4e648f44
--- /dev/null
+++ b/Sw1/sw1.xml
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<book version="5.0" xmlns="http://docbook.org/ns/docbook"
+      xmlns:xlink="http://www.w3.org/1999/xlink"
+      xmlns:xi="http://www.w3.org/2001/XInclude"
+      xmlns:svg="http://www.w3.org/2000/svg"
+      xmlns:m="http://www.w3.org/1998/Math/MathML"
+      xmlns:html="http://www.w3.org/1999/xhtml"
+      xmlns:db="http://docbook.org/ns/docbook">
+  <info>
+    <title>Software Development 1</title>
+
+    <author>
+      <personname><firstname>Martin</firstname><surname>Goik</surname></personname>
+
+      <affiliation>
+        <orgname/>
+      </affiliation>
+    </author>
+
+    <pubdate/>
+  </info>
+
+  <chapter xml:id="sw1Intro">
+    <title>Getting Started</title>
+
+    <section xml:id="sw1Resources">
+      <title>Lecture related resources</title>
+
+      <glosslist>
+        <glossentry>
+          <glossterm>Books / Literature</glossterm>
+
+          <glossdef>
+            <itemizedlist>
+              <listitem>
+                <para><link linkend="bibKoelling2010">Introduction to
+                Programming with
+                <productname>Greenfoot</productname></link></para>
+              </listitem>
+
+              <listitem>
+                <para/>
+              </listitem>
+            </itemizedlist>
+          </glossdef>
+        </glossentry>
+
+        <glossentry>
+          <glossterm>Eclipse IDE</glossterm>
+
+          <glossdef>
+            <itemizedlist>
+              <listitem>
+                <para><link
+                xlink:href="http://wiki.eclipse.org/Eclipse/Installation">Installation</link></para>
+              </listitem>
+
+              <listitem>
+                <para>Video tutorials based on older eclipse 3.3 version but
+                still (march 2014) valid.</para>
+
+                <itemizedlist>
+                  <listitem>
+                    <para>Workbench <link
+                    xlink:href="http://eclipsetutorial.sourceforge.net/Workbench-Tutorial-Companion-Document.pdf">tutorial
+                    companion</link></para>
+                  </listitem>
+
+                  <listitem>
+                    <para>Using the debugger <link
+                    xlink:href="http://eclipsetutorial.sourceforge.net/Debugger-Tutorial-Companion-Document.pdf">tutorial
+                    companion</link>.</para>
+                  </listitem>
+                </itemizedlist>
+              </listitem>
+            </itemizedlist>
+          </glossdef>
+        </glossentry>
+      </glosslist>
+    </section>
+  </chapter>
+
+  <chapter xml:id="sd1IntroGreenfoot">
+    <title>Introduction to <link
+    xlink:href="http://www.greenfoot.org">Greenfoot</link></title>
+
+    <section xml:id="sd1GreenfootPrerequisites">
+      <title>Prerequisites</title>
+
+      <para>The following items may be considered with respect to practical
+      exercises</para>
+
+      <glosslist>
+        <glossentry>
+          <glossterm>Java</glossterm>
+
+          <glossdef>
+            <itemizedlist>
+              <listitem>
+                <para><link
+                xlink:href="http://docs.oracle.com/javase/7/docs/webnotes/install"
+                xml:id="sd1InstallJava">JDK 7 installation guide</link> (Yeah
+                buddy, you do need a <productname>JDK</productname> and **not
+                just** a <productname>JRE</productname>)</para>
+              </listitem>
+
+              <listitem>
+                <para><link
+                xlink:href="http://docs.oracle.com/javase/7/docs/api">Java 1.7
+                API documentation</link>, optional download for offline
+                usage.</para>
+              </listitem>
+            </itemizedlist>
+          </glossdef>
+        </glossentry>
+
+        <glossentry>
+          <glossterm><productname>Greenfoot</productname></glossterm>
+
+          <glossdef>
+            <itemizedlist>
+              <listitem>
+                <para><link
+                xlink:href="http://blogs.kent.ac.uk/mik/2012/01/joc-installation">Installing</link>
+                the <link
+                xlink:href="http://www.greenfoot.org/download">software</link>
+                on top of an existing <link
+                linkend="sd1InstallJava">JDK</link>.</para>
+              </listitem>
+
+              <listitem>
+                <para>The <productname>Greenfoot</productname> Java API for
+                <link
+                xlink:href="http://www.greenfoot.org/files/javadoc">online</link>
+                or <link
+                xlink:href="http://www.greenfoot.org/files/greenfoot-javadoc.zip">offline
+                usage</link>.</para>
+              </listitem>
+
+              <listitem>
+                <para>Introductory videos</para>
+
+                <itemizedlist>
+                  <listitem>
+                    <para><quote>The Joy of Code</quote> <link
+                    xlink:href="http://blogs.kent.ac.uk/mik/category/joy-of-code">examples</link>
+                    ranging from <link
+                    xlink:href="http://blogs.kent.ac.uk/mik/2012/01/joc-intro">JoC
+                    #1</link> to <link xlink:href="???"><link
+                    xlink:href="http://blogs.kent.ac.uk/mik/2012/07/joc-33/">Joc
+                    #33</link></link>. The order of items is somewhat
+                    confused.</para>
+                  </listitem>
+
+                  <listitem>
+                    <para><quote>The Joy of Code</quote> resembling examples
+                    <link
+                    xlink:href="http://blogs.kent.ac.uk/mik/2013/11/joc-german">available
+                    in German</link>, courteously donated by <personname>Frajo
+                    Ligmann</personname>.</para>
+                  </listitem>
+
+                  <listitem>
+                    <para>User supplied <link
+                    xlink:href="http://www.greenfoot.org/scenarios?sort_by=weighted_popularity">scenarios</link>.</para>
+                  </listitem>
+                </itemizedlist>
+              </listitem>
+            </itemizedlist>
+          </glossdef>
+        </glossentry>
+      </glosslist>
+    </section>
+
+    <section xml:id="sd1StartGreenfoot">
+      <title>Working with <productname>Greenfoot</productname></title>
+
+      <para>Quote from <xref linkend="bibKoelling2010"/>, p. 3:</para>
+
+      <blockquote>
+        <para>The best way to read this chapter (and indeed the whole book) is
+        by sitting at your computer with <productname>Greenfoot</productname>
+        open on your screen and the book open on your desk.</para>
+      </blockquote>
+
+      <itemizedlist>
+        <listitem>
+          <para>Compilation: .java --&gt; .class</para>
+        </listitem>
+
+        <listitem>
+          <para>Classes and objects</para>
+        </listitem>
+
+        <listitem>
+          <para/>
+        </listitem>
+      </itemizedlist>
+
+      <qandaset>
+        <title>Automatic initialization on startup</title>
+
+        <qandadiv>
+          <qandaentry>
+            <question>
+              <para>The <quote>leaves and wombats</quote> scenario does not
+              supply leaves and wombats automatically when starting the game.
+              Open the <classname>WombatWorld</classname> class (right click
+              <quote>Open editor</quote>). You will discover a method being
+              declared as <methodname>public void
+              populate()</methodname>.</para>
+
+              <para>The name suggests that this method may populate the game's
+              world with wombats and leaves on startup. Modify the code to
+              achieve this behaviour. Hint: Whenever a new instance of
+              <classname>WombatWorld</classname> is being created the method
+              <methodname>public WombatWorld()</methodname> is being
+              executed.</para>
+
+              <para>We will later discover that this is a so called
+              constructor. As the name suggests a constructor is being
+              executed whenever a new instance of a class is being
+              created.</para>
+            </question>
+
+            <answer>
+              <para>To achieve the desired behaviour we have to call the
+              method <methodname>populate()</methodname> <coref
+              linkend="sw1CallPopulate"/> from within the constructor's
+              code:</para>
+
+              <programlisting>public class WombatWorld {
+   public WombatWorld() {
+      super(8, 8, 60);        
+      setBackground("cell.jpg");
+      setPaintOrder(Wombat.class, Leaf.class);
+      <emphasis role="bold">populate()</emphasis>; <co
+                  xml:id="sw1CallPopulate"/>
+   }
+   /**
+    * Populate the world with a fixed scenario of wombats and leaves.
+    */    
+   public void populate() {
+      Wombat w1 = new Wombat();
+      addObject(w1, 3, 3);
+...</programlisting>
+            </answer>
+          </qandaentry>
+        </qandadiv>
+      </qandaset>
+    </section>
+  </chapter>
+
+  <xi:include href="bibliography.xml" xpointer="element(/1)"/>
+</book>
-- 
GitLab