Add OCP support in main method and implement develop method in BackEndDeveloper

This commit is contained in:
ItsTheSky
2025-12-01 09:53:08 +01:00
parent 17d960fd3b
commit 16d76d1c08
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,10 @@
import net.itsthesky.projetbut2.dip.DIPClient; import net.itsthesky.projetbut2.dip.DIPClient;
import net.itsthesky.projetbut2.ocp.OCPClient;
void main() { void main(String[] args) {
DIPClient.main(); if (args.length == 0) return;
if (args[0].equalsIgnoreCase("ocp")) OCPClient.main();
else if (args[0].equalsIgnoreCase("dip")) DIPClient.main();
else IO.println("Invalid argument: '" + args[0] + "'");
} }

View File

@ -2,6 +2,7 @@ package net.itsthesky.projetbut2.dip;
public class BackEndDeveloper implements Developer { public class BackEndDeveloper implements Developer {
@Override
public void develop() { public void develop() {
IO.println("I write Java code !"); IO.println("I write Java code !");
} }