All pastes #2075840 Raw Edit

Stuff

public text v1 · immutable
#2075840 ·published 2011-06-06 23:55 UTC
rendered paste body
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Time;

public class Time {
int hours, minutes;
double doubleDecimal;

Time(int hr, int min){
 this.hours = hr;
 this.minutes = min;
 while (minutes > 59) {
            hours = hours + 1;
            minutes = minutes - 60;
        }
}
Time(double hrmin){
 this.doubleDecimal = hrmin;   
}

@Override public String toString(){
return hours + ":" + minutes;
}

    public static void main(String[] args) {
        
        
        System.out.println(new Time(9,30));
        System.out.println(new Time(21,30));
        System.out.println(new Time(10,93));
        System.out.println(new Time(9.5));
        
        
        }
}