HW2 Publish

This commit is contained in:
2025-10-08 00:01:57 +08:00
commit fd471a68c4
19 changed files with 2357 additions and 0 deletions

20
include/Snack.hpp Normal file
View File

@@ -0,0 +1,20 @@
#ifndef SNACK_HPP
#define SNACK_HPP
#include <string>
class Snack {
public:
Snack(std::string snackName);
Snack(std::string snackName, int snackAmount);
[[nodiscard]] std::string getName() const;
[[nodiscard]] int getAmount() const;
void setAmount(int snackAmount);
private:
std::string name;
int amount;
};
#endif