Menu

[Solved]Intro Java Programming Part Defining Project Netbeans Create Project Friscocommunitybank Q37157199

Intro to Java Programming

Part-I – Defining Project
A. In NetBeans, create a Project FriscoCommunityBank. This willalso create
friscocommunitybank package
Part-II – Defining Classes
In this part of the assignment, after initial setup, you willcreate the following 3
classes, all part of friscocommunitybank package that was createdabove
§ CustomerAddress class
§ BankAccount class
§ BankCustomer class
To create each of the above-mentioned classes, you will need to runthe
following steps in NetBeans:
A. Initial Setup
Step 1:
Select the FriscoCommunityBank in the Projects tab, then select‘New File’ option from the File menu. You will see the ‘Project’field will be pre-populated with FriscoCommunityBank
Step 2:
Select ‘Java’ from the Categories list, ‘Java Class’ from the filetypes, and click Next
Step 3:
In the Class Name field, enter name of the class that you want tocreate. The Project field will be pre-populated
Step 4:
Select friscocommunitybank from the Package field and clickFinish
B. Define CustomerAddress class
Using the steps defined above, create a public classCustomerAddress with the following 5 instance variables with theirrespective types.
Instance Variable Variable TypeModifier
number                  int          default
street                     String      default
city                         String    default
state                      String       default
zip                          int           default

Define the following methods for this class
(i) All getter and setter methods
(ii) In addition, define the method(s) shown below
Method                 Return Type         Type              Requirement
CustomerAddress CustomerAddressconstructor       N/A
printAddress()       void()                   instance           Prints the address on console in the form:

                                                                               number street
                                                                                   city, state – zip

C. Define BankAccount class
Using the steps defined above, create a public class BankAccount,with the following 5 instance and 1 static variables:
Instance Variable     VariableType                 Modifier
accountNum             String                             public
createDate                String                             public
customerName       CustomerAddress          public
balance                   int                                   public
type                           String                             private
Class Variable(static)          Variable Type
bankName                             String                 default
currentNumber                        int                      private

Note:
– The currentNumber is a static variable that should be initializedto 0.
This value will be updated, by incrementing its current value by 1each
time a new BankAccount object is created
– The incremented value should be assigned to the accountNumvariable
of the new BankAccount instance being created by theconstructor

Define the following methods for this class
(i) All getter and setter methods:
(ii) In addition, define the method(s) shown below
Method                      Return Type        Type           Requirement
BankAccount             BankAccount       Constructor   N/A
allSavingsAccounts() BankAccount[]     Class (static) Method should return an array of all bank accountswhose type is Savings
allCheckingAccounts() BankAccount[]     Class(static) Method should return an array of all bank accounts whosetype is Checking

D. Define BankCustomer class
Using the steps defined above, create a public class BankCustomer,with the following 6 instance and 1 static variables
InstanceVariable         VariableType          Modifier
firstName                     String                       default
lastName                       String                       default
address                         CustomerAddress    default
phone                           int                             default
savingsAccount         BankAccount           default
checkingAccount          BankAccount           default
Class Variable(static)         VariableType
customers                          Customer[] static

Define the following methods for this class, of the specifiedtype, as follows
(i) All getter and setter methods
(ii) In addition, define the methods shown below
Method                                            ReturnType           Type              Requirement
BankCustomer(String fn, String ln)  BankCustomer        constructor     N/A
allCustomers()                                  BankCustomer[]      Class(static)   Method should return an array of allcustomers
getName()                                        String                    Instance         Method should return name in the form: lastName, firstName
showAccounts()                               BankAccount[]         Instance         Method should return a collection of all accounts
getAddress()                                    CustomerAddress Instance         Method should return the address related to thecustomer
getPhone()                                       String                      Instance         Method should return customer’s phone number

Expert Answer


Answer to Intro to Java Programming Part-I – Defining Project A. In NetBeans, create a Project FriscoCommunityBank. This will al… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *