Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

public bool IsLonger (Pencil other)

{
    return (this.length > other.length);
}

public bool Issharpened ()


{
   return sharpened == true;
}
public Doctor(string name, string specialization)

   this.name = name; 

   this.specialization - specialization;

   this.rate = 0;

public static void Doctor Rating (Doctor[] doctors)

  int rate, sum, count; 

  double avg; 

  for (int i = 0; i < doctors.Length; i++)

   {

            sum = 2; count - @; 

            rate = int.Parse(Console.ReadLine(); 

            while (rate != -1)

             {

               sum = sum + rate; 

               count++; 

               rate = int.Parse(Console.ReadLine());
            }

     avg - (double)sum / count; 

     doctors[i].SetRate(avg);

  }

}
public static bool NumEqual(int[] arr, int place)
 {
    int sumLift = 0, sumRight = 0; 
    for (int i = 0; i < place; i++)
         sumLift - sumLift + arr[i]; 
    for (int i = place + 1; i < arr.Length; i++)
        sumRight = sumRight + arr[i]; 
    return sumLift == sumRight;
 }

public static bool ArrayEqual(int[] arr)


 {
  int c = 0; 
  for (int i = 0; i < arr.Length; i++) 
     if (NumEqual(arr, i))
              C++; 
  Console.WriteLine(c); 
  return c>0;
}
public class Manegment
{
  private Trainer[] staff;
  private Client clients; 
public class Trainer
{
  private string name;
  private int wid; 
public class Client
{
  private string name; 
  private int id;
  Trainingl visits; 
public
public class Training
void Add(Training t)
{
{
  int num; 
public
  int iclass
= 0; SpecialT: Training
{
  while (visits[i]
  private != null)
Trainer train; 
  private
      i++;int time;

   visits[i] = t;

public void Add(Specialt s)


public int SpecialTime()
{
{
  int i=0; 
 int total = 0; 
  while (visits[i] != null)
 foreach(Training t in visits)
      i++;

  {   visits[i] = s;

   if(t!=null) }

    {
public int CountSpecialClient()
     if (t is SpecialT)
{
       total +=((SpecialT)t).GetTime();
  int count = 0; 
}
  foreach(Cliente in clients)
}
   {
return total;
      if(c!=null)
}        {

         if (e. SpecialTime() > 0)

               count++;

retum count;

}
public bool Is Missing()

  return (quantity <minQuantity);

public bool Suitable Temperature(int temp)


 {
  return (temp<=max Temperature && temp>=min Temperature);
 }

public bool CanBeStored( int temp)


 {
  if (this is FoodRefrigerated)
    return((FoodRefrigerated)this).Suitable Temperature(temp);
   else
      return true;
 }

You might also like