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
james niesen
NA
1
2.3k
Narrowed Down Problem - Need help with Interface Constructor
Aug 17 2011 10:57 AM
I'm storing the following information about a small car:
max speed = 100
fuel efficiency = 50
mpg = 30
reliability factor = 7
I have a class SmallCar that inherits a IVehicle interface. I'm stuck on how to add the constructors. Can someone please help:
[code]
namespace Assets.Classes
{
public interface IVehicle
{
int MaxSpeed { get; set;}
int FuelEfficiency {get; set;}
double
ReliabilityFactor {
get
;
set
; }
double
LifeSpan {
get
;
set
; }
}
public class SmallCar : IVehicle
{
protected
int
maxSpeed {
get
;
set
; }
protected
int
fuelEfficiency {
get
;
set
; }
protected
double
reliabilityFactor {
get
;
set
; }
protected
double
lifeSpan {
get
;
set
; }
class
SmallCar
: IVehicle
Here's where I'm stuck trying to add constructor logic
}
}
}
[/code]
Reply
Answers (
2
)
Operation not supported on read-only collection in Silverlight
Line break in c#