src/helloworld/Clock.java
//eqauls compare two objects memory adresses

eqauls compare two objects memory adresses
eqauls compare two objects memory adresses
void testEquals(){
        Clock clock1 = new Clock();
        Clock clock2 = clock1;
        Clock clock3 = new Clock();
        clock1.setHours(1.00);
        clock3.setHours(1.00);
        assert clock1.equals(clock2) == true;
        assert clock2.getHours() == 1.00;
        assert (clock1 == clock2) == true;
        assert clock1.equals(clock3) == true;
        assert (clock1 == clock3) == false;
    }
void testEquals ( ) { Clock clock1 = new Clock ( ) ; Clock clock2 = clock1 ; Clock clock3 = new Clock ( ) ; clock1 . setHours ( 1.00 ) ; clock3 . setHours ( 1.00 ) ; assert clock1 . equals ( clock2 ) == true ; assert clock2 . getHours ( ) == 1.00 ; assert ( clock1 == clock2 ) == true ; assert clock1 . equals ( clock3 ) == true ; assert ( clock1 == clock3 ) == false ; }
eqauls compare two objects memory adresses
eqauls compare two objects memory adresses