Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*1. Завдання: отримати робочу програму з простим але зрозумілим інтерфейсом для роботи з крафтовою броварнею.
- 2. Цілі:
- - досягнення робочого вигляду
- - відсутність суттєвих багів
- - перевірка на наявність дефектів, їх передбачення
- - підказки для користувача
- - інтуїтивно зрозумілий інтерфейс
- 3. Вимоги:
- Дизайн.Простий та зрозумілий інтерфейс.
- Функції. Перегляд інформації про наявність товару;
- інформації про товар(з чого виготовлений, характеристики, дата вживання тощо);
- додавання товару;
- вилучення товару;
- розрахування потрібної кількості інгредієнтів для виготовлення товару;
- перевірка на вік;
- врахування часу на приготування продукту
- тощо.
- 4. Термін виконання: до кінця року*/
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace pivas
- {
- class Brewery
- {
- public void info()
- {
- }
- public Brewery()
- {
- string adress;
- string date;
- }
- }
- class Beer
- {
- string color;
- string filter;
- string nameofbeer;
- string bitternes;
- string alcohol;
- string timetodo;
- string timetodrink;
- //struct ingredients
- //{
- // string yeats;//drojji
- // string hop;//hmel'
- // string malt;//solod
- // string water;
- // string sugar;
- //}
- public Beer()
- {
- this.color = "white";
- this.filter = "filtered";
- this.nameofbeer = "lager";
- this.bitternes = "0";
- this.alcohol = "0";
- this.timetodo = "30 days";
- } //конструктор за замовчуванням
- public Beer(string col, string filt, string nob, string bitt, string alco, string timedo, string timeto) {
- this.color = col;
- this.filter = filt;
- this.nameofbeer = nob;
- this.bitternes = bitt;
- this.alcohol = alco;
- this.timetodo = timedo;
- this.timetodrink = timeto;
- }//konstruktor z parametrami
- public Beer(Beer obj)//konst kopiuvannia
- {
- this.color = obj.color;
- this.filter = obj.filter;
- this.nameofbeer = obj.nameofbeer;
- this.bitternes = obj.bitternes;
- this.alcohol = obj.alcohol;
- this.timetodo = obj.timetodo;
- this.timetodrink = obj.timetodrink;
- }
- public string Color
- {
- get { return this.color; }
- set { this.color = value; }
- }
- public string Filter
- {
- get { return this.filter; }
- set { this.filter = value; }
- }
- public string Nameofbeer
- {
- get { return this.nameofbeer; }
- set { this.nameofbeer = value; }
- }
- public string Bitternes
- {
- get { return this.bitternes; }
- set { this.bitternes = value; }
- }
- public string Alcohol
- {
- get { return this.alcohol; }
- set { this.alcohol = value; }
- }
- public string Timetodo
- {
- get { return this.timetodo; }
- set { this.timetodo = value; }
- }
- public string TАimetodrink
- {
- get { return this.timetodrink; }
- set { this.timetodrink = value; }
- }
- }
- class Person
- {
- string fname;//im`a
- string fathername;//ot4estvo
- string sname;//familia
- //struct register
- //{
- // string email;
- // string nickname;
- // string password1;
- // string password2;
- //}
- public Person(string f_n, string father_n, string s_n)
- {
- this.fname = f_n;
- this.fathername = father_n;
- this.sname = s_n;
- }
- public Person() : this("Unknown", "Unknown", "Unknown") { }//konst za zamov4
- public Person(Person obj) : this(obj.fname, obj.fathername, obj.sname) { }//konstruktor kopiuvannia
- }
- class Buyer : Person
- {
- int age;
- public Buyer()
- {
- }
- }
- class Worker
- {
- public Worker()
- {
- }
- }
- class Seller : Worker
- {
- public Seller()
- {
- }
- }
- class Administrator : Worker
- {
- public Administrator()
- {
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- int num;
- Console.WriteLine("Who are you?\nI'm:\n1. seller\n2. buyer\n3. administrator");
- num = Convert.ToInt32(Console.ReadLine());
- switch (num)
- {
- case 1:
- Console.WriteLine("Please sign in");
- Console.ReadLine();
- break;
- case 2:
- Console.WriteLine("Please sign in or sign up");
- break;
- case 3:
- Console.WriteLine("Please sign in");
- break;
- default:
- Console.WriteLine("Incorrect symbol");
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement