Advertisement
wingman007

2018_Java_Main

Oct 27th, 2018
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.95 KB | None | 0 0
  1. package com.coolcsn;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         System.out.printf("The population of my little kingdom is %d \n", Person.getCounter());
  7.         // int counter = 0;
  8.         // String student1Name = "Teodora";
  9.         // int student1FNumber = 1234577;
  10.         // int student1Age = 18;
  11.  
  12.         // String student2Name = "Teodora";
  13.  
  14.         // String[] studentsNames = new String[120];
  15.         // int[] studentsAges = new int[120];
  16.  
  17.         Person tedi = new Person("Teodora", 18);
  18.         // counter++;
  19.         // Person tedi = new Person();
  20.         // tedi.name = "Teodora";
  21.         // tedi.age = 700;
  22.  
  23.         // tedi.setName("Teodora");
  24.         // tedi.setAge(100);
  25.  
  26.         Person stoyan = new Person(55, "Stoyan");
  27.         // counter++;
  28.  
  29.         // System.out.printf("My name is %1$s. I am %2$d years old! And my balnce is %3$f \n", tedi.getName(), tedi.getAge(), tedi.getBalance());
  30.  
  31.         // System.out.printf("My name is %1$s. I am %2$d years old! And my balnce is %3$f \n", stoyan.getName(), stoyan.getAge(), stoyan.getBalance());
  32.  
  33.         tedi.introduceYourSelf();
  34.         stoyan.introduceYourSelf();
  35.  
  36.  
  37.  
  38.         doSomething();
  39.  
  40.  
  41.         // Person.counter = 55;
  42.         // System.out.printf("The population of my little kingdom is %d", counter);
  43.         System.out.printf("The population of my little kingdom is %d \n", Person.getCounter());
  44.  
  45.  
  46.         System.out.printf("The national income of my little kingdom is %f \n", Person.getNationalIncome());
  47.  
  48.         Student kircho = new Student("Kircho", 25, "3216735217FD6351276");
  49.         kircho.introduceYourSelf();
  50.  
  51.  
  52.         Athlete krisi = new Athlete("Krisi", 26, "Box");
  53.         krisi.introduceYourSelf();
  54.  
  55.         Executor exec1 = new Executor(kircho);
  56.         exec1.makeItSpeak();
  57.  
  58.  
  59.     }
  60.  
  61.     public static void doSomething() {
  62.         Person georgi = new Person(18, "Georgi");
  63.         georgi.introduceYourSelf();
  64.     }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement