Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: bilal baig
Added: Dec 18, 2017 3:23 PM
Views: 32
Tags: no tags
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package dom;
  7.  
  8. /**
  9.  *
  10.  * @author Bilal
  11.  */
  12. public class Distributor extends Profie {
  13.  
  14.     private String name;
  15.     private double coin;
  16.  
  17.     public Distributor() {
  18.         super();
  19.         this.name = " ";
  20.         this.coin = 0;
  21.     }
  22.  
  23.     public Distributor(String name, double coin, String hash, String digitalSignature, String publicKey, String privateKey) {
  24.         super(hash, digitalSignature, publicKey, privateKey);
  25.         this.name = name;
  26.         this.coin = coin;
  27.     }
  28.  
  29.     public String getName() {
  30.         return name;
  31.     }
  32.  
  33.     public void setName(String name) {
  34.         this.name = name;
  35.     }
  36.  
  37.     public double getCoin() {
  38.         return coin;
  39.     }
  40.  
  41.     public void setCoin(double coin) {
  42.         this.coin = coin;
  43.     }
  44.  
  45.     @Override
  46.     public String toString() {
  47.         return ("\nDISTRIbUTOR NAME : " + name + "\nCOIN : " + coin + super.toString());
  48.     }
  49.  
  50. }
  51.