2022-03-15
Max. 30 points
Name:
Task | Max. | Achieved |
---|---|---|
1 | 6 | |
2 | 10 | |
3 | 8 | |
4 | 6 | |
Sum | 30 |
Statement | True | False |
---|---|---|
Processes and tools over individuals and interactions | ||
Comprehensive documentation over working software | ||
Customer collaboration over contract negotiation | ||
Following a plan over responding to change |
Statement | True | False |
---|---|---|
Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. | ||
Deliver working software occasionally, from a couple of months to a couple of years, with a preference to the longer timescale. | ||
Reject changing requirements, particularly late in development. Agile processes harness a strict plan for the customer's competitive advantage. | ||
The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. | ||
Working software is the primary measure of progress. | ||
At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly. | ||
The best architectures, requirements, and designs emerge from self-organizing teams. | ||
Complexity – the art of maximizing complicated solutions – is essential. |
/etc/apache2/conf-available
. Welche Befehle muss sie eingeben, damit der
folgende Verzeichnisbaum in Ihrem Home Verzeichnis angelegt wird?
(4 Punkte)└── repos ├── code ├── configuration └── github
mkdir -p ~/repos/code ~/repos/configuration ~/repos/github
Alternatively, switch to home via `cd` first and skip the `~/`.
It is also possible to create each directory on a separate line.
If ~/repos
is created separately first, the -p
flag can be omitted.
~/public_html
von allen Benutzern gelesen, aber nur von
ihrem Benutzer verändert werden kann. Kein anderer Benutzer auf dem
System, egal in welcher Benutzergruppe, darf Schreibzugriff darauf
haben, aber jeder muss Lesezugriff haben.
Schreibe einen Befehl, mit dem diese Änderung durchgeführt wird.
(2 Punkte)
chmod 755 ~/public_html
~/code/c++
wechseln, um dort die C++ Datei
4ahel.cpp
zu kompilieren. Die ausführbare Datei soll den
Namen 4ahel
haben und nach dem kompilieren
gestartet werden.
Welche Befehle muss sie eingeben?
(4 Punkte)
cd ~/code/c++
g++ 4ahel.cpp -o 4ahel
./4ahel
void swap(int *a, int *b)
in C++ welche die Werte der beiden Variablen a
und
b
austauscht.
void swap(int *a, int *b) {
int c = *a;
*a = *b;
*b = c;
}
int max_of_four(int a, int b, int c, int d)
in C++
welche das Maximum der vier Parameter retourniert.
int max(int a, int b) {
if (a > b) { return a; }
return b;
}
int max_of_four(int a, int b, int c, int d) {
return max(a, max(b, max(c, d)));
}
printf
oder cout
oder dergleichen aufgerufen
wird), so ist "-" als richtige Antwort zu verwenden.
#include <iostream>
#include <vector>
int main() {
std::vector<int> numbers = {3, 9, 1, 12};
std::cout << numbers[1] << std::endl;
return 0;
}
#include <iostream>
#include <vector>
void print_vector(std::vector<std::string> v);
int main() {
std::vector<std::string> names = {"Pat", "Chris", "Sue"};
print_vector(names);
return 0;
}
void print_vector(std::vector<std::string> v) {
for (auto it = v.begin(); it != v.end(); ++it) {
std::cout << *it << std::endl;
}
}
#include <iostream>
#include <vector>
int main() {
std::vector<int> numbers = {6, 3, 1};
print_vector(numbers);
return 0;
}
void print_vector(std::vector<int> v) {
for (auto &elem : v) {
std::cout << elem << std::endl;
}
}