Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

import java.io.*; public class Account implements Comparable , Serializable protected int accnum; protected HolderDetails holder; protected List transactions; protected float balance; // Add a suitable

image text in transcribed

import java.io.*; public class Account implements Comparable, Serializable protected int accnum; protected HolderDetails holder; protected List transactions; protected float balance; // Add a suitable constructor here /1 Add methods to make deposits / withdrawals // Method to print out account transaction summary // Add suitable attribute accessor methods // Add method to implement the Comparable interface a: Complete the implementation of the Account class, providing a suitable constructor, attribute accessor methods, methods for making a deposit or withdrawal, a method to print out a transaction summary related to a range of dates and an implementation method for the Comparable interface. 7 MARKS b: Provide implementations for the HolderDetails class and the Transaction class. The HolderDetails class is used to store personal details about the account holder. The Transaction class contains details about past transactions including the type of transaction, the amount and the Date. 7 MARKS c: Define and implement a new class, called CurrentAccount, derived from Account, that allows withdrawals to proceed up to some overdraft limit. Note that the base Account class shown has no overdraft facility import java.io.*; public class Account implements Comparable, Serializable protected int accnum; protected HolderDetails holder; protected List transactions; protected float balance; // Add a suitable constructor here /1 Add methods to make deposits / withdrawals // Method to print out account transaction summary // Add suitable attribute accessor methods // Add method to implement the Comparable interface a: Complete the implementation of the Account class, providing a suitable constructor, attribute accessor methods, methods for making a deposit or withdrawal, a method to print out a transaction summary related to a range of dates and an implementation method for the Comparable interface. 7 MARKS b: Provide implementations for the HolderDetails class and the Transaction class. The HolderDetails class is used to store personal details about the account holder. The Transaction class contains details about past transactions including the type of transaction, the amount and the Date. 7 MARKS c: Define and implement a new class, called CurrentAccount, derived from Account, that allows withdrawals to proceed up to some overdraft limit. Note that the base Account class shown has no overdraft facility

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions