- •Розділ і. Загальні відомості
- •1.1 Загальні відомості про Delphi
- •1.2 Основні оператори програми
- •Розділ іі. Постановка задачі та її вирішення
- •2.1 Опис елементів програми
- •2.2 Постановка задачі
- •2.4 Опис інтерфейсу
- •2.5 Опис програми
- •Список використаних джерел
- •Додаток а Код програми
- •Висновок
- •Додаток в
Висновок
За час курсової роботи, вдосконавили вминня і навичок роботи з науковою літературою та аналізувати проблеми. Виправляти помилки та вдосконалювати програми не тільки різнтми функціями, а й візуально, додавати та прикрашати програму різними картинками та кольоровими фонами.
Закріпили знання, які здобули на протязі всього року та розвинули вмінння логічно і аргументовано висловлювати свої думки, пропозиції, робити висновкі на основі опрацьованих джерел.
Список використаних джерел
Березін Б.І., Березін С.Б. Початковий курс Delphi - М.: ДІАЛОГ-МІФІ, 1996.
Об'єктно-орієнтоване програмування для початківців Лесневський А.С.5. Вірт Н. Алгоритми та структури даних. - М.: Світ, 1989.
Даген В.А., Грігас Г. К., Аугутіс К.Ф. 100 завдань з програмування. - М.: Просвещение, 1993.
Йенсен К., Вірт Н. Delphi - керівництво для користувачів і опис мови. - М.: Світ, 1982.
Касаткін В. Н. Інформація. Алгоритми. ЕОМ. - М.: Просвещение, 1991.
Керниган Б., Рітчі Д. Мова програмування Delphi: Пер. з англ. - М.: Фінанси і статистика, 1992.
Миков А. І. Інформатика. Введення в комп'ютерні науки. - Перм: Вид-во ПГУ, 1998.
Могильов А. В., Пак Н.І., Хеннер Є.К. Інформатика: Учеб. посібник для студ. пед. вузів / За ред. Є. К. Хеннер. - М.: Изд. центр «Академія», 1999.
Нестандартні прийоми програмування на Delphi. Автор: Ю. Ревич
Назва: Самовчитель Паскаль і Дельфі . Автор: Володимир Попов
Додаток а Код програми
procedure TForm1.Button3Click(Sender: TObject);
begin
if combobox1.ItemIndex=0 then form2.show;
if combobox1.ItemIndex = 1 then form4.show;
if combobox1.ItemIndex=2 then form5.show;
if combobox1.ItemIndex=3 then form6.show;
if combobox1.ItemIndex=4 then form7.show;
if combobox1.ItemIndex=5 then form8.show;
if combobox1.ItemIndex=6 then form9.show;
if combobox1.ItemIndex=7 then form10.show;
if combobox1.ItemIndex=8 then form11.show;
if combobox1.ItemIndex=9 then form12.show;
end;
procedure TForm1.Button6Click(Sender: TObject);
var
col, Row : integer;
S: String;
q,w:integer;
begin
S := Edit4.Text;
q:=row;
q := -1;
for Col := 0 to form2.StringGrid1.ColCount - 1 do begin
q := form2.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form2.StringGrid1.Selection := TGridRect(rect( 1,q,6,q ));
q := -1;
for Col := 0 to form2.StringGrid1.ColCount - 1 do begin
q := form2.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then form2.Show else form2.Visible:=false;
for col:=0 to form2.stringgrid2.colcount-1 do begin
q:=form2.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form2.StringGrid2.Selection := TGridRect(rect( 1,q,6,q ));
q := -1;
for Col := 0 to form4.StringGrid1.ColCount - 1 do begin
q := form4.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form4.StringGrid1.Selection := TGridRect(rect( 1,q,6,q )) ;
for col:=0 to form4.stringgrid2.colcount-1 do begin
q:=form4.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form4.StringGrid2.Selection := TGridRect(rect( 1,q,6,q ));
for col:=0 to form4.stringgrid2.colcount-1 do begin
q:=form4.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then form4.Show else form4.Visible:=false;
q := -1;
for Col := 0 to form5.StringGrid1.ColCount - 1 do begin
q := form5.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form5.StringGrid1.Selection := TGridRect(rect( 1,q,6,q ));
for col:=0 to form4.stringgrid2.colcount-1 do begin
q:=form5.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form5.StringGrid2.Selection := TGridRect(rect( 1,q,6,q ));
for col:=0 to form4.stringgrid2.colcount-1 do begin
q:=form5.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then form5.Show;
q := -1;
for Col := 0 to form6.StringGrid1.ColCount - 1 do begin
q := form6.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form6.StringGrid1.Selection := TGridRect(rect( 1,q,6,q )) ;
for col:=0 to form6.stringgrid2.colcount-1 do begin
q:=form6.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form6.StringGrid2.Selection := TGridRect(rect( 1,q,6,q ));
for col:=0 to form6.stringgrid2.colcount-1 do begin
q:=form6.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then form6.Show;
q := -1;
for Col := 0 to form7.StringGrid1.ColCount - 1 do begin
q := form7.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form7.StringGrid1.Selection := TGridRect(rect( 1,q,6,q )) ;
for col:=0 to form7.stringgrid2.colcount-1 do begin
q:=form7.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form7.StringGrid2.Selection := TGridRect(rect( 1,q,6,q ));
for col:=0 to form7.stringgrid2.colcount-1 do begin
q:=form7.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then form7.Show;
q := -1;
for Col := 0 to form8.StringGrid1.ColCount - 1 do begin
q := form8.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form8.StringGrid1.Selection := TGridRect(rect( 1,q,6,q )) ;
for col:=0 to form8.stringgrid2.colcount-1 do begin
q:=form8.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form7.StringGrid2.Selection := TGridRect(rect( 1,q,6,q ));
for col:=0 to form8.stringgrid2.colcount-1 do begin
q:=form8.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then form8.Show;
q := -1;
for Col := 0 to form9.StringGrid1.ColCount - 1 do begin
q := form9.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form9.StringGrid1.Selection := TGridRect(rect( 1,q,6,q )) ;
for col:=0 to form9.stringgrid2.colcount-1 do begin
q:=form9.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form9.StringGrid2.Selection := TGridRect(rect( 1,q,6,q ));
for col:=0 to form9.stringgrid2.colcount-1 do begin
q:=form9.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then form9.Show;
q := -1;
for Col := 0 to form10.StringGrid1.ColCount - 1 do begin
q := form10.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form10.StringGrid1.Selection := TGridRect(rect( 1,q,6,q )) ;
for col:=0 to form10.stringgrid2.colcount-1 do begin
q:=form10.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form10.StringGrid2.Selection := TGridRect(rect( 1,q,6,q ));
for col:=0 to form10.stringgrid2.colcount-1 do begin
q:=form10.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then form10.Show;
q := -1;
for Col := 0 to form11.StringGrid1.ColCount - 1 do begin
q := form11.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form11.StringGrid1.Selection := TGridRect(rect( 1,q,10,q )) ;
for col:=0 to form11.stringgrid2.colcount-1 do begin
q:=form11.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form11.StringGrid2.Selection := TGridRect(rect( 1,q,7,q ));
for col:=0 to form11.stringgrid2.colcount-1 do begin
q:=form11.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then form11.Show;
q := -1;
for Col := 0 to form12.StringGrid1.ColCount - 1 do begin
q := form12.StringGrid1.Cols[Col].IndexOf(S) ;
if q > -1 then Break;
end;
if q > -1 then
form12.StringGrid1.Selection := TGridRect(rect( 1,q,6,q));
for col:=0 to form12.stringgrid2.colcount-1 do begin
q:=form12.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then
form12.StringGrid2.Selection := TGridRect(rect( 1,q,6,q ));
for col:=0 to form12.stringgrid2.colcount-1 do begin
q:=form12.StringGrid2.Cols[col].IndexOf(s) ;
if q>-1 then break;
end;
if q > -1 then form12.Show;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
form2.Show; form2.Visible:=false;
form4.Show; form4.Visible:=false;
form5.Show; form5.Visible:=false;
form6.Show; form6.Visible:=false;
form7.Show; form7.Visible:=false;
form8.Show; form8.Visible:=false;
form9.Show; form9.Visible:=false;
form10.Show; form10.Visible:=false;
form11.Show; form11.Visible:=false;
form12.Show; form12.Visible:=false;
form14.Show; form14.Visible:=false;
end;
procedure TForm1.R1Click(Sender: TObject);
begin
form14.show;
end;
procedure TForm1.N2Click(Sender: TObject);
begin
MessageBox(Handle, 'Програма "Розклад руху поїздів". Написав програму Козак В.А., ОПСК-31', 'Розклад руху поїздів', 0);
end;
procedure TForm16.Button1Click(Sender: TObject);
Var I : Byte;
F : TextFile;
S : String;
begin
AssignFile(F, form15.Edit1.Text);
Rewrite(F);
For I := 1 to form2.StringGrid2.RowCount - 1 do
Begin
S := form2.StringGrid2.Cells[1,I] +' '+form2.StringGrid2.Cells[2,I]+' '+form2.StringGrid2.Cells[3,I]
+' '+form2.StringGrid2.Cells[4,I]+' '+form2.StringGrid2.Cells[5,I]+' '+form2.StringGrid2.Cells[6,I]+' '+form2.StringGrid2.Cells[7,I]+' '+form2.StringGrid2.Cells[6,I];
Writeln(F,S)
end;
CloseFile(F)
end;
procedure TForm2.StringGrid1Enter(Sender: TObject);
begin
StringGrid1.Cells[5,0]:='Відправлення';
stringgrid1.Cells[4,0]:='Прибуття';
stringgrid1.Cells[2,0]:='Прибуття';
stringgrid1.Cells[3,0]:='Відправлення';
stringgrid1.Cells[1,0]:='Станції';
stringgrid1.Cells[0,0]:='№';
stringgrid1.Cells[0,1]:='1';
stringgrid1.Cells[0,2]:='2';
stringgrid1.Cells[0,3]:='3';
stringgrid1.Cells[0,4]:='4';
stringgrid1.Cells[0,5]:='5';
stringgrid1.Cells[0,6]:='6';
stringgrid1.Cells[0,7]:='7';
stringgrid1.Cells[0,8]:='8';
stringgrid1.Cells[0,9]:='9';
stringgrid1.Cells[0,10]:='10';
stringgrid1.Cells[1,1]:='Бахмач пас.';
stringgrid1.Cells[1,2]:='Часниківка';
stringgrid1.Cells[1,3]:='Доч';
stringgrid1.Cells[1,4]:='Бондарівка';
stringgrid1.Cells[1,5]:='Макошине';
stringgrid1.Cells[1,6]:='Мена';
stringgrid1.Cells[1,7]:='Низківка';
stringgrid1.Cells[1,8]:='Лютівка';
stringgrid1.Cells[1,9]:='Щимель'; stringgrid1.Cells[1,10]:='Щорс'; stringgrid1.Cells[2,1]:='-'; stringgrid1.Cells[2,2]:='8:40'; stringgrid1.Cells[2,3]:='9:06'; stringgrid1.Cells[2,4]:='9:28'; stringgrid1.Cells[2,5]:='9:43'; stringgrid1.Cells[2,6]:='9:57'; stringgrid1.Cells[2,7]:='10:23'; stringgrid1.Cells[2,8]:='10:31'; stringgrid1.Cells[2,9]:='10:42'; stringgrid1.Cells[2,10]:='10:52'; stringgrid1.Cells[3,1]:='8:20'; stringgrid1.Cells[3,2]:='8:48';
stringgrid1.Cells[3,3]:='9:08';
stringgrid1.Cells[3,4]:='9:29';
stringgrid1.Cells[3,5]:='9:44';
stringgrid1.Cells[3,6]:='9:59';
stringgrid1.Cells[3,7]:='10:25';
stringgrid1.Cells[3,8]:='10:32';
stringgrid1.Cells[3,9]:='10:43';
stringgrid1.Cells[3,10]:='-';
stringgrid1.Cells[4,1]:='-';
stringgrid1.Cells[4,2]:='20:30';
stringgrid1.Cells[4,3]:='20:47';
stringgrid1.Cells[4,4]:='21:19';
stringgrid1.Cells[4,5]:='21:34';
stringgrid1.Cells[4,6]:='21:48';
stringgrid1.Cells[4,7]:='22:14';
stringgrid1.Cells[4,8]:='22:22';
stringgrid1.Cells[4,9]:='22:32';
stringgrid1.Cells[4,10]:='22:42';
stringgrid1.Cells[5,1]:='20:10';
stringgrid1.Cells[5,2]:='20:31';
stringgrid1.Cells[5,3]:='20:57';
stringgrid1.Cells[5,4]:='21:20';
stringgrid1.Cells[5,5]:='21:35';
stringgrid1.Cells[5,6]:='21:50';
stringgrid1.Cells[5,7]:='22:15';
stringgrid1.Cells[5,8]:='22:23';
stringgrid1.Cells[5,9]:='22:33';
stringgrid1.Cells[5,10]:='-';
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
StringGrid2.Cells[5,0]:='Відправлення';
stringgrid2.Cells[4,0]:='Прибуття';
stringgrid2.Cells[2,0]:='Прибуття';
stringgrid2.Cells[3,0]:='Відправлення';
stringgrid2.Cells[1,0]:='Станції';
stringgrid2.Cells[0,0]:='№';
stringgrid2.Cells[0,1]:='1';
stringgrid2.Cells[0,2]:='2';
stringgrid2.Cells[0,3]:='3';
stringgrid2.Cells[0,4]:='4';
stringgrid2.Cells[0,5]:='5';
stringgrid2.Cells[0,6]:='6';
stringgrid2.Cells[0,7]:='7';
stringgrid2.Cells[0,8]:='8';
stringgrid2.Cells[0,9]:='9';
stringgrid2.Cells[0,10]:='10';
stringgrid2.Cells[1,1]:='Щорс';
stringgrid2.Cells[1,2]:='Щимель';
stringgrid2.Cells[1,3]:='Лютівка';
stringgrid2.Cells[1,4]:='Низківка';
stringgrid2.Cells[1,5]:='Мена';
stringgrid2.Cells[1,6]:='Макошине';
stringgrid2.Cells[1,7]:='Бондарівка';
stringgrid2.Cells[1,8]:='Доч';
stringgrid2.Cells[1,9]:='Часинівка';
stringgrid2.Cells[1,10]:=',Бахмач пас.';
stringgrid2.Cells[2,1]:='-';
stringgrid2.Cells[2,2]:='5:06';
stringgrid2.Cells[2,3]:='5:18';
stringgrid2.Cells[2,4]:='5:28';
stringgrid2.Cells[2,5]:='5:54';
stringgrid2.Cells[2,6]:='6:08';
stringgrid2.Cells[2,7]:='6:23';
stringgrid2.Cells[2,8]:='6:45';
stringgrid2.Cells[2,9]:='7:04';
stringgrid2.Cells[2,10]:='7:30';
stringgrid2.Cells[3,1]:='5:00'; stringgrid2.Cells[3,2]:='5:07';
stringgrid2.Cells[3,3]:='5:19';
stringgrid2.Cells[3,4]:='5:31';
stringgrid2.Cells[3,5]:='5:56';
stringgrid2.Cells[3,6]:='6:09';
stringgrid2.Cells[3,7]:='6:24';
stringgrid2.Cells[3,8]:='6:47';
stringgrid2.Cells[3,9]:='7:05';
stringgrid2.Cells[3,10]:='-';
stringgrid2.Cells[4,1]:='-';
stringgrid2.Cells[4,2]:='17:08';
stringgrid2.Cells[4,3]:='17:20';
stringgrid2.Cells[4,4]:='17:32';
stringgrid2.Cells[4,5]:='18:01';
stringgrid2.Cells[4,6]:='18:15';
stringgrid2.Cells[4,7]:='18:28';
stringgrid2.Cells[4,8]:='18:49';
stringgrid2.Cells[4,9]:='19:05';
stringgrid2.Cells[4,10]:='19:25';
stringgrid2.Cells[5,1]:='17:02';
stringgrid2.Cells[5,2]:='17:9';
stringgrid2.Cells[5,3]:='17:21';
stringgrid2.Cells[5,4]:='17:38';
stringgrid2.Cells[5,5]:='18:02';
stringgrid2.Cells[5,6]:='18:16';
stringgrid2.Cells[5,7]:='18:29';
stringgrid2.Cells[5,8]:='18:50';
stringgrid2.Cells[5,9]:='19:06';
stringgrid2.Cells[5,10]:='-';
end;
end.
