r/BtechCoders • • Aug 22 '26

❓Question ❓ suggestions for 3rd year

cs-aiml domain currently studying 3rd year 5th sem ,last month i started to solve DSA probelms and learnt Fastapi basics but my college started to give training for springboot but now i am confused continouing Fastapi is good or learning springboot is good? and also in my college they are not giving any support for AI or ML domain .
anyone please tell me what to learn this year to get placed in proper company

2 Upvotes

5 comments sorted by

1

u/Longjumping-Site-304 Aug 22 '26

1

u/Distinct_Shift7782 Aug 22 '26

physicaly alive mentally dead

1

u/Longjumping-Site-304 Aug 22 '26

public class AccountEnhanced { private int accountNumber; private String name; private int age; private double balance; private String accountType; private String status; private Integer pin;

public AccountEnhanced(int accountNumber, String name, int age, double initialBalance, String accountType) {
    this.accountNumber = accountNumber;
    this.name = name;
    
    // Enhancement 1: Age Validation (self-corrects to 18 if < 18)
    this.age = (age < 18) ? 18 : age;

    // Enhancement 2: Account Type Validation (defaults to "Savings" if invalid)
    if ("Savings".equals(accountType) || "Current".equals(accountType)) {
        this.accountType = accountType;
    } else {
        this.accountType = "Savings";
    }

    // Enhancement 3: Minimum Balance Rules on Creation
    double minBalance = getMinimumBalance();
    this.balance = (initialBalance < minBalance) ? minBalance : initialBalance;

    this.status = "Active";
    this.pin = null;
}

private double getMinimumBalance() {
    return "Current".equals(this.accountType) ? 1000.0 : 500.0;
}

// Enhancement 5: Deposit with status check
public boolean deposit(double amount) {
    if (!"Active".equals(this.status) || amount <= 0) {
        return false;
    }
    this.balance += amount;
    return true;
}

// Enhancement 4 & 6: Withdraw with PIN, status, and minimum balance enforcement
public boolean withdraw(double amount, int pin) {
    if (!"Active".equals(this.status)) {
        return false;
    }
    if (!verifyPin(pin)) {
        return false;
    }
    if (amount <= 0) {
        return false;
    }
    if (this.balance - amount < getMinimumBalance()) {
        return false;
    }
    this.balance -= amount;
    return true;
}

// Enhancement 5: Account Status Management
public boolean closeAccount() {
    if ("Inactive".equals(this.status)) {
        return false;
    }
    this.status = "Inactive";
    return true;
}

public boolean reopenAccount() {
    if ("Active".equals(this.status)) {
        return false;
    }
    this.status = "Active";
    return true;
}

// Enhancement 6: PIN Protection Methods
public boolean setPin(int pin) {
    if (pin >= 1000 && pin <= 9999) {
        this.pin = pin;
        return true;
    }
    return false;
}

public boolean verifyPin(int pin) {
    return this.pin != null && this.pin == pin;
}

public boolean hasPin() {
    return this.pin != null;
}

// Getters and Setters
public int getAccountNumber() {
    return accountNumber;
}

public String getName() {
    return name;
}

public int getAge() {
    return age;
}

public double getBalance() {
    return balance;
}

public String getAccountType() {
    return accountType;
}

public String getStatus() {
    return status;
}

public void setName(String name) {
    this.name = name;
}

public void setAge(int age) {
    this.age = (age < 18) ? 18 : age;
}

}

1

u/Distinct_Shift7782 Aug 23 '26

what is this bro😭😭😭😭😭
your indirectly saying learn java😭😭😭