Кабінет 208
Головна | Реєстрація | Вхід
Субота, 27.04.2024, 19:06
Меню сайту
Форма входу

Категорії розділу
5 клас [12]
6 клас [8]
7 клас [6]
8 клас [19]
9 клас [19]
10 клас (стардарт) [8]
10 клас (академічний) [0]
11 клас (стандарт) [21]
11 клас (академічний) [23]
Головна » Статті » Інформатика » 11 клас (академічний)

Класи в С# (перша)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("(C#)\n Version 1");
            Console.WriteLine(" Author: ???\n");
            Console.WriteLine(" Start");
            Console.WriteLine(" Finish");

            Console.ReadKey();
        }
    }
}

// File:    Company.cs

using System;

public class Company
{
   private string name;
   private int number_of_employees;
   private string location;
   private string type_of_employment;
   
   public void produce_products()
   {
      throw new NotImplementedException();
   }
   
   public void create_your_own_divisions()
   {
      throw new NotImplementedException();
   }
   
   public void fund_university()
   {
      throw new NotImplementedException();
   }
   
   public void give_projects()
   {
      throw new NotImplementedException();
   }
   
   public System.Collections.ArrayList employee;
   
   /// <summary>
   /// Property for collection of Employee
   /// </summary>
   /// <pdGenerated>Default opposite class collection property</pdGenerated>
   public System.Collections.ArrayList Employee
   {
      get
      {
         if (employee == null)
            employee = new System.Collections.ArrayList();
         return employee;
      }
      set
      {
         RemoveAllEmployee();
         if (value != null)
         {
            foreach (Employee oEmployee in value)
               AddEmployee(oEmployee);
         }
      }
   }
   
   /// <summary>
   /// Add a new Employee in the collection
   /// </summary>
   /// <pdGenerated>Default Add</pdGenerated>
   public void AddEmployee(Employee newEmployee)
   {
      if (newEmployee == null)
         return;
      if (this.employee == null)
         this.employee = new System.Collections.ArrayList();
      if (!this.employee.Contains(newEmployee))
         this.employee.Add(newEmployee);
   }
   
   /// <summary>
   /// Remove an existing Employee from the collection
   /// </summary>
   /// <pdGenerated>Default Remove</pdGenerated>
   public void RemoveEmployee(Employee oldEmployee)
   {
      if (oldEmployee == null)
         return;
      if (this.employee != null)
         if (this.employee.Contains(oldEmployee))
            this.employee.Remove(oldEmployee);
   }
   
   /// <summary>
   /// Remove all instances of Employee from the collection
   /// </summary>
   /// <pdGenerated>Default removeAll</pdGenerated>
   public void RemoveAllEmployee()
   {
      if (employee != null)
         employee.Clear();
   }

}

// File:    Employee.cs
using System;

public class Employee
{
   private string name;
   private int age;
   private string work;
   private int salary;
 

   
   public void give_project()
   {
      throw new NotImplementedException();
   }
   
   public void provide_resources()
   {
      throw new NotImplementedException();
   }
   
   public void keeps_track_implementation()
   {
      throw new NotImplementedException();
   }
   
   public void takes_job()
   {
      throw new NotImplementedException();
   }

}

// File:    Ministry.cs
using System;

public class Ministry
{
   private int number_of_employee;
   private int budget;
   private string name;
   
   public void set_framework_for_university()
   {
      throw new NotImplementedException();
   }
   
   public void provide_staff()
   {
      throw new NotImplementedException();
   }
   
   public void provide_necessary_resources()
   {
      throw new NotImplementedException();
   }

}

// File:    Professor.cs
using System;

public class Professor
{
   private string name;
   private int age;
   private string work;
   private int experience;
   private string faculty;
   
   public void teach_student()
   {
      throw new NotImplementedException();
   }
   
   public void work_on_the_project()
   {
      throw new NotImplementedException();
   }
   
   public void conduct_research()
   {
      throw new NotImplementedException();
   }}

// File:    Project.cs
using System;

public class Project
{
   private string name;
   private string description;
   private int term_of_execution;
   private int number_of_worker;

   
   public void start()
   {
      throw new NotImplementedException();
   }
   
   public System.Collections.ArrayList company;
   
   /// <summary>
   /// Property for collection of Company
   /// </summary>
   /// <pdGenerated>Default opposite class collection property</pdGenerated>
   public System.Collections.ArrayList Company
   {
      get
      {
         if (company == null)
            company = new System.Collections.ArrayList();
         return company;
      }
      set
      {
         RemoveAllCompany();
         if (value != null)
         {
            foreach (Company oCompany in value)
               AddCompany(oCompany);
         }
      }
   }
   
   /// <summary>
   /// Add a new Company in the collection
   /// </summary>
   /// <pdGenerated>Default Add</pdGenerated>
   public void AddCompany(Company newCompany)
   {
      if (newCompany == null)
         return;
      if (this.company == null)
         this.company = new System.Collections.ArrayList();
      if (!this.company.Contains(newCompany))
         this.company.Add(newCompany);
   }
   
   /// <summary>
   /// Remove an existing Company from the collection
   /// </summary>
   /// <pdGenerated>Default Remove</pdGenerated>
   public void RemoveCompany(Company oldCompany)
   {
      if (oldCompany == null)
         return;
      if (this.company != null)
         if (this.company.Contains(oldCompany))
            this.company.Remove(oldCompany);
   }
   
   /// <summary>
   /// Remove all instances of Company from the collection
   /// </summary>
   /// <pdGenerated>Default removeAll</pdGenerated>
   public void RemoveAllCompany()
   {
      if (company != null)
         company.Clear();
   }
   public System.Collections.ArrayList university;
   
   /// <summary>
   /// Property for collection of University
   /// </summary>
   /// <pdGenerated>Default opposite class collection property</pdGenerated>
   public System.Collections.ArrayList University
   {
      get
      {
         if (university == null)
            university = new System.Collections.ArrayList();
         return university;
      }
      set
      {
         RemoveAllUniversity();
         if (value != null)
         {
            foreach (University oUniversity in value)
               AddUniversity(oUniversity);
         }
      }
   }
   
   /// <summary>
   /// Add a new University in the collection
   /// </summary>
   /// <pdGenerated>Default Add</pdGenerated>
   public void AddUniversity(University newUniversity)
   {
      if (newUniversity == null)
         return;
      if (this.university == null)
         this.university = new System.Collections.ArrayList();
      if (!this.university.Contains(newUniversity))
         this.university.Add(newUniversity);
   }
   
   /// <summary>
   /// Remove an existing University from the collection
   /// </summary>
   /// <pdGenerated>Default Remove</pdGenerated>
   public void RemoveUniversity(University oldUniversity)
   {
      if (oldUniversity == null)
         return;
      if (this.university != null)
         if (this.university.Contains(oldUniversity))
            this.university.Remove(oldUniversity);
   }
   
   /// <summary>
   /// Remove all instances of University from the collection
   /// </summary>
   /// <pdGenerated>Default removeAll</pdGenerated>
   public void RemoveAllUniversity()
   {
      if (university != null)
         university.Clear();
   }
   public Ministry ministry;

}

// File:    Student.cs
using System;

public class Student
{
   private string name;
   private int age;
   private string faculty;
   private int course;
   private string group;
   
   public void study_at_univer()
   {
      throw new NotImplementedException();
   }
   
   public void working_on_a_project()
   {
      throw new NotImplementedException();
   }
   
   public void conducts_research()
   {
      throw new NotImplementedException();
   }

}

// File:    University.cs
using System;

public class University
{
   private string name;
   private int number_of_students;
   private int number_of_teachers;
   private int number_of_faculties;

   
   public void implement_projects()
   {
      throw new NotImplementedException();
   }
   
   public void create_special_departments()
   {
      throw new NotImplementedException();
   }
   
   public void create_conditions_for_project_implementation()
   {
      throw new NotImplementedException();
   }
   
   public void generate_new_technology()
   {
      throw new NotImplementedException();
   }
   
   public System.Collections.ArrayList student;
   
   /// <summary>
   /// Property for collection of Student
   /// </summary>
   /// <pdGenerated>Default opposite class collection property</pdGenerated>
   public System.Collections.ArrayList Student
   {
      get
      {
         if (student == null)
            student = new System.Collections.ArrayList();
         return student;
      }
      set
      {
         RemoveAllStudent();
         if (value != null)
         {
            foreach (Student oStudent in value)
               AddStudent(oStudent);
         }
      }
   }
   
   /// <summary>
   /// Add a new Student in the collection
   /// </summary>
   /// <pdGenerated>Default Add</pdGenerated>
   public void AddStudent(Student newStudent)
   {
      if (newStudent == null)
         return;
      if (this.student == null)
         this.student = new System.Collections.ArrayList();
      if (!this.student.Contains(newStudent))
         this.student.Add(newStudent);
   }
   
   /// <summary>
   /// Remove an existing Student from the collection
   /// </summary>
   /// <pdGenerated>Default Remove</pdGenerated>
   public void RemoveStudent(Student oldStudent)
   {
      if (oldStudent == null)
         return;
      if (this.student != null)
         if (this.student.Contains(oldStudent))
            this.student.Remove(oldStudent);
   }
   
   /// <summary>
   /// Remove all instances of Student from the collection
   /// </summary>
   /// <pdGenerated>Default removeAll</pdGenerated>
   public void RemoveAllStudent()
   {
      if (student != null)
         student.Clear();
   }
   public System.Collections.ArrayList professor;
   
   /// <summary>
   /// Property for collection of Professor
   /// </summary>
   /// <pdGenerated>Default opposite class collection property</pdGenerated>
   public System.Collections.ArrayList Professor
   {
      get
      {
         if (professor == null)
            professor = new System.Collections.ArrayList();
         return professor;
      }
      set
      {
         RemoveAllProfessor();
         if (value != null)
         {
            foreach (Professor oProfessor in value)
               AddProfessor(oProfessor);
         }
      }
   }
   
   /// <summary>
   /// Add a new Professor in the collection
   /// </summary>
   /// <pdGenerated>Default Add</pdGenerated>
   public void AddProfessor(Professor newProfessor)
   {
      if (newProfessor == null)
         return;
      if (this.professor == null)
         this.professor = new System.Collections.ArrayList();
      if (!this.professor.Contains(newProfessor))
         this.professor.Add(newProfessor);
   }
   
   /// <summary>
   /// Remove an existing Professor from the collection
   /// </summary>
   /// <pdGenerated>Default Remove</pdGenerated>
   public void RemoveProfessor(Professor oldProfessor)
   {
      if (oldProfessor == null)
         return;
      if (this.professor != null)
         if (this.professor.Contains(oldProfessor))
            this.professor.Remove(oldProfessor);
   }
   
   /// <summary>
   /// Remove all instances of Professor from the collection
   /// </summary>
   /// <pdGenerated>Default removeAll</pdGenerated>
   public void RemoveAllProfessor()
   {
      if (professor != null)
         professor.Clear();
   }

}

Категорія: 11 клас (академічний) | Додав: admin (07.01.2016)
Переглядів: 335
Пошук
Статистика

Онлайн всього: 1
Гостей: 1
Користувачів: 0
Copyright MyCorp © 2024
Безкоштовний хостинг uCoz