changed the file structure
This commit is contained in:
parent
cd81159162
commit
b1c3582880
391 changed files with 675 additions and 0 deletions
7
Code/Steiner/Geografie/.vscode/settings.json
vendored
Normal file
7
Code/Steiner/Geografie/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Code/Steiner/Geografie/README.md
Normal file
18
Code/Steiner/Geografie/README.md
Normal file
|
@ -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).
|
BIN
Code/Steiner/Geografie/bin/App.class
Normal file
BIN
Code/Steiner/Geografie/bin/App.class
Normal file
Binary file not shown.
95
Code/Steiner/Geografie/src/App.java
Normal file
95
Code/Steiner/Geografie/src/App.java
Normal file
|
@ -0,0 +1,95 @@
|
|||
import java.util.Scanner;
|
||||
|
||||
public class App {
|
||||
static Scanner scan = new Scanner(System.in);
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// variables for score
|
||||
double question = 0;
|
||||
final double QuestionTotal = 6;
|
||||
double grade = 1;
|
||||
|
||||
// Anwsers
|
||||
System.out.println("is Sargans in Graubünden? y/n");
|
||||
String anwserOne = scan.nextLine();
|
||||
System.out.println("Is Lichtenstein bigger than St. Gallen? y/n");
|
||||
String anwserTwo = scan.nextLine();
|
||||
System.out.println("is Bielefeld real? y/n");
|
||||
String anwserThree = scan.nextLine();
|
||||
System.out.println("Is St. Moritz in Switzerland y/n");
|
||||
String anwserFor = scan.nextLine();
|
||||
System.out.println("Has Lichtenstein a own army y/n");
|
||||
String anwserFive = scan.nextLine();
|
||||
System.out.println("Is the Matterhorn a mountain y/n");
|
||||
String anwserSix = scan.nextLine();
|
||||
|
||||
// correction
|
||||
if (anwserOne.equalsIgnoreCase("n")) {
|
||||
question++;
|
||||
}
|
||||
if (anwserTwo.equalsIgnoreCase("n")) {
|
||||
question++;
|
||||
}
|
||||
if (anwserThree.equalsIgnoreCase("n")) {
|
||||
question++;
|
||||
}
|
||||
if (anwserFor.equalsIgnoreCase("y")) {
|
||||
question++;
|
||||
}
|
||||
if (anwserFive.equalsIgnoreCase("n")) {
|
||||
question++;
|
||||
}
|
||||
if (anwserSix.equalsIgnoreCase("y")) {
|
||||
question++;
|
||||
}
|
||||
|
||||
// Score
|
||||
grade = question / QuestionTotal * 5 + 1;
|
||||
|
||||
/*
|
||||
* // Rounding
|
||||
* if (grade >= 1 && grade < 1.5) {
|
||||
* grade = 1;
|
||||
* } else if (grade >= 1.5 && grade < 2.5) {
|
||||
* grade = 2;
|
||||
* } else if (grade >= 2.5 && grade < 3.5) {
|
||||
* grade = 3;
|
||||
* } else if (grade >= 3.5 && grade < 4.5) {
|
||||
* grade = 4;
|
||||
* } else if (grade >= 4.5 && grade < 5) {
|
||||
* grade = 5;
|
||||
* }
|
||||
*/
|
||||
|
||||
// text feedback
|
||||
switch ((int) grade) {
|
||||
case 1:
|
||||
System.out.println("Ouh tuff buddy");
|
||||
break;
|
||||
case 2:
|
||||
System.out.println("Please learn more");
|
||||
break;
|
||||
case 3:
|
||||
System.out.println("So close buddy");
|
||||
break;
|
||||
case 4:
|
||||
System.out.println("Good job Buddy");
|
||||
break;
|
||||
case 5:
|
||||
double distantToPerfection = (double) 6 - grade;
|
||||
System.out.println("Absolut Mastermind only " + distantToPerfection + " short to perfection");
|
||||
break;
|
||||
case 6:
|
||||
System.out.println("Mastermind");
|
||||
break;
|
||||
default:
|
||||
System.out.println("Error");
|
||||
break;
|
||||
}
|
||||
|
||||
System.out.println("In other words your grade is: " + grade);
|
||||
scan.close();
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue