Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Bicycle extends Vehicle {
- private String ownerName;
- private int numWheels;
- public Bicycle() {}
- public Bicycle(String name) {
- ownerName = name;
- numWheels = 2;
- }
- public String getOwnerName() {
- return this.ownerName;
- }
- public int getNumWheels() {
- return this.numWheels;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement