mirror of
https://github.com/dancojocaru2000/y3s2-cciot-hw.git
synced 2025-02-23 09:19:35 +02:00
28 lines
458 B
Markdown
28 lines
458 B
Markdown
# CCIoT Homework Lab 1
|
||
|
||
## Slide 11
|
||
|
||
### Problem
|
||
|
||
```cpp
|
||
class Human
|
||
{
|
||
public:
|
||
Human();
|
||
~Human();
|
||
std::string name;
|
||
int age;
|
||
};
|
||
```
|
||
|
||
Try this:
|
||
|
||
1. Create 4 humans.
|
||
2. Give them names and ages.
|
||
3. Retrieve the data from all humans and print it to the screen.
|
||
4. Print the data for the youngest human.
|
||
5. Print all humans’ names in descending order by their names.
|
||
|
||
### Solution
|
||
|
||
See [slide11.cpp](./slide11.cpp).
|