OOP HomeWork

This commit is contained in:
e2hang
2025-08-11 00:01:30 +08:00
commit e8a5ca2363
119 changed files with 3187 additions and 0 deletions

21
oop_hw6/hw4/box.h Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
#include <iostream>
#include "fruit.h"
class Box {
private:
void* fruit[8]{};
int num = 0;
int TotalDate = 0;
int lossTotal = 0;
public:
int returnDate();
Box& inBox(Fruit& x);
int numApple();
int numOrange();
int WeightLoss();
int totalWeight();
void UPDATE_ALL();
friend Fruit;
};