-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecord.h
45 lines (36 loc) · 913 Bytes
/
record.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
#ifndef _RECORD_H_
#define _RECORD_H
enum VehicleType {
ROWER=1,
OSOBOWY,
CIEZAROWY,
MOTOCYKL
};
struct RegNum {
char letters[3];
char numbers[4];
};
struct Record {
struct RegNum registrationNumber;
char name[30];
enum VehicleType vehicleType;
int productionYear;
};
typedef struct Record Record;
int isRegistrationNumberValid(char* s);
void setRegistrationNumber(record* r, char* s);
void getRegistrationNumber(record* r);
void printRegistrationNumber(record* r);
int isNameValid(char* s);
void setName(record* r, char* s);
void getName(record* r);
void printName(record* r);
int isVehicleTypeValid(char* s);
void setVehicleType(record* r, int s);
void getVehicleType(record* r);
void printVehicleType(record* r);
int isProductionYearValid(char* s);
void setProductionYear(record* r, char* s);
void getProductionYear(record* r);
void printProductionYear(record* r);
#endif