Highlights
Aim
The aim of this assignment is to implement a real-world problem scenario using the Object-oriented concept of Java that includes creating a class to represent a Bank Card, together with its two subclasses to represent a Debit Card and a Credit Card respectively. You will also need to write a report that should contain information about your program.
Program
The program should include the following classes (with no additional attributes or methods).
1) The BankCard class has five attributes, which correspond to the card Id, client name, issuer bank, bank account, and BalanceAmount. The client name, issuer bank, bank account are each represented as a string of text and Card ID, and balance amount as a number. The constructor accepts four parameters which are, balance amount, card Id,bank account, issuer bank. The attributes client name is initialized to an emptystring. Additionally, assign balance amount, card Id, bank account, issuer bank with the parameter values. Each attribute has a corresponding accessor method.
2) The Debit Card class is also a subclass of Bank Card class and it has four attributes: PIN number - an integer Withdrawal Amount - an integer date Of Withdrawal - a String hasWithdrawn - either true or false (boolean)
The constructor accepts six parameters which are balance amount, card Id,bank account, issuer bank, client name, PIN number. A call is made to the superclass constructor with four parameters and a setters method:setclientname. Also, assign,pin number is assigned with the corresponding parameter values
Create a mutator method for attribute: withdrawal amount. There is a method named Withdraw. The method is used to deduct the money directly from the client account. The method accepts Withdrawal Amount, date Of Withdrawal, and PIN number. If a valid pin number is entered, and sufficient amount is also present, then only the amount can be withdrawn and the attribute hasWithdrawn is set to true. The attribute: BalanceAmount is calculated after the withdrawal process.
A method to display the details of the Debit Card is required. It must have the same signature as the display method in the Bank Card class. It will call the method in the Bank Card class to display the card Id, client name, issuer bank, bank account, and BalanceAmount. It should also display a pin number, withdrawal amount, date of withdrawal. If the transaction has not been carried yet, display the balance amount only. Each output must be suitably annotated.
Your report should describe the process of development of your classes with:
a. A class diagram
b. Pseudocode for each method in each class
c. A short description of what each method does
d. You should give evidence (through inspection tables and appropriate screenshots) of the following testing that you carried out on your program:
e. The report should contain a section on error detection and error correction where you give examples and evidence of three errors encountered in your implementation. The errors (syntax, semantic or logical errors) should be distinctive and not of the same type.
f. The report should contain a conclusion, where you need to include the following things:
The report should include a title page (including your name and ID number), a table of contents (with page numbers), an introduction part that contains a brief about your work, and a listing of the code (in an appendix). Marks will also be awarded for the quality of writing and the presentation of the report.
This CS4001NI – IT and Computer Science has been solved by our PHD Experts at My Uni Paper.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.