diff --git a/Answers/40230112056/que/.vscode/settings.json b/Answers/40230112056/que/.vscode/settings.json new file mode 100644 index 0000000..e112a70 --- /dev/null +++ b/Answers/40230112056/que/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "java.project.sourcePaths": ["src"], + "java.project.outputPath": "bin", + "java.project.referencedLibraries": [ + "lib/**/*.jar" + ] +} diff --git a/Answers/40230112056/que/README.md b/Answers/40230112056/que/README.md new file mode 100644 index 0000000..7c03a53 --- /dev/null +++ b/Answers/40230112056/que/README.md @@ -0,0 +1,18 @@ +## Getting Started + +Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. + +## Folder Structure + +The workspace contains two folders by default, where: + +- `src`: the folder to maintain sources +- `lib`: the folder to maintain dependencies + +Meanwhile, the compiled output files will be generated in the `bin` folder by default. + +> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. + +## Dependency Management + +The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Answers/40230112056/que/src/struct/beater.java b/Answers/40230112056/que/src/struct/beater.java new file mode 100644 index 0000000..9d78d0c --- /dev/null +++ b/Answers/40230112056/que/src/struct/beater.java @@ -0,0 +1,8 @@ +package struct; + +public class beater extends player { + public beater(String name, int age){ + super(name,age); + this.ch=0.4; + } +} diff --git a/Answers/40230112056/que/src/struct/chaser.java b/Answers/40230112056/que/src/struct/chaser.java new file mode 100644 index 0000000..f34551e --- /dev/null +++ b/Answers/40230112056/que/src/struct/chaser.java @@ -0,0 +1,8 @@ +package struct; + +public class chaser extends player { + public chaser(String name, int age){ + super(name,age); + this.ch=0.05; + } +} diff --git a/Answers/40230112056/que/src/struct/keeper.java b/Answers/40230112056/que/src/struct/keeper.java new file mode 100644 index 0000000..c3d2376 --- /dev/null +++ b/Answers/40230112056/que/src/struct/keeper.java @@ -0,0 +1,9 @@ +package struct; + +public class keeper extends player { + + public keeper(String name, int age){ + super(name,age); + this.ch=0.7; + } +} diff --git a/Answers/40230112056/que/src/struct/match.java b/Answers/40230112056/que/src/struct/match.java new file mode 100644 index 0000000..e8d8df9 --- /dev/null +++ b/Answers/40230112056/que/src/struct/match.java @@ -0,0 +1,17 @@ +package struct; + +public class match { + team t1 = new team(); + team t2 = new team(); + public int g1,g2; + public void start(){ + for(int i=0;i<100;i++){ + t1.play(); + if (t1.getgoal()>=150) break; + t2.play(); + if (t2.getgoal()>=150) break; + } + g1=t1.getgoal(); + g2=t2.getgoal(); + } +} diff --git a/Answers/40230112056/que/src/struct/myapp.java b/Answers/40230112056/que/src/struct/myapp.java new file mode 100644 index 0000000..60ed123 --- /dev/null +++ b/Answers/40230112056/que/src/struct/myapp.java @@ -0,0 +1,17 @@ +package struct; + +public class myapp { + public static void main (String[] jsdbfkjsdf){ + match p = new match(); + p.start(); + if (p.g1