Question: In this assignment, you will define a new linked list. The node of the new linked list should contain three regular data fields (account_number, which

 In this assignment, you will define a new linked list. The

In this assignment, you will define a new linked list. The node of the new linked list should contain three regular data fields (account_number, which is an int; name, which is a String; balance, which is a double) and a reference (next, used to link to another node). account_number name balance next G node Define a class node so that it reflects the above structure. Define the constructor of class node so that it accepts three parameters (account number, name, and balance). Define a class "AccountList". Define the constructor of class AccountList so that it will create an empty liked list. The signature of the constructor is AccountList(); Define a method "addFront" in class AccountList so that it has the following signature. This method should create an instance of node using the given parameters and insert it to the head of the linked list. void addFront (int v, String n, double b); Define a method listAll() in class AccountList so that it can display all the information (account number, name, and balance ) of every account (node) in the linked list. Define a method "updateBalance" in class AccountList. It will search account (node) in the linked list by account number (act). If it can find the account, it will update the balance of the account with new balance (newb) and return true, else, return false. The signature of this method is boolean updateBalance (int act, double newb)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!