Skip to content

Instantly share code, notes, and snippets.

View Rahandi's full-sized avatar
😄
having fun

Rahandi Noor Pasha Rahandi

😄
having fun
View GitHub Profile
@Rahandi
Rahandi / Binatang.java
Created October 12, 2017 17:55
Overriding
public class Binatang {
public void begerak(){
System.out.println("Binatang bergerak sesuai kemampuannya");
}
public void berkembangBiak(){
System.out.println("Binatang berkembang biak sesuai kemampuannya");
}
}
public class ClockDisplay
{
private NumberDisplay hours;
private NumberDisplay minutes;
private String displayString; // simulates the actual display
/**
* Constructor for ClockDisplay objects. This constructor
* creates a new clock set at 00:00.
*/
public ClockDisplay()
/*
Exercie 2.83
*/
public class Book
{
// The fields.
private String author;
private String title;
/**
* Set the author and title fields when this object