inhuman_Arif

sad

Aug 5th, 2021
739
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.company;
  2.  
  3. class Game{
  4.  
  5.     public Game() {
  6.         super();
  7.     }
  8. }
  9.  
  10. class Football extends Game{
  11.     Team team;
  12.  
  13.     public Football(Team team) {
  14.         this.team = team;
  15.     }
  16. }
  17.  
  18. class Player{
  19.     String name;
  20.     int jn, age, nm;
  21.  
  22.     public Player(String name, int jn, int age, int nm) {
  23.         this.name = name;
  24.         this.jn = jn;
  25.         this.age = age;
  26.         this.nm = nm;
  27.     }
  28. }
  29.  
  30. interface all_position{
  31.     void Gk();
  32.     void De();
  33.     void Mid();
  34.     void St();
  35. }
  36.  
  37. class Team implements all_position{
  38.  
  39.     Player p;
  40.  
  41.     public Team(Player p) {
  42.         this.p = p;
  43.     }
  44.  
  45.     @Override
  46.     public void Gk() {
  47.         System.out.println("");
  48.     }
  49.  
  50.     @Override
  51.     public void D() {
  52.         System.out.println("");
  53.     }
  54.  
  55.     @Override
  56.     public void M() {
  57.         System.out.println("");
  58.     }
  59.  
  60.     @Override
  61.     public void S() {
  62.         System.out.println("");
  63.     }
  64. }
  65.  
  66. public class Main {
  67.     public static void main(String args[]) {
  68.  
  69.         Player p = new Player("n/a", 1, 18, 54);
  70.        
  71.         Team t = new Team(p);
  72.  
  73.         Football fb = new Football(t);
  74.  
  75.         Game gg = new Game(fb);
  76.     }
  77. }
RAW Paste Data