TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prime b
NA
810
347k
Classes and fields
Feb 3 2012 5:43 PM
Create a class named Car with auto-implemented properties
for the vehicle ID number, make, model, color, and value of a
Car object. Write a DisplayFleet( ) method that accepts any
number of Car objects, displays their values, and displays the
total value of all Car objects passed to the method. Write a
Main( ) method that declares fi ve Car objects and assigns values
to each, then calls DisplayFleet() three times—passing
three, four, and fi ve Car objects in successive calls..
This is as far as I could get... I am not sure what they mean by "accept any number of Car objects" , do I like have to create list, array or what?
What should I do next?
private int vIdNumber;
private string vMake;
private int vModel;
private string vColor;
private double vValue;
public int VidNumber { get; set; }
public string Vmake { get; set; }
public int Vmodel { get; set; }
public string Vcolor { get; set; }
public double VValue { get; set; }
public void DisplayFleet(double value)
{
}
Reply
Answers (
5
)
Adding combo box to MS Report Viewer ToolStrip
Anyone who is good with JAVA help?