Assgn 4 Draft Essay examples

Submitted By gsamuraijack
Words: 885
Pages: 4

1. Create an Address class with file name Address.java that will have the following object members:
a. Object States (or) Instance variables
i. addressLine1 of type String ii. addressLine2 of type String iii. city of type String iv. province of type String
v. postalCode of type String vi. country of type String
b. Object Behaviors
i. Create getter and setter methods for all of the above properties ii. Override toString() method from Object class
c. Constructor
i. A default constructor ii. A parameterized constructor that accepts and sets all of the above object properties.

2. Create a Person class with file name Person.java that will have the following object members:
a. Object States (or) Instance variables
i. firstName of type String ii. middleName of type String iii. lastName of type String iv. age of type int
v. gender of type char vi. phoneNumber of type String vii. emailAddress of type String viii. dobDD of type int ix. dobMM of type int
x. dobYY of type int xi. address of type Address class xii. password of type String
b. Object Behaviors
i. Create a getter and setter methods for all of the instance variables except dobDD, dobMM and dobYY. ii. Create a method that will return the date of birth (dob) in string format. E.g: public String getDOB(){…} iii. Override toString() method from Object class
c. Constructor
i. A parameterized constructor that will accept and set: firstName, lastName, gender, age, dobDD, dobMM, dobYY

3. Create a Customer class that inherits Person class with file name Customer.java that will have the following object members:
a. Object States (or) Instance variables
i. customerId of type String ii. dojDD of type int iii. dojMM of type int iv. dojYY of type int
v. dotDD of type int vi. dotMM of type int vii. dotYY of type int viii. bankAccount of type BankAccount
b. Object behaviors
i. Create getter and setter methods for all of the above properties except dojDD, dojMM, dojYY, dotDD, dotMM and dotYY. ii. Override toString() method from Object class. iii. Create a method to login to bankAccount. E.g: public boolean login()
c. Constructor
i. A constructor that will accept customer id ii. An overloaded constructor that will accept customer id and bankAccount object

4. Create a BankAccount class with file name BankAccount.java that will have the following object members:
a. Object States (or) Instance variables
i. accountNumber of type String ii. accountType of type String iii. currentBalance of type double iv. accountCreatedDateDD of type int
v. accountCreatedDateMM of type int vi. accountCreatedDateYY of type int vii. customerId of type String viii. password of type String
b. Object behaviors
i. Create getter and setter methods for all of the above instance variables except accountCreatedDateMM, accountCreatedDateDD and accountCreatedDateYY. ii. Override toString() method from Object class iii. Implement a method that will return account created date in String format. iv. Implement method that will credit the specified amount into bankAccount
v. Implement a method that will debit the specified amount from bankAccount.
c. Constructor
i. A parameterized constructor with accountNumber, accountType, currentBalance ii. An overloaded constructor that will set the accountNumber and accountType.

5. Create a Bank class with file name Bank.java that will have the following object members:
a. Object States (or) Instance variables
i. bankName of type String ii. bankAddress of type Address class iii. bankCode of type String iv. arrEmployees of type Employee[]
v. arrCustomers of type Customer[] vi. arrBankAccounts of type BankAccount[]
b. Object Behaviors
i. A method that will add Employee by a Manager ii. A method that will add Customer by a Manager iii. A method that…