theme changed
This commit is contained in:
73
labs/lab9/MyClass/Program.cs
Normal file
73
labs/lab9/MyClass/Program.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
/*
|
||||
Book b1 = new Book();
|
||||
b1.SetBook("Пушкин А.С.", "Капитанская дочка", "Вильямс", 123, 2012);
|
||||
Book.SetPrice(12);
|
||||
b1.Show();
|
||||
Console.WriteLine("\n Итоговая стоимость аренды: {0} р.", b1.PriceBook(3));
|
||||
|
||||
Book b2 = new Book("Толстой Л.Н.", "Война и мир", "Наука и жизнь", 1234, 2013);
|
||||
b2.Show();
|
||||
|
||||
Book b3 = new Book("Лермонтов М.Ю.", "Мцыри");
|
||||
b3.Show();
|
||||
|
||||
|
||||
Triangle t1 = new Triangle(3, 4, 5);
|
||||
t1.Show();
|
||||
Console.WriteLine("perimeter = {0}", t1.Perimeter());
|
||||
Console.WriteLine("area = {0}", t1.Area());
|
||||
Console.WriteLine("does this triangle exist? {0}", t1.Exists());
|
||||
|
||||
Triangle t2 = new Triangle(3, 4, 7);
|
||||
t2.Show();
|
||||
Console.WriteLine("does this triangle exist? {0}", t2.Exists());
|
||||
*/
|
||||
|
||||
// Item item1 = new Item();
|
||||
// item1.Show();
|
||||
|
||||
/*
|
||||
Book b2 = new Book("Толстой Л. Н.", "Война и мир", "Наука и жизнь", 1234, 2013, 101, true);
|
||||
|
||||
b2.Show();
|
||||
b2.TakeItem();
|
||||
b2.Show();
|
||||
|
||||
|
||||
Magazine mag1 = new Magazine("О природе", 5, "Земля и мы", 2014, 1235, true);
|
||||
mag1.Show();
|
||||
|
||||
Console.WriteLine("\n Тестирование полиформизма");
|
||||
Item it;
|
||||
|
||||
it = b2;
|
||||
it.TakeItem();
|
||||
it.Return();
|
||||
it.Show();
|
||||
|
||||
it = mag1;
|
||||
it.TakeItem();
|
||||
it.Return();
|
||||
it.Show();
|
||||
|
||||
*/
|
||||
|
||||
Book b4 = new Book("Толстой Л.Н.", "Анна Каренина", "Знание", 1204, 2014, 103, true);
|
||||
Book b5 = new Book("Неш Т", "Программирование для профессионалов", "Вильямс", 1200, 2014, 108, true);
|
||||
|
||||
Book.RetSrok += new Book.ProcessBookDelegate(Operation.MetodObrabotchik);
|
||||
|
||||
b4.ReturnSrok = true;
|
||||
b5.ReturnSrok = true;
|
||||
|
||||
Console.WriteLine("\nКниги возвращены в срок:");
|
||||
b4.ProcessPaperbackBooks(Operation.PrintTitle);
|
||||
b5.ProcessPaperbackBooks(Operation.PrintTitle);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user