❓ Help Help Java Programing

Status
Not open for further replies.
declared dapat lahat ng variable sa labas ng setter/getter.
kya pag mag pull sya ng value di makita sa ibang setter/getter.

try o print the interest only kung may result sya or 0.
 
declared dapat lahat ng variable sa labas ng setter/getter.
kya pag mag pull sya ng value di makita sa ibang setter/getter.

try o print the interest only kung may result sya or 0.
Natry ko na po kanina and 0 lang po ang binabalik
 
Natry ko na po kanina and 0 lang po ang binabalik

Java:
public static void setInterestRate(double newrate) {
      interestRate = newrate;
   }


public void addInterest() {
      double interest = (getBalance() * interestRate) / 100;
      balance = balance + interest;
      System.out.println("Your new balance is: " + balance);
   }
 
Java:
public static void setInterestRate(double newrate) {
      interestRate = newrate;
   }


public void addInterest() {
      double interest = (getBalance() * interestRate) / 100;
      balance = balance + interest;
      System.out.println("Your new balance is: " + balance);
   }
AYOWNNNN ok na paps napapalabas ko na sa getters, ayun lang pala hahaha, baliktad pala yung interestRate = newRate ko. Salamat ng marami paps FreeAllYouCan-OFFICIAL mwuahhhh
 
Status
Not open for further replies.

About this Thread

  • 7
    Replies
  • 484
    Views
  • 3
    Participants
Last reply from:
FreeAllYouCan-OFFICIAL

Trending Topics

Online now

Members online
1,094
Guests online
948
Total visitors
2,042

Forum statistics

Threads
2,273,795
Posts
28,951,706
Members
1,234,957
Latest member
Lawlieto
Back
Top