done lab4

This commit is contained in:
sofiaivv 2023-12-12 01:01:01 +04:00
parent 21b5e3d07b
commit 534f4489ba
5 changed files with 336 additions and 72 deletions

View File

@ -63,14 +63,13 @@ namespace MotorBoat.Generics
/// <param name="collect"></param> /// <param name="collect"></param>
/// <param name="obj"></param> /// <param name="obj"></param>
/// <returns></returns> /// <returns></returns>
public static int operator +(BoatsGenericCollection<T, U> collect, T? public static bool operator +(BoatsGenericCollection<T, U> collect, T? obj)
obj)
{ {
if (obj == null) if (obj == null)
{ {
return -1; return false;
} }
return collect?._collection.Insert(obj) ?? -1; return collect?._collection.Insert(obj) ?? false;
} }
/// <summary> /// <summary>
@ -79,15 +78,14 @@ namespace MotorBoat.Generics
/// <param name="collect"></param> /// <param name="collect"></param>
/// <param name="pos"></param> /// <param name="pos"></param>
/// <returns></returns> /// <returns></returns>
public static bool operator -(BoatsGenericCollection<T, U> collect, int public static T? operator -(BoatsGenericCollection<T, U>? collect, int pos)
pos)
{ {
T? obj = collect._collection.Get(pos); T? obj = collect._collection[pos];
if (obj != null) if (obj != null)
{ {
collect._collection.Remove(pos); collect._collection.Remove(pos);
} }
return false; return obj;
} }
/// <summary> /// <summary>
@ -97,7 +95,7 @@ namespace MotorBoat.Generics
/// <returns></returns> /// <returns></returns>
public U? GetU(int pos) public U? GetU(int pos)
{ {
return (U?)_collection.Get(pos)?.GetMoveableObject; return (U?)_collection[pos]?.GetMoveableObject;
} }
/// <summary> /// <summary>
@ -122,15 +120,13 @@ namespace MotorBoat.Generics
Pen pen = new(Color.Black, 3); Pen pen = new(Color.Black, 3);
for (int i = 0; i < _pictureWidth / _placeSizeWidth; i++) for (int i = 0; i < _pictureWidth / _placeSizeWidth; i++)
{ {
for (int j = 0; j < _pictureHeight / _placeSizeHeight + for (int j = 0; j < _pictureHeight / _placeSizeHeight + 1; ++j)
1; ++j) {//линия разметки места
{//линия рамзетки места g.DrawLine(pen, i * _placeSizeWidth, j * _placeSizeHeight,
g.DrawLine(pen, i * _placeSizeWidth, j * i * _placeSizeWidth + _placeSizeWidth / 2, j * _placeSizeHeight);
_placeSizeHeight, i * _placeSizeWidth + _placeSizeWidth / 2, j *
_placeSizeHeight);
} }
g.DrawLine(pen, i * _placeSizeWidth, 0, i * g.DrawLine(pen, i * _placeSizeWidth, 0, i * _placeSizeWidth,
_placeSizeWidth, _pictureHeight / _placeSizeHeight * _placeSizeHeight); _pictureHeight / _placeSizeHeight * _placeSizeHeight);
} }
} }
@ -140,16 +136,16 @@ namespace MotorBoat.Generics
/// <param name="g"></param> /// <param name="g"></param>
private void DrawObjects(Graphics g) private void DrawObjects(Graphics g)
{ {
T? t; int i = 0;
int Rows = _pictureWidth / _placeSizeWidth; int Rows = _pictureWidth / _placeSizeWidth;
for (int i = 0; i < _collection.Count; i++) foreach(var boat in _collection.GetBoats())
{ {
t = _collection.Get(i); if (boat != null)
if (t != null)
{ {
t.SetPosition(i % Rows * _placeSizeWidth, i / Rows * _placeSizeHeight + 5); boat.SetPosition(i % Rows * _placeSizeWidth, i / Rows * _placeSizeHeight + 5);
t.DrawTransport(g); boat.DrawTransport(g);
} }
i++;
} }
} }
} }

View File

@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MotorBoat.DrawningObjects;
using MotorBoat.MovementStrategy;
namespace MotorBoat.Generics
{
/// <summary>
/// Класс для хранения коллекции
/// </summary>
internal class BoatsGenericStorage
{
/// <summary>
/// Словарь (хранилище)
/// </summary>
readonly Dictionary<string, BoatsGenericCollection<DrawningBoat,DrawningObjectBoat>> _boatStorages;
/// <summary>
/// Возвращение списка названий наборов
/// </summary>
public List<string> Keys => _boatStorages.Keys.ToList();
/// <summary>
/// Ширина окна отрисовки
/// </summary>
private readonly int _pictureWidth;
/// <summary>
/// Высота окна отрисовки
/// </summary>
private readonly int _pictureHeight;
/// <summary>
/// Конструктор
/// </summary>
/// <param name="pictureWidth"></param>
/// <param name="pictureHeight"></param>
public BoatsGenericStorage(int pictureWidth, int pictureHeight)
{
_boatStorages = new Dictionary<string, BoatsGenericCollection<DrawningBoat, DrawningObjectBoat>>();
_pictureWidth = pictureWidth;
_pictureHeight = pictureHeight;
}
/// <summary>
/// Добавление набора
/// </summary>
/// <param name="name">Название набора</param>
public void AddSet(string name)
{
if (_boatStorages.ContainsKey(name))
return;
_boatStorages[name] = new BoatsGenericCollection<DrawningBoat, DrawningObjectBoat>(_pictureWidth, _pictureHeight);
}
/// <summary>
/// Удаление набора
/// </summary>
/// <param name="name">Название набора</param>
public void DelSet(string name)
{
if (!_boatStorages.ContainsKey(name))
return;
_boatStorages.Remove(name);
}
/// <summary>
/// Доступ к набору
/// </summary>
/// <param name="ind"></param>
/// <returns></returns>
public BoatsGenericCollection<DrawningBoat, DrawningObjectBoat>?
this[string ind]
{
get
{
if (_boatStorages.ContainsKey(ind))
return _boatStorages[ind];
return null;
}
}
}
}

View File

@ -34,8 +34,14 @@
ButtonRemoveBoat = new Button(); ButtonRemoveBoat = new Button();
ButtonRefreshCollection = new Button(); ButtonRefreshCollection = new Button();
groupBoxTools = new GroupBox(); groupBoxTools = new GroupBox();
groupBoxCollections = new GroupBox();
ButtonRemoveObject = new Button();
listBoxStorages = new ListBox();
ButtonAddObject = new Button();
textBoxStorageName = new MaskedTextBox();
((System.ComponentModel.ISupportInitialize)pictureBoxCollection).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxCollection).BeginInit();
groupBoxTools.SuspendLayout(); groupBoxTools.SuspendLayout();
groupBoxCollections.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
// pictureBoxCollection // pictureBoxCollection
@ -43,20 +49,20 @@
pictureBoxCollection.Dock = DockStyle.Left; pictureBoxCollection.Dock = DockStyle.Left;
pictureBoxCollection.Location = new Point(0, 0); pictureBoxCollection.Location = new Point(0, 0);
pictureBoxCollection.Name = "pictureBoxCollection"; pictureBoxCollection.Name = "pictureBoxCollection";
pictureBoxCollection.Size = new Size(578, 461); pictureBoxCollection.Size = new Size(578, 500);
pictureBoxCollection.TabIndex = 1; pictureBoxCollection.TabIndex = 1;
pictureBoxCollection.TabStop = false; pictureBoxCollection.TabStop = false;
// //
// maskedTextBoxNumber // maskedTextBoxNumber
// //
maskedTextBoxNumber.Location = new Point(54, 135); maskedTextBoxNumber.Location = new Point(51, 371);
maskedTextBoxNumber.Name = "maskedTextBoxNumber"; maskedTextBoxNumber.Name = "maskedTextBoxNumber";
maskedTextBoxNumber.Size = new Size(100, 23); maskedTextBoxNumber.Size = new Size(100, 23);
maskedTextBoxNumber.TabIndex = 0; maskedTextBoxNumber.TabIndex = 0;
// //
// ButtonAddBoat // ButtonAddBoat
// //
ButtonAddBoat.Location = new Point(6, 22); ButtonAddBoat.Location = new Point(6, 325);
ButtonAddBoat.Name = "ButtonAddBoat"; ButtonAddBoat.Name = "ButtonAddBoat";
ButtonAddBoat.Size = new Size(188, 40); ButtonAddBoat.Size = new Size(188, 40);
ButtonAddBoat.TabIndex = 1; ButtonAddBoat.TabIndex = 1;
@ -66,9 +72,9 @@
// //
// ButtonRemoveBoat // ButtonRemoveBoat
// //
ButtonRemoveBoat.Location = new Point(11, 171); ButtonRemoveBoat.Location = new Point(6, 407);
ButtonRemoveBoat.Name = "ButtonRemoveBoat"; ButtonRemoveBoat.Name = "ButtonRemoveBoat";
ButtonRemoveBoat.Size = new Size(183, 41); ButtonRemoveBoat.Size = new Size(188, 41);
ButtonRemoveBoat.TabIndex = 2; ButtonRemoveBoat.TabIndex = 2;
ButtonRemoveBoat.Text = "Удалить лодку"; ButtonRemoveBoat.Text = "Удалить лодку";
ButtonRemoveBoat.UseVisualStyleBackColor = true; ButtonRemoveBoat.UseVisualStyleBackColor = true;
@ -76,9 +82,9 @@
// //
// ButtonRefreshCollection // ButtonRefreshCollection
// //
ButtonRefreshCollection.Location = new Point(11, 218); ButtonRefreshCollection.Location = new Point(6, 454);
ButtonRefreshCollection.Name = "ButtonRefreshCollection"; ButtonRefreshCollection.Name = "ButtonRefreshCollection";
ButtonRefreshCollection.Size = new Size(183, 39); ButtonRefreshCollection.Size = new Size(188, 39);
ButtonRefreshCollection.TabIndex = 3; ButtonRefreshCollection.TabIndex = 3;
ButtonRefreshCollection.Text = "Обновить коллекцию"; ButtonRefreshCollection.Text = "Обновить коллекцию";
ButtonRefreshCollection.UseVisualStyleBackColor = true; ButtonRefreshCollection.UseVisualStyleBackColor = true;
@ -86,6 +92,7 @@
// //
// groupBoxTools // groupBoxTools
// //
groupBoxTools.Controls.Add(groupBoxCollections);
groupBoxTools.Controls.Add(ButtonRefreshCollection); groupBoxTools.Controls.Add(ButtonRefreshCollection);
groupBoxTools.Controls.Add(ButtonRemoveBoat); groupBoxTools.Controls.Add(ButtonRemoveBoat);
groupBoxTools.Controls.Add(ButtonAddBoat); groupBoxTools.Controls.Add(ButtonAddBoat);
@ -93,16 +100,66 @@
groupBoxTools.Dock = DockStyle.Right; groupBoxTools.Dock = DockStyle.Right;
groupBoxTools.Location = new Point(584, 0); groupBoxTools.Location = new Point(584, 0);
groupBoxTools.Name = "groupBoxTools"; groupBoxTools.Name = "groupBoxTools";
groupBoxTools.Size = new Size(200, 461); groupBoxTools.Size = new Size(200, 500);
groupBoxTools.TabIndex = 0; groupBoxTools.TabIndex = 0;
groupBoxTools.TabStop = false; groupBoxTools.TabStop = false;
groupBoxTools.Text = "Инструменты"; groupBoxTools.Text = "Инструменты";
// //
// groupBoxCollections
//
groupBoxCollections.Controls.Add(ButtonRemoveObject);
groupBoxCollections.Controls.Add(listBoxStorages);
groupBoxCollections.Controls.Add(ButtonAddObject);
groupBoxCollections.Controls.Add(textBoxStorageName);
groupBoxCollections.Location = new Point(6, 22);
groupBoxCollections.Name = "groupBoxCollections";
groupBoxCollections.Size = new Size(188, 261);
groupBoxCollections.TabIndex = 4;
groupBoxCollections.TabStop = false;
groupBoxCollections.Text = "Наборы";
//
// ButtonRemoveObject
//
ButtonRemoveObject.Location = new Point(6, 214);
ButtonRemoveObject.Name = "ButtonRemoveObject";
ButtonRemoveObject.Size = new Size(176, 41);
ButtonRemoveObject.TabIndex = 3;
ButtonRemoveObject.Text = "Удалить набор";
ButtonRemoveObject.UseVisualStyleBackColor = true;
ButtonRemoveObject.Click += ButtonRemoveObject_Click;
//
// listBoxStorages
//
listBoxStorages.FormattingEnabled = true;
listBoxStorages.ItemHeight = 15;
listBoxStorages.Location = new Point(6, 99);
listBoxStorages.Name = "listBoxStorages";
listBoxStorages.Size = new Size(176, 109);
listBoxStorages.TabIndex = 2;
listBoxStorages.SelectedIndexChanged += ListBoxObjects_SelectedIndexChanged;
//
// ButtonAddObject
//
ButtonAddObject.Location = new Point(6, 54);
ButtonAddObject.Name = "ButtonAddObject";
ButtonAddObject.Size = new Size(176, 39);
ButtonAddObject.TabIndex = 1;
ButtonAddObject.Text = "Добавить набор";
ButtonAddObject.UseVisualStyleBackColor = true;
ButtonAddObject.Click += buttonAddObject_Click;
//
// textBoxStorageName
//
textBoxStorageName.Location = new Point(6, 25);
textBoxStorageName.Name = "textBoxStorageName";
textBoxStorageName.Size = new Size(176, 23);
textBoxStorageName.TabIndex = 0;
//
// FormBoatCollection // FormBoatCollection
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(784, 461); ClientSize = new Size(784, 500);
Controls.Add(groupBoxTools); Controls.Add(groupBoxTools);
Controls.Add(pictureBoxCollection); Controls.Add(pictureBoxCollection);
Name = "FormBoatCollection"; Name = "FormBoatCollection";
@ -110,6 +167,8 @@
((System.ComponentModel.ISupportInitialize)pictureBoxCollection).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxCollection).EndInit();
groupBoxTools.ResumeLayout(false); groupBoxTools.ResumeLayout(false);
groupBoxTools.PerformLayout(); groupBoxTools.PerformLayout();
groupBoxCollections.ResumeLayout(false);
groupBoxCollections.PerformLayout();
ResumeLayout(false); ResumeLayout(false);
} }
@ -121,5 +180,10 @@
private Button ButtonRemoveBoat; private Button ButtonRemoveBoat;
private Button ButtonRefreshCollection; private Button ButtonRefreshCollection;
private GroupBox groupBoxTools; private GroupBox groupBoxTools;
private GroupBox groupBoxCollections;
private Button ButtonRemoveObject;
private ListBox listBoxStorages;
private Button ButtonAddObject;
private MaskedTextBox textBoxStorageName;
} }
} }

View File

@ -21,7 +21,7 @@ namespace MotorBoat
/// <summary> /// <summary>
/// Набор объектов /// Набор объектов
/// </summary> /// </summary>
private readonly BoatsGenericCollection<DrawningBoat, DrawningObjectBoat> _boats; private readonly BoatsGenericStorage _storage;
/// <summary> /// <summary>
/// Конструктор /// Конструктор
@ -29,7 +29,74 @@ namespace MotorBoat
public FormBoatCollection() public FormBoatCollection()
{ {
InitializeComponent(); InitializeComponent();
_boats = new BoatsGenericCollection<DrawningBoat, DrawningObjectBoat>(pictureBoxCollection.Width, pictureBoxCollection.Height); _storage = new BoatsGenericStorage(pictureBoxCollection.Width, pictureBoxCollection.Height);
}
/// <summary>
/// Заполнение listBoxStorages
/// </summary>
private void ReloadObjects()
{
int index = listBoxStorages.SelectedIndex;
listBoxStorages.Items.Clear();
for (int i = 0; i < _storage.Keys.Count; i++)
{
listBoxStorages.Items.Add(_storage.Keys[i]);
}
if (listBoxStorages.Items.Count > 0 && (index == -1 || index >= listBoxStorages.Items.Count))
{
listBoxStorages.SelectedIndex = 0;
}
else if (listBoxStorages.Items.Count > 0 && index > -1 && index < listBoxStorages.Items.Count)
{
listBoxStorages.SelectedIndex = index;
}
}
/// <summary>
/// Добавление набора в коллекцию
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonAddObject_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(textBoxStorageName.Text))
{
MessageBox.Show("Не все данные заполнены", "Ошибка",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
_storage.AddSet(textBoxStorageName.Text);
ReloadObjects();
}
/// <summary>
/// Выбор набора
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ListBoxObjects_SelectedIndexChanged(object sender, EventArgs e)
{
pictureBoxCollection.Image =
_storage[listBoxStorages.SelectedItem?.ToString() ?? string.Empty]?.ShowBoats();
}
/// <summary>
/// Удаление набора
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonRemoveObject_Click(object sender, EventArgs e)
{
if (listBoxStorages.SelectedIndex == -1)
{
return;
}
if (MessageBox.Show($"Удалить объект {listBoxStorages.SelectedItem}?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
_storage.DelSet(listBoxStorages.SelectedItem.ToString() ?? string.Empty);
ReloadObjects();
}
} }
/// <summary> /// <summary>
@ -39,13 +106,21 @@ namespace MotorBoat
/// <param name="e"></param> /// <param name="e"></param>
private void ButtonAddBoat_Click(object sender, EventArgs e) private void ButtonAddBoat_Click(object sender, EventArgs e)
{ {
if (listBoxStorages.SelectedIndex == -1)
return;
var obj = _storage[listBoxStorages.SelectedItem.ToString() ?? string.Empty];
if (obj == null)
return;
FormMotorBoat form = new(); FormMotorBoat form = new();
if (form.ShowDialog() == DialogResult.OK) if (form.ShowDialog() == DialogResult.OK)
{ {
if (_boats + form.SelectedBoat != -1) if (obj + form.SelectedBoat)
{ {
MessageBox.Show("Объект добавлен"); MessageBox.Show("Объект добавлен");
pictureBoxCollection.Image = _boats.ShowBoats(); pictureBoxCollection.Image = obj.ShowBoats();
} }
else else
{ {
@ -61,22 +136,29 @@ namespace MotorBoat
/// <param name="e"></param> /// <param name="e"></param>
private void ButtonRemoveBoat_Click(object sender, EventArgs e) private void ButtonRemoveBoat_Click(object sender, EventArgs e)
{ {
if (listBoxStorages.SelectedIndex == -1)
return;
var obj = _storage[listBoxStorages.SelectedItem.ToString() ?? string.Empty];
if (obj == null)
return;
if (MessageBox.Show("Удалить объект?", "Удаление", if (MessageBox.Show("Удалить объект?", "Удаление",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{ {
return; return;
} }
int pos = Convert.ToInt32(maskedTextBoxNumber.Text); int pos = Convert.ToInt32(maskedTextBoxNumber.Text);
if (_boats - pos != null) if (obj - pos != null)
{ {
MessageBox.Show("Объект удален"); MessageBox.Show("Объект удален");
pictureBoxCollection.Image = _boats.ShowBoats(); pictureBoxCollection.Image = obj.ShowBoats();
} }
else else
{ {
MessageBox.Show("Не удалось удалить объект"); MessageBox.Show("Не удалось удалить объект");
} }
} }
/// <summary> /// <summary>
@ -86,7 +168,15 @@ namespace MotorBoat
/// <param name="e"></param> /// <param name="e"></param>
private void ButtonRefreshCollection_Click(object sender, EventArgs e) private void ButtonRefreshCollection_Click(object sender, EventArgs e)
{ {
pictureBoxCollection.Image = _boats.ShowBoats(); if (listBoxStorages.SelectedIndex == -1)
return;
var obj = _storage[listBoxStorages.SelectedItem.ToString() ?? string.Empty];
if (obj == null)
return;
pictureBoxCollection.Image = obj.ShowBoats();
} }
} }
} }

View File

@ -14,14 +14,19 @@ namespace MotorBoat.Generics
where T : class where T : class
{ {
/// <summary> /// <summary>
/// Массив объектов, которые храним /// Список объектов, которые храним
/// </summary> /// </summary>
private readonly T?[] _places; private readonly List<T?> _places;
/// <summary> /// <summary>
/// Количество объектов в массиве /// Количество объектов
/// </summary> /// </summary>
public int Count => _places.Length; public int Count => _places.Count;
/// <summary>
/// Макс количество объектов в списке
/// </summary>
private readonly int _maxCount;
/// <summary> /// <summary>
/// Конструктор /// Конструктор
@ -29,47 +34,40 @@ namespace MotorBoat.Generics
/// <param name="count"></param> /// <param name="count"></param>
public SetGeneric(int count) public SetGeneric(int count)
{ {
_places = new T?[count]; _maxCount = count;
_places = new List<T?>(count);
} }
/// <summary> /// <summary>
/// Добавление объекта в набор /// Добавление объекта в набор
/// </summary> /// </summary>
/// <param name="boat">Добавляемый автомобиль</param> /// <param name="boat">Добавляемая лодка</param>
/// <returns></returns> /// <returns></returns>
public int Insert(T boat) public bool Insert(T boat)
{ {
return Insert(boat, 0); if (_places.Count == _maxCount)
{
return false;
}
Insert(boat, 0);
return true;
} }
/// <summary> /// <summary>
/// Добавление объекта в набор на конкретную позицию /// Добавление объекта в набор на конкретную позицию
/// </summary> /// </summary>
/// <param name="car">Добавляемый автомобиль</param> /// <param name="boat">Добавляемая лодка</param>
/// <param name="position">Позиция</param> /// <param name="position">Позиция</param>
/// <returns></returns> /// <returns></returns>
public int Insert(T boat, int position) public bool Insert(T boat, int position)
{ {
int nullIndex = -1, i; if(!(position >= 0 && position <= Count && _places.Count < _maxCount))
if (position < 0 || position >= Count)
{ {
return -1; return false;
} }
for (i = position; i < Count; i++) _places.Insert(position, boat);
{ return true;
if (_places[i] == null)
{
nullIndex = i;
break;
}
}
if (nullIndex < 0) return -1;
for (i = nullIndex; i > position; i--)
{
_places[i] = _places[i - 1];
}
_places[position] = boat;
return position;
} }
/// <summary> /// <summary>
/// Удаление объекта из набора с конкретной позиции /// Удаление объекта из набора с конкретной позиции
/// </summary> /// </summary>
@ -78,7 +76,7 @@ namespace MotorBoat.Generics
public bool Remove(int position) public bool Remove(int position)
{ {
if (position < 0 || position >= Count) return false; if (position < 0 || position >= Count) return false;
_places[position] = null; _places.RemoveAt(position);
return true; return true;
} }
/// <summary> /// <summary>
@ -86,10 +84,40 @@ namespace MotorBoat.Generics
/// </summary> /// </summary>
/// <param name="position"></param> /// <param name="position"></param>
/// <returns></returns> /// <returns></returns>
public T? Get(int position) public T? this[int position]
{ {
if (position < 0 || position >= Count) return null; get
return _places[position]; {
if (position < 0 || position > _maxCount)
return null;
return _places[position];
}
set
{
if (!(position >= 0 && position < Count && _places.Count < _maxCount))
{
return;
}
_places.Insert(position, value);
return;
}
}
/// <summary>
/// Проход по списку
/// </summary>
/// <param name="maxShips"></param>
/// <returns></returns>
public IEnumerable<T> GetBoats(int? maxBoats = null)
{
for (int i = 0; i < _places.Count; ++i)
{
yield return _places[i];
if (maxBoats.HasValue && i == maxBoats.Value)
{
yield break;
}
}
} }
} }
} }