Advertisement
Mouamle

Java is OP

Jun 8th, 2015
638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.43 KB | None | 0 0
  1. package com.Mouamle.test;
  2.  
  3. class Player {
  4.     String Name;
  5.     String Job;
  6.     int Age;
  7.     int Money;
  8.    
  9.     void speak() {
  10.         System.out.println("Hello my name is:  " + Name );
  11.         System.out.println("My age is: " + Age);
  12.         System.out.println("My job is: " + Job);
  13.         System.out.println("I Have: " + Money + " Money!");
  14.         System.out.println("--------------------------------");
  15.     }
  16. }
  17.  
  18. class Car {
  19.     String Model;
  20.     String NumbersPanel;
  21.     int Id;
  22.     int WheelsSize;
  23.    
  24. }
  25.  
  26. class Shoop {
  27.     String ItemName;
  28.     String ItemType;
  29.    
  30.     int ItemId;
  31.     int ItemPrice;
  32. }
  33.  
  34. class World {
  35.     String Type;
  36.    
  37.    
  38.     int SizeX, SizeY;
  39.     int Id;
  40. }
  41.  
  42.  
  43.  
  44.  
  45. public class Objucts {
  46.  
  47.     public static void main(String[] args) {
  48.  
  49.         Player  Player1 = new Player();
  50.         Player1.Name = "Mouamle";
  51.         Player1.Age = 16;
  52.         Player1.Money = 500 * 1000;
  53.         Player1.Job = "Programmer";
  54.         Player1.speak();
  55.        
  56.         Player Player2 = new Player();
  57.         Player2.Name = "Rafat";
  58.         Player2.Age = 16;
  59.         Player2.Money = 500 * 100;
  60.         Player2.Job = "Programmer";
  61.         Player2.speak();   
  62.        
  63.        
  64.         World World1 = new World();
  65.         World1.Id = 0;
  66.         World1.SizeX = 100;
  67.         World1.SizeY = 100;
  68.         World1.Type = "Flat";
  69.        
  70.        
  71.         Car Car1 = new Car();
  72.         Car1.Id = 0;
  73.         Car1.Model = "Proton";
  74.         Car1.NumbersPanel = "D19879";
  75.         Car1.WheelsSize = 17;
  76.        
  77.         Shoop Shoop1 = new Shoop();
  78.        
  79.         Shoop1.ItemId = 0;
  80.         Shoop1.ItemName = "Apple";
  81.         Shoop1.ItemPrice = 500;
  82.         Shoop1.ItemType = "Food";
  83.        
  84.     }
  85.  
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement