Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
ed1f31ee
Commit
ed1f31ee
authored
2 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
better explanation
parent
861ddd0a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Doc/Sd1/Arrays/arrays.xml
+32
-21
32 additions, 21 deletions
Doc/Sd1/Arrays/arrays.xml
with
32 additions
and
21 deletions
Doc/Sd1/Arrays/arrays.xml
+
32
−
21
View file @
ed1f31ee
...
@@ -1119,7 +1119,7 @@ System.out.format("An integer %3d and a double value %6.2f\n",
...
@@ -1119,7 +1119,7 @@ System.out.format("An integer %3d and a double value %6.2f\n",
Integer.valueOf(secondValue)};
</programlisting>
Integer.valueOf(secondValue)};
</programlisting>
<para>
As you can see this code is clumsy in comparison to the
<para>
As you can see this code is clumsy in comparison to the
<quote>
varargs
</quote>
mechanism.
</para>
<quote>
varargs
</quote>
mechanism.
</para>
</listitem>
</listitem>
<listitem>
<listitem>
...
@@ -1968,12 +1968,12 @@ Parameter 3: -13</screen>
...
@@ -1968,12 +1968,12 @@ Parameter 3: -13</screen>
<mediaobject>
<mediaobject>
<imageobjectco>
<imageobjectco>
<areaspec
otherunits=
"imagemap"
units=
"other"
>
<areaspec
otherunits=
"imagemap"
units=
"other"
>
<area
units=
"calspair"
coords=
"407,98,521,139"
<area
coords=
"407,98,521,139"
linkends=
"sd1_array_fig_ideaRunConfig-1"
linkends=
"sd1_array_fig_ideaRunConfig-1"
units=
"calspair"
xml:id=
"__area-ypcokm"
/>
xml:id=
"__area-ypcokm"
/>
<area
units=
"calspair"
coords=
"410,161,526,202"
<area
coords=
"410,161,526,202"
linkends=
"sd1_array_fig_ideaRunConfig-2"
linkends=
"sd1_array_fig_ideaRunConfig-2"
units=
"calspair"
xml:id=
"__area-qny3zv"
/>
xml:id=
"__area-qny3zv"
/>
</areaspec>
</areaspec>
...
@@ -2778,11 +2778,11 @@ June, please enter next field's number:</screen>
...
@@ -2778,11 +2778,11 @@ June, please enter next field's number:</screen>
<listitem>
<listitem>
<para>
The numbering hints should appear
<para>
The numbering hints should appear
<quote>
right
</quote>
to the current
tic-tac-toe board
<quote>
right
</quote>
to the current
rather than on top of it. Furthermore only
the
<productname>
tic-tac-toe
</productname>
board ra
the
r
remaining free fields shall be on offer. In the next
than on top of it. Furthermore only the remaining free
example this restriction excludes position
fields shall be on offer. In the next example this
<quote>
4
</quote>
:
</para>
restriction excludes position
<quote>
4
</quote>
:
</para>
<screen>
Player June(O)
<screen>
Player June(O)
vs. Bill(X) Free fields
vs. Bill(X) Free fields
...
@@ -2812,22 +2812,23 @@ Bill, please enter next field's number:</screen>
...
@@ -2812,22 +2812,23 @@ Bill, please enter next field's number:</screen>
</section>
</section>
<section
xml:id=
"sd1SectTicTacToeComputerVsHuman"
>
<section
xml:id=
"sd1SectTicTacToeComputerVsHuman"
>
<title>
Tic-tac-toe, Computer vs. human
</title>
<title><productname>
Tic-tac-toe
</productname>
, Computer
<abbrev>
vs.
</abbrev>
human
</title>
<qandaset
defaultlabel=
"qanda"
xml:id=
"sd1QandaTicTacToeComputerVsHuman"
>
<qandaset
defaultlabel=
"qanda"
xml:id=
"sd1QandaTicTacToeComputerVsHuman"
>
<qandadiv>
<qandadiv>
<qandaentry>
<qandaentry>
<question>
<question>
<para>
This exercise is beyond the current lecture's scope. Feel
<para>
This exercise is beyond the current lecture's scope with
free to solve it at your own discretion if you are desperately
respect to complexity. Feel free to solve it at your own
searching for a more challenging problem.
</para>
discretion in case of hunting for challenges. Your
implementation will allow humans playing
<para>
Your solution should allow for humans playing
<productname>
tic-tac-toe
</productname>
against a
<productname>
tic-tac-toe
</productname>
against a
computer:
</para>
computer:
</para>
<figure
xml:id=
"sd1FigTicTacToeHumanVsComputer"
>
<figure
xml:id=
"sd1FigTicTacToeHumanVsComputer"
>
<title>
Two Tic-tac-toe players fighting each other.
</title>
<title>
Two
<productname>
Tic-tac-toe
</productname>
players
fighting each other.
</title>
<mediaobject>
<mediaobject>
<videoobject>
<videoobject>
...
@@ -2878,10 +2879,20 @@ Bill, please enter next field's number:</screen>
...
@@ -2878,10 +2879,20 @@ Bill, please enter next field's number:</screen>
<qandaentry>
<qandaentry>
<question>
<question>
<para>
Extend
<xref
linkend=
"sd1QandaIntStoreUnbounded"
/>
by
<para>
Extend
<xref
linkend=
"sd1QandaIntStoreUnbounded"
/>
by
providing a method
<methodname>
double getAverage()
</methodname>
to
providing:
</para>
provide statistical data on a given set of integer values. In
addition provide a method
<methodname>
void clear()
</methodname>
<orderedlist>
enabling a user to support different sets of values.
</para>
<listitem>
<para>
A method
<methodname>
double getAverage()
</methodname>
providing statistical data on a given set of integer
values.
</para>
</listitem>
<listitem>
<para>
A method
<methodname>
void clear()
</methodname>
enabling
a user to insert new sets of values.
</para>
</listitem>
</orderedlist>
<para>
Do not forget to extend your
<xref
linkend=
"glo_Junit"
/>
<para>
Do not forget to extend your
<xref
linkend=
"glo_Junit"
/>
tests. You may want to import the
<link
tests. You may want to import the
<link
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment