Files

31 lines
684 B
Java
Raw Permalink Normal View History

2017-02-24 00:24:47 -06:00
// Author: Rodney Shaghoulian
2018-07-27 16:45:56 -07:00
// Github: github.com/RodneyShag
// HackerRank: hackerrank.com/RodneyShag
2017-02-24 00:24:47 -06:00
import java.util.*;
import java.io.*;
class BiCycle {
String define_me() {
return "a vehicle with pedals.";
}
}
class MotorCycle extends BiCycle {
String define_me() {
return "a cycle with an engine.";
}
MotorCycle() {
System.out.println("Hello I am a motorcycle, I am " + define_me());
String temp = super.define_me();
System.out.println("My ancestor is a cycle who is " + temp);
}
}
class Solution {
2017-09-11 09:32:17 -07:00
public static void main(String[] args) {
2017-02-24 00:24:47 -06:00
MotorCycle M = new MotorCycle();
}
}