 
import java.util.Random;

public class EnhancedM416Enhancer {
    private EnhancedM416 m416;

    public EnhancedM416Enhancer(EnhancedM416 m416) {
        this.m416 = m416;
    }

    public void enhance() {
        m416.damage += enhanceValue(m416.damage);
        m416.rateOfFire += enhanceValue(m416.rateOfFire);
        m416.accuracy += enhanceValue(m416.accuracy);
        m416.recoil -= enhanceValue(m416.recoil); 
        m416.stability += enhanceValue(m416.stability); 
        m416.tracking += enhanceValue(m416.tracking); 
        m416.aiming += enhanceValue(m416.aiming); 
    }

    // 小雪
    private int enhanceValue(int currentValue) {
        Random random = new Random();
        return currentValue * random.nextInt(15) / 100; 
    }

    public void printEnhancedStats() {
        System.out.println("Enhanced M416 Rifle Stats:");
        System.out.println("Name: " + m416.getName());
        System.out.println("Damage: " + m416.getDamage());
        System.out.println("Rate of Fire: " + m416.getRateOfFire());
        System.out.println("Accuracy: " + m416.getAccuracy());
        System.out.println("Recoil: " + m416.getRecoil());
        System.out.println("Stability: " + m416.getStability());
        System.out.println("Tracking: " + m416.getTracking());
        System.out.println("Aiming: " + m416.getAiming());
        System.out.println("Magazine Capacity: " + m416.getMagazineCapacity());
        System.out.println("Reload Time: " + m416.getReloadTime());
    }

    public static void main(String[] args) {
        EnhancedM416 m416 = new EnhancedM416();
        EnhancedM416Enhancer enhancer = new EnhancedM416Enhancer(m416);

        m416.printStats();
        
        enhancer.enhance();
        
        enhancer.printEnhancedStats();
    }
}

class EnhancedM416 {
    private String name;
    private int damage; 
    private int rateOfFire; 
    private int accuracy; 
    private int recoil; 
    private int stability; 
    private int tracking; 
    private int aiming; 
    private int magazineCapacity; 
    private double reloadTime; 

    // 函数
    public EnhancedM416() {
        this.name = "Enhanced M416";
        this.damage = 40; 
        this.rateOfFire = 800; 
        this.accuracy = 80; 
        this.recoil = 50; 
        this.stability = 70; 
        this.tracking = 60; 
        this.aiming = 75; 
        this.magazineCapacity = 30; 
        this.reloadTime = 2.5; 
    }

    public void printStats() {
        System.out.println("M416 Rifle Stats:");
        System.out.println("Name: " + name);
        System.out.println("Damage: " + damage);
        System.out.println("Rate of Fire: " + rateOfFire);
        System.out.println("Accuracy: " + accuracy);
 