create a class file for the following program....i am unable to get this right ...please help...its kind of urgent.

Mar 22 2006 1:54 PM


// i need to write a class for the below code ...please if any one can help it would be great...i am still new to learning c sharp ...




using
System;

namespace ElevatorApp

{

/// Summary description for Class1.

class Class1

{

static void Main(string[] args)

{

CElevator anElevator = new CElevator(0, 10, 8);

anElevator.Status();

Console.WriteLine("At floor {0}", anElevator.Floor);

Console.WriteLine("Number of persons in elevator is {0}",

anElevator.Occupants);

Console.WriteLine();

anElevator.Enter(3);

anElevator.Enter(2);

anElevator.Leave(1);

Console.WriteLine("Number of persons in elevator is {0}",

anElevator.Occupants);

Console.WriteLine();

anElevator.GoToFloor(3);

anElevator.GoDownOneFloor();

anElevator.GoDownOneFloor();

anElevator.GoUpOneFloor();

Console.WriteLine("At floor {0}", anElevator.Floor);

Console.WriteLine();

anElevator.GoToFloor(5);

Console.WriteLine("Time to get to floor 9 is {0:F2} seconds",

anElevator.TimeToFloor(9));

anElevator.Empty();

Console.WriteLine("It is " + anElevator.IsEmpty

+ " that the elevator is empty");

Console.WriteLine("It is " + anElevator.IsFull

+ " that the elevator is full");

anElevator.Status();

Console.WriteLine();

anElevator.GoToTopFloor();

anElevator.GoUpOneFloor();

anElevator.Leave(1);

anElevator.GoToBottomFloor();

anElevator.Full();

Console.WriteLine("It is " + anElevator.IsEmpty

+ " that the elevator is empty");

Console.WriteLine("It is " + anElevator.IsFull

+ " that the elevator is full");

anElevator.GoDownOneFloor();

anElevator.Enter(1);

anElevator.Status();

}

}

}