MCPcopy Create free account
hub / github.com/careercup/ctci / Car

Class Car

java/Chapter 8/Question8_4/Car.java:3–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1package Question8_4;
2
3public class Car extends Vehicle {
4 public Car() {
5 spotsNeeded = 1;
6 size = VehicleSize.Compact;
7 }
8
9 public boolean canFitInSpot(ParkingSpot spot) {
10 return spot.getSize() == VehicleSize.Large || spot.getSize() == VehicleSize.Compact;
11 }
12
13 public void print() {
14 System.out.print("C");
15 }
16}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected