Question: Some help with this java code please! Complete the following CheckingAccount class by adding the constructor, getter, setter, and toString methods as requested. You also
Some help with this java code please! Complete the following CheckingAccount class by adding the constructor, getter, setter, and toString
methods as requested. You also need to add the greeting method as explained.
public class CheckingAccount
private int accountld;
private double balance;
private String firstName;
private String lastName;
Constructor initializes the instance variables of accountld and balance to zero.
Add setters and getters for all instance variables. For the setters of String variables you can set the
value to String "None" and for numbers for balance and accountld set them to a random value.
toString method is supposed to print the firstName followed by lastName on the same line.
Add a method called Greeting that prints a welcome message for the customer, the message must
include the fullname of the account owner. This method does not accept input and does not return
anything.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
