Question: Certkiller.com wants you to develop an application that handles passes for Certkiller
.com's parking lot.
The application has to store and retrieve vehicle information in a contiguous list that allows for advanced
navigation techniques.
You have already written and executed the following code:
Dim v1 As Vehicle, v2 As Vehicle, v3 As Vehicle, v4 As Vehicle, v5 As Vehicle
v1 = New Vehicle("1M2567871Y91234574", "Nissan Silvia", 1996)
v2 = New Vehicle("1H2569122493456960", "Honda Civic", 1999)
v3 = New Vehicle("1F2569106891234589", "Mitsubishi Lancer", 2001)
v4 = New Vehicle("1F7969122491234589", "Mazda MX7", 1998)
v5 = New Vehicle("1T2569122493456123", "Toyota Supra", 2000)
LinkedList <Vehicle> vList = new LinkedList < Vehicle > ();
LinkedListNode < Vehicle > vNode;
vNode = vList.AddFirst (v1);
vNode = vList.AddLast (v2);
vNode = vList.AddAfter (vNode, v3);
vNode = vList.AddBefore (vNode, v4);
vList.AddLast (v5);
foreach (Vehicle v in vList)
{
Console.WriteLine ("{0} {1} ({2})", v.MakeModel, v.Year, v.Vin);
}
What is the right output? -(VB.NET)
A
B
C
D
Nissan Silvia 1996 (1M2567871Y91234574)
Honda Civic 1999 (1H2569122493456960)
Mitsubishi Lancer 2001 (1F2569106891234589)
Mazda MX7 1998 (1F7969122491234589)
Toyota Supra 2000 (1T2569122493456123)
Honda Civic 1999 (1H2569122493456960)
Mitsubishi Lancer 2001 (1F2569106891234589)
Mazda MX7 1998 (1F7969122491234589)
Toyota Supra 2000 (1T2569122493456123)
B
Nissan Silvia 1996 (1M2567871Y91234574)
Mazda MX7 1998 (1F7969122491234589)
Mitsubishi Lancer 2001 (1F2569106891234589)
Honda Civic 1999 (1H2569122493456960)
Toyota Supra 2000 (1T2569122493456123)
Mazda MX7 1998 (1F7969122491234589)
Mitsubishi Lancer 2001 (1F2569106891234589)
Honda Civic 1999 (1H2569122493456960)
Toyota Supra 2000 (1T2569122493456123)
C
Nissan Silvia 1996 (1M2567871Y91234574)
Mazda MX7 1998 (1F7969122491234589)
Mitsubishi Lancer 2001 (1F2569106891234589)
Toyota Corolla 2002 (1T2569122493456123)
Honda Civic 1999 (1H2569122493456960)
Mazda MX7 1998 (1F7969122491234589)
Mitsubishi Lancer 2001 (1F2569106891234589)
Toyota Corolla 2002 (1T2569122493456123)
Honda Civic 1999 (1H2569122493456960)
D
Nissan Silvia 1996 (1M2567871Y91234574)
Mitsubishi Lancer 2001 (1F2569106891234589)
Mazda MX7 1998 (1F7969122491234589)
Honda Civic 1999 (1H2569122493456960)
Toyota Supra 2000 (1T2569122493456123)
Mitsubishi Lancer 2001 (1F2569106891234589)
Mazda MX7 1998 (1F7969122491234589)
Honda Civic 1999 (1H2569122493456960)
Toyota Supra 2000 (1T2569122493456123)
Note: Not available