View the step-by-step solution to:

Question 1 of 1: Working with Overloaded Constructors Scenario: Universal Bank offers various services to its customers.

I would like help on a lab submitted meeting the following requirements.

Question 1 of 1:

Working with Overloaded Constructors

Scenario: Universal Bank offers various services to its customers. The bank has various branches all over the

country and, therefore, each branch has a unique code. The bank stores the details of its customers such as

Bank:

C

customer:

customer ID,

customer name,

account number,

address,

Phone number,

Email address.

In addition, the bank offers its customers a choice of accounts, such as


account:

Savings account,

current account,

loan account.

The bank also stores its employee details, such as

employee:

employee code,

mployee name,

employee address,

Phone number,

Email address.


Branch

Branch code

For the given scenario, you have to identify various classes and their attributes.

Create a Java program to implement the identified classes in the given scenario. In addition, modify the code to

perform the following:

Assign values to the identified attributes by using constructors.

Create overloaded construct

Lab32.zip - Preview not available
Sign up to view the entire interaction

Top Answer

Attached is a detailed explanation... View the full answer

Account.java

public class Account
private String
private String
private String {
accountNumber;
email;
address; /***
*
* @param accountNumber
* @param email
* @param address
*/
public Account(String...

Bank.java

public class Bank {
private Customer customer;
private Account account;
private String name;
/***
*
* @param customer
* @param account
* @param name
*/
public Bank(Customer customer, Account...

BankTest.java

public class BankTest {
public static void main(String args) {
Customer customer = new Customer(12, "Neo");
Account account = new SavingAccount("121212",...

CurrentAccount.java

public class CurrentAccount extends Account {
private double tax;
public double getTax() {
return tax;
}
public void setTax(double tax) {
this.tax = tax;
}
public CurrentAccount(String...

Customer.java

public class Customer {
private int cutomerID;
private String customerName;
/***
*
* @param cutomerID
* @param customerName
*/
public Customer(int cutomerID, String customerName) {
this.cutomerID =...

LoanAccount.java

public class LoanAccount extends Account {
private double tax;
/**
*
* @param accountNumber
* @param email
* @param address
* @param tax
*/
public LoanAccount(String accountNumber, String email,...

SavingAccount.java

public class SavingAccount extends Account {
@Override
public String toString() {
return "SavingAccount [tax=" + tax + "]";
}
private double tax;
/***
*
* @param accountNumber
*...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online