-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBus_Reservation.h
More file actions
40 lines (34 loc) · 789 Bytes
/
Bus_Reservation.h
File metadata and controls
40 lines (34 loc) · 789 Bytes
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
#ifndef BUS_RESERVATION_H_INCLUDED
#define BUS_RESERVATION_H_INCLUDED
#include "Standard_Types.h"
//User Tickets Information
typedef struct book
{
u8 name[50];
u8 age;
u16 seats_booked;
u16 bus_number;
u16 id; //Num of the User
}booked;
//Bus information
typedef struct Bus
{
u8 source[50];
u8 destination[50];
u16 busNumber;
u32 totalSeats;
u32 availableSeats;
f32 fare;
}Bus;
//User Login Information
typedef struct User
{
u8 username[50];
u8 password[50];
}User;
// Protypes
u32 loginUser(User users[], u32 numUsers, char username[], char password[]);
void bookTicket(Bus buses[], u32 numBuses);
void cancelTicket(Bus buses[], u32 numBuses);
void checkBusStatus(Bus buses[], u32 numBuses);
#endif // BUS_RESERVATION_H_INCLUDED