Здравствуйте форумчане. Я учусь на программиста, первый курс. Нам дали проект. Помогите пожалуйста написать код на С программировании. Суть такая что бы написать "систему бронирования авиабилетов". Был бы очень сильно благодарен. Вот суть задания: 1.\tFlight Booking System ( 3 persons) 1)\tRequirements Flight information should be stored in a file, so system must provide input and output function of the file. Your system could browse all flight records, could display, inquiry the flights. Your system should also provide a menu using keyboard to select options. 2)\tSystem design The system includes these modules: flight information input, browsing and inquiry module. 3)\tdetailed design
Struct {\t Char flightNo[10]; Char start[10]; //departure city Char end[10]; //arrive city Float day; //flying time Int totalTicket; // The total number of tickets Int sellTicket; // The total number of tickets sold }Flight[N]; //Flight structure
(1) Input module Use ‘fwrite’ or ‘fprintf’ functions write flight info into flight info file. (2) browse module Use split-screen to list flight info, 10 records could be listed on one screen and move to next screen by press any key. Read data from the file(fread, fscanf) then display. (3) inquiry module Use menu options select query field, you could search a flight in terms of flight number, departure city, arrive city or flying time. You could just use general search algorithm in the module.
В чем проблема? Рейсы самолетов реальные брать надо или самому выдумать? Если 2 то простой забей массив маршрутами, ищи в массиве самолет, в котором 3 и более места и бронируй на него билет
>>156381534 (OP) А потом вот такие программисты приходят и не могут мне объяснить зачем инициализировать переменные, и в каких отношениях находится имя массива и &mass[0].
1.\tFlight Booking System ( 3 persons)
1)\tRequirements
Flight information should be stored in a file, so system must provide input and output function of the file. Your system could browse all flight records, could display, inquiry the flights. Your system should also provide a menu using keyboard to select options.
2)\tSystem design
The system includes these modules: flight information input, browsing and inquiry module.
3)\tdetailed design
Struct
{\t
Char flightNo[10];
Char start[10]; //departure city
Char end[10]; //arrive city
Float day; //flying time
Int totalTicket; // The total number of tickets
Int sellTicket; // The total number of tickets sold
}Flight[N]; //Flight structure
(1) Input module
Use ‘fwrite’ or ‘fprintf’ functions write flight info into flight info file.
(2) browse module
Use split-screen to list flight info, 10 records could be listed on one screen and move to next screen by press any key. Read data from the file(fread, fscanf) then display.
(3) inquiry module
Use menu options select query field, you could search a flight in terms of flight number, departure city, arrive city or flying time. You could just use general search algorithm in the module.