Professional Documents
Culture Documents
ЛР4
ЛР4
Код програми :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OOP
{
static class Program
{
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace KulganMan
{
class VUZ
{
Datas dete;
string Name;
DateTime vul;
TextBox t1 = Application.OpenForms["Form1"].Controls["textBox1"] as TextBox;
public VUZ(Datas c1)
{
this.dete = c1;
}
public void wwid(DateTime sd)
{
Name = t1.Text;
vul = dete.wiw(sd);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KulganMan
{
class Datas
{
DateTime daat;
public DateTime wiw(DateTime c1)
{
daat = c1;
return c1;
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace KulganMan
{
public partial class Form1 : Form
{
List<VUZ> ar = new List<VUZ>();
public Form1()
{
InitializeComponent();
}
Арк.
2
Змн. Арк. № докум. Підпис Дата
Висновок. На цій лабораторній роботі я одержав практичні навички
створення об'єктів-груп (агрегація) і використання методів-ітераторів.
Арк.
3
Змн. Арк. № докум. Підпис Дата