#output not coming same when clicked on void display the second time
1 messages ยท Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
public class BankCard
{
//attributes of class BankCard
private int cardId;
private int balanceAmount;
private String bankAccount;
private String clientName;
private String issuerBank;
//Making a consturctor which accepts four parameters that are bankAccount, balanceAmount, issuerBank and carId
public BankCard(int cardId, String bankAccount, int balanceAmount, String issuerBank){
this.cardId = cardId;
this.bankAccount = bankAccount;
this.balanceAmount= balanceAmount;
this.clientName= "";
this.issuerBank=issuerBank;
}
//accessor or getter method
public int getcardId(){
return this.cardId;
}
public String getbankAccount(){
return this.bankAccount;
}
public int getbalanceAmount(){
return this.balanceAmount;
}
public String getclientName(){
return this.clientName;
}
public String getissuerBank(){
return this.issuerBank;
}
//setter/mutator method for client name and balance amount
public void setclientName(String clientName){
this.clientName= clientName;
}
public void setbalanceAmount(int balanceAmount){
this.balanceAmount = balanceAmount;
}
//display method
public void display(){
if (this.clientName.equals("")){
System.out.println("Error Client Name is Not Assigned");
}
else{
System.out.println("Client Name: "+ clientName);
System.out.println("Card Id: "+cardId);
System.out.println("Bank Account: "+ bankAccount);
System.out.println("Balance Amount: "+ balanceAmount);
System.out.println("Issued Bank: "+ issuerBank);
}
}
}
full code and with discord formatting please. or just upload the files
I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐