Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

At the end of this activity, you should be able to: define classes implement polymorphism and inheritance instantiate an object array apply Exception to all


 

At the end of this activity, you should be able to:

  • define classes
  • implement polymorphism and inheritance
  • instantiate an object array
  • apply Exception to all input validation
  • create a banking application for multiple users


What to Prepare for the Activity:

  • NetBeans IDE 8.2
  • JDK8 (Java Development Kit 8)


Procedure:

  • I need to create a NetBeans project for this activity. The project name should be as follows:

Project Name: MP3_Cobacha_Ivy


  • The class names to be created are the following:
  • ClientCobacha
  • SavingsAccountCobacha
  • BankAccountCobacha


  • Compress the NetBeans project into .rar or .zip format and then upload to the link provided in the LMS.


  • Only NetBeans project compressed in .rar or .zip format will be accepted. All other formats will be graded with 0.



Write a Java program with the following specifications:


  1. Define the following attributes and methods of the BankAccountCobacha class:
  • Attributes: accountName, address, birthday, contactNumber
  • Constructor
  • Setter and Getter methods
  • getClientDetails method


  1. Define the following attributes and methods of the SavingsAccountCobacha class:
  • Attribute: accountNo, balance, interestRate
  • Constructor
  • Setter and Getter methods
  • balanceInquiry method
  • deposit method
  • withdraw method
  • validateAcctNumber method
  • closeAccount method


  1. Note that the SavingsAccountCobacha class will be inherited from the BankAccountCobacha class.


  1. Define the following methods in the ClientCobacha class:
  • main method
  • displayMainMenu method
  • other applicable methods


  1. Note that the object to be instantiated in the main method is an object array.

For example: SavingsAccount[ ] sa = new SavingsAccount[100];


  1. The program should have the main menu as shown below and will always loop back to the main menu after each transaction.

JBank Main Menu

[1] New Account

[2] Balance Inquiry

[3] Deposit

[4] Withdraw

[5] Client Profile

[6] Close Account

[7] Exit


  1. The New Account option should implement the following:
    • Input client details: name, address, birthday, and contact number
    • Input the initial deposit of not less than PhP 5,000
    • Generate a four-digit account number randomly


  1. The Balance Inquiry option should implement the following:
    • Input the account number and validate
    • If the account number is valid, display the client name and current balance




  1. The Deposit option should implement the following:
    • Input the account number and validate
    • If the account number is valid, input the amount of deposit of not less than Php 100
    • Compute and update the current balance as follows:

Balance+=amount of deposit

Interest=5% of balance

Balance+=interest


  1. The Withdraw option should implement the following:
    • Input the account number and validate
    • If the account number is valid, input the amount to be withdrawn, not less than Php 100, not greater than the balance, and an amount of Php 5,000 should be maintained (maintaining balance)
    • Compute and update the balance as follows:

Balance-=amount withdrawn


  1. The Client Profile option should implement the following:
  • Input the account number and validate
  • If account number is valid, display the client details including the current balance.


  1. The Close Account option should implement the following:
  • Input the account number and validate
  • If account number is valid, confirm if the user closes the account then set the balance to zero
  • Otherwise, go back to the main menu


  1. The Exit option terminates the program.


  1. The following Main Menu validations should be implemented:
  • Validate the transaction code by the user
  • The user should not be allowed to perform transactions 2 to 5, unless a new account has been created
  • Apply all input validations.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Sure heres a possible implementation of the program based on the given requirements java import javautil import javaio public class MP3CobachaIvy publ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Auditing and Assurance services an integrated approach

Authors: Alvin A. Arens, Randal J. Elder, Mark S. Beasley, Chris E. Hogan

16th edition

978-0134075754, 134075757, 134065824, 978-0134065823

More Books

Students also viewed these Programming questions

Question

Solve the initial-value problem = * sin f, y(-2) = dt

Answered: 1 week ago

Question

please dont use chat gpt AI 4 1 0 . .

Answered: 1 week ago