-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubj.h
48 lines (41 loc) · 915 Bytes
/
subj.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef SUBJ_H
#define SUBJ_H
#include "list.h"
enum ItemType {None, Detail, FurnitureSet};
struct Base {
struct Item* next;
struct Item* prev;
enum ItemType type;
char* name;
int code;
};
struct Detail {
struct Item* next;
struct Item* prev;
enum ItemType type;
char* name;
int code;
char* material;
double length;
double width;
};
struct FurnitureSet {
struct Item* next;
struct Item* prev;
enum ItemType type;
char* name;
int code;
int quantity;
};
struct Base *Create(enum ItemType);
void InputStar(struct Detail*);
void InputPlanet(struct FurnitureSet*);
void InputItem(struct Base*);
void PrintDetail(struct Detail*);
void PrintFurnitureSet(struct FurnitureSet*);
void PrintItem(struct Base*);
void PrintSpaceItems(struct List*);
struct Base *SearchByName(struct List*, char*);
void SearchByCode(struct List*, double, double);
void SortList(struct List*);
#endif