Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //zad.2b
- class Time(private var godz:Int,private var minute:Int)
- {
- require(godz>=0 && godz<=23 && minute>=0 && minute<60)
- def mm:Int=godz*60+minute;
- def mm_=(y:Int,x:Int)
- {
- require(y>=0 && y<=23 && x>=0 && x<60)
- minute=x;
- godz=y;
- }
- def before(other:Time):Boolean=
- this.godz*60+this.minute<other.godz*60+other.minute
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement