Refactor: remove example package
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
package org.example;
|
||||
|
||||
import org.example.model.*;
|
||||
import org.example.util.VehicleInspector;
|
||||
import org.example.behavior.Serviceable;
|
||||
package org;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.example.behavior;
|
||||
package org.behavior;
|
||||
|
||||
public interface Chargeable {
|
||||
void charge(double amount);
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.example.behavior;
|
||||
package org.behavior;
|
||||
|
||||
public interface Refuelable {
|
||||
void refuel(double amount);
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package org.example.behavior;
|
||||
package org.behavior;
|
||||
|
||||
import org.example.model.Vehicle;
|
||||
import org.model.Vehicle;
|
||||
|
||||
public interface Serviceable {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.example.model;
|
||||
package org.model;
|
||||
|
||||
/*
|
||||
* Car extends Vehicle.
|
||||
@@ -9,7 +9,7 @@ package org.example.model;
|
||||
* - performService(): print "General car service completed"
|
||||
*/
|
||||
|
||||
import org.example.behavior.Serviceable;
|
||||
import org.behavior.Serviceable;
|
||||
|
||||
public abstract class Car extends Vehicle implements Serviceable {
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package org.example.model;
|
||||
package org.model;
|
||||
|
||||
/*
|
||||
* ElectricCar extends Car.
|
||||
@@ -11,7 +11,7 @@ package org.example.model;
|
||||
* Reset chargeLevel to 100
|
||||
*/
|
||||
|
||||
import org.example.behavior.Chargeable;
|
||||
import org.behavior.Chargeable;
|
||||
|
||||
public class ElectricCar extends Car implements Chargeable {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.example.model;
|
||||
package org.model;
|
||||
|
||||
/*
|
||||
* GasCar extends Car.
|
||||
@@ -11,7 +11,7 @@ package org.example.model;
|
||||
* Reset fuelLevel to 100
|
||||
*/
|
||||
|
||||
import org.example.behavior.Refuelable;
|
||||
import org.behavior.Refuelable;
|
||||
|
||||
public class GasCar extends Car implements Refuelable {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.example.model;
|
||||
package org.model;
|
||||
|
||||
/*
|
||||
* SportsCar extends GasCar.
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.example.model;
|
||||
package org.model;
|
||||
|
||||
/*
|
||||
* Abstract base class for all vehicles.
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
package org.example.util;
|
||||
package org.util;
|
||||
|
||||
import org.example.model.*;
|
||||
import org.example.*;
|
||||
import org.model.Vehicle;
|
||||
|
||||
/*
|
||||
* Utility class to inspect vehicles.
|
||||
Reference in New Issue
Block a user