Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab: Method Overloading, Inheritance, Overriding, and Constructors Method Overloading: .In BankAccount write a second method that set the BankAccounts owners information that adds one variable
Lab: Method Overloading, Inheritance, Overriding, and Constructors Method Overloading: .In BankAccount write a second method that set the BankAccounts owners information that adds one variable to parameter list: Ex: public void setUpAccount(Person p, double b) t //do stuff public void setUpAccount(Person p1, Person p2, double b, Boolean isJoint) In Teller add a 3rd BankAccount object that would use the overloaded method. Inheritance: (Hint you will not have to do much typing in these 2 files. Remember to use the keyword extends) I. Create 2 new class files called Checking and Savings .In Checking add 1 variable called overdraftAmt .In Checking create a method that prints the overDraftAmt value In savings add 1 variable called interestRate In Savings create a method that prints the current interest rate Il. In Teller Create an instance of both Savings and Checking Call all of the methods associated with Savings and Checking "Has a" Relationship: Create a 4th class called Teller_yourName.java In the Teller class declare and define a method call generateAccounts that will be passed a BankAccount object In the generateAccounts method you will call all of the BankAccount objects methods Lab: Method Overloading, Inheritance, Overriding, and Constructors Method Overloading: .In BankAccount write a second method that set the BankAccounts owners information that adds one variable to parameter list: Ex: public void setUpAccount(Person p, double b) t //do stuff public void setUpAccount(Person p1, Person p2, double b, Boolean isJoint) In Teller add a 3rd BankAccount object that would use the overloaded method. Inheritance: (Hint you will not have to do much typing in these 2 files. Remember to use the keyword extends) I. Create 2 new class files called Checking and Savings .In Checking add 1 variable called overdraftAmt .In Checking create a method that prints the overDraftAmt value In savings add 1 variable called interestRate In Savings create a method that prints the current interest rate Il. In Teller Create an instance of both Savings and Checking Call all of the methods associated with Savings and Checking "Has a" Relationship: Create a 4th class called Teller_yourName.java In the Teller class declare and define a method call generateAccounts that will be passed a BankAccount object In the generateAccounts method you will call all of the BankAccount objects methods
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started