design a class car having variables model,
yr_of_manufacture, owner,reg_no. Design methods for
assigning the values, Printing the values( you decide
gui,control, any other methods if require)



design a class car having variables model, yr_of_manufacture, owner,reg_no. Design methods for a..

Answer / Aneeta Yadav

Here's an example of how to design the Car class in VB.NET:nn```vbnetnPublic Class Carn Private _model As Stringn Private _yrOfManufacture As Integern Private _owner As Stringn Private _regNo As Stringnn Public Sub New(ByVal model As String, ByVal yrOfManufacture As Integer, ByVal owner As String, ByVal regNo As String)n _model = modeln _yrOfManufacture = yrOfManufacturen _owner = ownern _regNo = regNon End Subnn Public Function GetModel() As Stringn Return _modeln End Functionnn Public Function SetModel(ByVal value As String)n _model = valuen End Functionnn ' Similarly design methods for other variables and printing valuesnnEnd Classn```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB.NET Code Interview Questions

on running a vb.net form to add data to an sql server database am getting an error -> the item "obj\debug\windows application1.form1.resources"was specified more than oncein the "resources" parameter .duplicateitems are not supported by the the "resources" parameter. anyone with the solution to the problem

1 Answers  


Please give me the vb.net codes for deadlock(like detecting,& avoiding) in any version of vb.net.

1 Answers  


i want to input any no in textbox1. then click to button and then show the name in the textbox2 please send me coding

2 Answers  


design a class car having variables model, yr_of_manufacture, owner,reg_no. Design methods for assigning the values, Printing the values( you decide gui,control, any other methods if require)

1 Answers  


i want to supress the entire row which have null value and i want to place next row in that place.

0 Answers   HCL,


how to access crystal report field data value in vb .net

0 Answers   Microtek, TCS,


how to make a software for a game ?

1 Answers   Cipla,


how to retrive the content from the file using vb.net

1 Answers  


program for check the given number is prime or not in VB.net

1 Answers  


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)