Browse Source

first try

master
straussta76745 5 years ago
commit
36b09d54da
4 changed files with 76 additions and 0 deletions
  1. 6
    0
      .idea/vcs.xml
  2. 11
    0
      SEWS19.iml
  3. 23
    0
      src/HelloWorld.java
  4. 36
    0
      src/Visitenkarte.java

+ 6
- 0
.idea/vcs.xml View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

+ 11
- 0
SEWS19.iml View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

+ 23
- 0
src/HelloWorld.java View File

@@ -0,0 +1,23 @@

//static (bei Methoden)=> keine Instanz

public class HelloWorld {
public static void main(String[] args){
System.out.println("Hello World");
int j = 0;
for(int i = 0; i<=200; i++){
if(i%5==0){
System.out.println(i + " ist durch 5 teilbar");
}

if(i%10==9){
System.out.println(i + " endet auf 9");
}

if(((i+j)%3)==0){
System.out.println(i + " und " + j + " addiert ergeben " + (i+j) + " und " + (i+j) + " ist durch 3 teilbar.");
}
j=i;
}
}
}

+ 36
- 0
src/Visitenkarte.java View File

@@ -0,0 +1,36 @@
public class Visitenkarte {

public String name;
public String firstName;
public String job;
public String age;
public String address;
public String phoneNumber;


public Visitenkarte(String name, String firstName, String job, String age, String address, String phoneNumber){
this.name = name;
this.firstName = firstName;
this.job = job;
this.age = age;
this.address = address;
this.phoneNumber = phoneNumber;
}

public static void printVisitenkarte(Visitenkarte a){
System.out.println("-----------------------------------");
System.out.println(a.name + ", " + a.firstName);
System.out.println(a.job + ", " + a.age);
System.out.println(a.address);
System.out.println(a.phoneNumber);
System.out.println("-----------------------------------");
}

public static void main(String[] args) {
Visitenkarte tabea = new Visitenkarte("Strauss", "Tabea", "student", "27", "Untere Baustr. NBG", "017712345");
printVisitenkarte(tabea);
}



}

Loading…
Cancel
Save