Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //string name, string type, string direction, string surface, int lane, string party, bool toll
            Motorway nasa = new Motorway("Nasa", "Parkway", "E", "concrete", 6, "Harris County", false);

            WriteLine(nasa.Tostring());
        }
        static void Main(string[] args)
        {
            Motorway motorway = new Motorway("Clearlake Motorway", "road", "blacktop", 4);

            motorway.Direction    = "North";
            motorway.Toll         = true;
            motorway.MaintainedBy = "UHCL";

            WriteLine(motorway);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            string   nameToll, nameLanes;
            Motorway motorway = new Motorway();

            nameToll = motorway.NameAndToll();
            Console.WriteLine(nameToll);

            Console.WriteLine();

            nameLanes = motorway.NameAndLane();
            Console.WriteLine(nameLanes);
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            var motorway1 = new Motorway("Motorway 1", "Road", 'S', "Gravel", 3, true, "Maintainance company");

            Console.WriteLine(motorway1 + "\n");

            Console.WriteLine("\n The Name of The MotorWay is:");
            Console.WriteLine(motorway1.NameOfMotorWay());

            Console.WriteLine("\n The Name of The MotorWay with toll is:");
            Console.WriteLine(motorway1.NameToll());

            Console.WriteLine("\n The Name of The MotorWay and Number of lanes is:");
            Console.WriteLine(motorway1.NameNoOfLanes());
        }