Question:You work as an application developer at Certkiller .com. 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 using a vehicle identification number (VIN).
You need to use the correct code to ensure type-safety.
What should you do? -(VB.NET) 

A Use the following code:
Dim v1 As Vehicle, v2 As Vehicle
v1 = New Vehicle("1M2567871Y91234574", "Nissan Silvia", 1996)
v2 = New Vehicle("1F2569122491234574", "Mitsubishi Lancer", 2005)
Dim vList As New ArrayList()
vList.Add(v1)
vList.Add(v2) 

B Use the following code:
Dim v1 As Vehicle, v2 As Vehicle
v1 = New Vehicle("1M2567871Y91234574", "Nissan Silvia", 1996)
v2 = New Vehicle("1F2569122491234574", "Mitsubishi Lancer", 2005)
Dim vList As New SortedList(Of String, Vehicle)()
vList.Add(v1.VIN, v1)
vList.Add(v2.VIN, v2) 

C Use the following code:
Dim v1 As Vehicle, v2 As Vehicle
v1 = New Vehicle("1M2567871Y91234574", "Nissan Silvia", 1996)
v2 = New Vehicle("1F2569122491234574", "Mitsubishi Lancer", 2005)
Dim vList As New List()
vList.Add(v1)
vList.Add(v2) 

D Use the following code:
Dim v1 As Vehicle, v2 As Vehicle
v1 = New Vehicle("1M2567871Y91234574", "Nissan Silvia", 1996)
v2 = New Vehicle("1F2569122491234574", "Mitsubishi Lancer", 2005)
Dim vList As New SortedList()
vList.Add(v1.VIN, v1)
vList.Add(v2.VIN, v2) 

+ Answer
+ Report
Total Preview: 1604

Copyright © 2024. Powered by Intellect Software Ltd