.


:




:

































 

 

 

 


Visual Studio, .




, : , . , . , , . , Building, Floors, Area Occupants, . .

// Building.

Using System;

class Building {

public int Floors; // public int Area; //

public int Occupants; //

}

// Building, class BuildingDemo { static void Main() {

Building house = new Building();

Building office = new BuildingO;

int areaPP; //

// house, house.Occupants = 4; house.Area = 2500; house.Floors = 2;

// office, office.Occupants = 25; office.Area = 4200; office.Floors = 3;

// . areaPP = house.Area / house.Occupants;

Console.WriteLine(" :\n " +

house.Floors + " \ " + house.Occupants + " \ " + house.Area +

" . , \ " + areaPP + " ");

// . areaPP = office.Area / office.Occupants;

Console.WriteLine(" :\n " +

office.Floors + " \ " +

office.Occupants + " \ " +

office.Area +

" . , \ " + areaPP + " ");

}

}

.

:

. , 625

:

25

4200 . ^ , 168

, house , office. . 6.1.

 

 

. 6.1.

Building .

Building house = new Building();

. -, house, Building. , , . -, , , . new. , house . , house Building.

new (.. ) , . , C# .

, house , , .

Building house; //

house = new Building(); // Building

house Building. , house , , . Building, house. house .

, , , . , . , . ,

int ; = 10;





:


: 2016-12-03; !; : 315 |


:

:

, .
==> ...

1882 - | 1765 -


© 2015-2024 lektsii.org - -

: 0.03 .