Connect with a community that values knowledge and expertise on IDNLearn.com. Find in-depth and accurate answers to all your questions from our knowledgeable and dedicated community members.
Sagot :
Using JAVA knowledge to write code about creating a bank account and using the data to make a transition.
Writing the code in JAVA, we have:
CheckingAccount.java
package bankAccount;
public class Transaction {
int transNumber;
int transId;
double transAmt;
public Transaction(int transNumber, int id, double amount) {
this.transNumber = transNumber;
this.transId = id;
this.transAmt = amount;
}
public int getTransNumber() {
return transNumber;
}
public void setTransNumber(int transNumber) {
this.transNumber = transNumber;
}
public int getTransId() {
return transId;
}
public void setTransId(int transId) {
this.transId = transId;
}
public double getTransAmt() {
return transAmt;
}
public void setTransAmt(double transAmt) {
this.transAmt = transAmt;
}
public String toString() {
return "Transaction Number: " + transNumber + ", Transaction ID: " + transId + " Transaction Amount: " + transAmt;
}
}
See more about JAVA at brainly.com/question/12975450
#SPJ1
We appreciate your contributions to this forum. Don't forget to check back for the latest answers. Keep asking, answering, and sharing useful information. Find clear answers at IDNLearn.com. Thanks for stopping by, and come back for more reliable solutions.