Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Looper
- {
- class Car
- {
- private string _model;
- public string Model
- {
- get
- {
- return _model;
- }
- set
- {
- if (value == "12344") return;
- _model = value;
- }
- }
- private int _maxSpeed;
- public int MaxSpeed
- {
- get
- {
- return _maxSpeed;
- }
- set
- {
- if (value > 0 && value < 500)
- {
- _maxSpeed = value;
- }
- }
- }
- private int _healthBumper;
- private int _healthCusov;
- private int _healthBack;
- //TAB}
- public Car(string model, int maxSpeed, int healthBumper, int healthCusov, int healthBack)
- {
- _model = model;
- _maxSpeed = maxSpeed;
- _healthBumper = healthBumper;
- _healthCusov = healthCusov;
- _healthBack = healthBack;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement