Guided Exercise: Account Management System – Inheritance in Action #99
akash-coded
started this conversation in
Tasks
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Logical follow-up of the problem number 2,3,4 of discussion #8
Instructions for the Trainees:
BankingSystemDemo.java.BankingSystemDemoclass (which includes themainmethod) should bepublic. Other classes should have default (package-private) access.Single-File Core Java OOP Exercise: JPMC Branch Operations Simulator
Objective: To master class inheritance (single and multi-level), method overriding, constructor chaining, polymorphism, and apply Java coding best practices within a single-file structure, simulating operations at a bank branch.
Scenario:
Welcome to the JPMC Digital Branch! Today, you'll be setting up the core account management system. We need to handle various account types with specific features. All your code will reside in one file,
BankingSystemDemo.java. Let's begin!Key Areas for Trainees to Fill In (Marked with
// --- TODO: ---)AccountClass:debit(double amount)method logic.credit(double amount)method logic.SavingsAccountClass:super, validating new fields).debit(double amount)override logic (checkingminimumBalance, callingsuper.debit).applyInterest()method logic.getAccountDetails()override logic.SalaryAccountClass:superwith specificminimumBalance).processSalaryCredit(double salaryAmount)method logic.getAccountDetails()override logic.CurrentAccountClass:debit(double amount)override logic (handlingoverdraftLimit).getAccountDetails()override logic.BankingSystemDemomainmethod:Beta Was this translation helpful? Give feedback.
All reactions