Biblioteca Java - Blame information for rev 4
Subversion Repositories:
Rev | Author | Line No. | Line |
---|---|---|---|
4 | mihai | 1 | package oop.masina; |
2 | |||
3 | |||
4 | public class Motor { | ||
5 | String tip; | ||
6 | int cc; | ||
7 | boolean stare; | ||
8 | |||
9 | Motor(String tip, int cc){ | ||
10 | this.tip = tip; | ||
11 | this.cc = cc; | ||
12 | } | ||
13 | |||
14 | void startStop(){ | ||
15 | if(stare == false){ | ||
16 | stare = true; | ||
17 | System.out.println("Motor pornit"); | ||
18 | }else | ||
19 | { | ||
20 | stare = false; | ||
21 | System.out.println("Motor oprit"); | ||
22 | } | ||
23 | } | ||
24 | |||
25 | boolean verificStare(){ | ||
26 | return stare; | ||
27 | } | ||
28 | |||
29 | } |