Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Gerwinski
hp
Commits
dbb0e952
Commit
dbb0e952
authored
6 years ago
by
Peter Gerwinski
Browse files
Options
Downloads
Patches
Plain Diff
Übungsaufgaben 12.11.2018
parent
21b15377
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
20181112/hp-uebung-20181112.pdf
+0
-0
0 additions, 0 deletions
20181112/hp-uebung-20181112.pdf
20181112/hp-uebung-20181112.tex
+86
-0
86 additions, 0 deletions
20181112/hp-uebung-20181112.tex
with
86 additions
and
0 deletions
20181112/hp-uebung-20181112.pdf
0 → 100644
+
0
−
0
View file @
dbb0e952
File added
This diff is collapsed.
Click to expand it.
20181112/hp-uebung-20181112.tex
0 → 100644
+
86
−
0
View file @
dbb0e952
% hp-uebung-20181112.pdf - Exercises on Low-Level Programming / Applied Computer Sciences
% Copyright (C) 2013, 2015, 2016, 2017, 2018 Peter Gerwinski
%
% This document is free software: you can redistribute it and/or
% modify it either under the terms of the Creative Commons
% Attribution-ShareAlike 3.0 License, or under the terms of the
% GNU General Public License as published by the Free Software
% Foundation, either version 3 of the License, or (at your option)
% any later version.
%
% This document is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this document. If not, see <http://www.gnu.org/licenses/>.
%
% You should have received a copy of the Creative Commons
% Attribution-ShareAlike 3.0 Unported License along with this
% document. If not, see <http://creativecommons.org/licenses/>.
% README: Text-Grafik-Bibliothek
\documentclass
[a4paper]
{
article
}
\usepackage
{
pgscript
}
\begin{document}
% \thispagestyle{empty}
\section*
{
Hardwarenahe Programmierung
\\
Übungsaufgaben -- 12.
\
November 2018
}
% Diese Übung enthält Punkteangaben wie in einer Klausur.
% Um zu "`bestehen"', müssen Sie innerhalb von 80 Minuten
% unter Verwendung ausschließlich zugelassener Hilfsmittel
% 14 Punkte (von insgesamt \totalpoints) erreichen.
\exercise
{
Text-Grafik-Bibliothek
}
Schreiben Sie eine Bibliothek für "`Text-Grafik"' mit folgenden Funktionen:
\vspace*
{
-
\medskipamount
}
\begin{itemize}
\item
\lstinline
|void clear (char c)|
\\
Bildschirm auf Zeichen
\lstinline
|c| löschen,
\\
also komplett mit diesem Zeichen (z.
\,
B.: Leerzeichen) füllen
\item
\lstinline
|void put
_
point (int x, int y, char c)|
\\
Punkt setzen (z.
\,
B.
\
einen Stern (
\lstinline
{
*
}
) an die Stelle
$
(
x,y
)
$
"`malen"')
\item
\lstinline
|char get
_
point (int x, int y)|
\\
Punkt lesen
% \item
% \lstinline|void fill (int x, int y, char c, char o)|\\
% Fläche in der "`Farbe"' \lstinline|o|,
% die den Punkt \lstinline|(x, y)| enthält,
% mit der "`Farbe"' \lstinline|c| ausmalen
\item
\lstinline
|void display (void)|
\\
das Gezeichnete auf dem Bildschirm ausgeben
\end{itemize}
Hinweise:
\vspace*
{
-
\medskipamount
}
\begin{itemize}
\item
Eine C-Bibliothek besteht aus (mindestens)
einer
\file
{
.h
}
-Datei und einer
\file
{
.c
}
-Datei.
\item
Verwenden Sie ein Array als "`Bildschirm"'.
Vor dem Aufruf der Funktion
\lstinline
|display()| ist nichts zu sehen;
\\
alle Grafikoperationen erfolgen auf dem Array.
\item
Verwenden Sie Präprozessor-Konstante,
z.
\,
B.
\ \lstinline
{
WIDTH
}
und
\lstinline
{
HEIGHT
}
,
\\
um Höhe und Breite des "`Bildschirms"' festzulegen.
\item
Schreiben Sie zusätzlich ein Test-Programm,
das alle Funktionen der Bibliothek benutzt,
\\
um ein hübsches Bild (z.
\,
B.
\
ein stilisiertes Gesicht -- "`Smiley"')
auszugeben.
\end{itemize}
\end{document}
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